* elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
[binutils.git] / bfd / ChangeLog
blob1ce252158e1c8a17ff706056f0a3aa10ed3c8dc0
1 2001-12-18  Jakub Jelinek  <jakub@redhat.com>
3         * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
4         (last_eq): Remove.
5         (_bfd_elf_strtab_finalize): Don't use a hash table for last
6         character chains, instead use an array.
8 2001-12-18  Jason Thorpe  <thorpej@wasabisystems.com>
10         * elf.c (elfcore_netbsd_get_lwpid): New function.
11         (elfcore_grok_netbsd_procinfo): New function.
12         (elfcore_grok_netbsd_note): New function.
13         (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
14         NetBSD ELF core file notes.
16 2001-12-18  Alan Modra  <amodra@bigpond.net.au>
18         * elfcode.h (struct bfd_preserve): New.
19         (elf_object_p): Replace preserved_* vars with instance of above.
20         Save and restore arch_info pointer rather than arch, mach so that
21         more cases can be restored.  Save and restore new section_tail,
22         section_htab structure, and init appropriately.  Move "rest of
23         section header" code so that i_shdrp needs no NULL initialisation.
24         Free old section_htab on success.
25         * elfcore.h (elf_core_file_p): Likewise.
27 2001-12-17  Tom Rix  <trix@redhat.com>
29         * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
30         xcoff.
32 2001-12-17  Jakub Jelinek  <jakub@redhat.com>
34         * elf-bfd.h (elf_discarded_section): Define.
35         * elflink.h (elf_link_input_bfd): Use it.
36         (elf_reloc_symbol_deleted_p): Likewise.
38         * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
39         overflows for pc relative relocs against discarded sections.
41 2001-12-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
43         * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
44         * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
45         over the last months. Add some code for mips16 handling.
46         (mips_elf64_check_mips16_stubs): New function.
47         (mips_elf64_stub_section_p): Likewise.
48         (mips_elf64_calculate_relocation): Change interface to support mips16.
49         (mips_elf64_perform_relocation): Likewise.
51 2001-12-17  Alan Modra  <amodra@bigpond.net.au>
53         Support for more than 64k ELF sections.
54         * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
55         (bfd_elf32_swap_symbol_in): Likewise.
56         (bfd_elf32_swap_symbol_out): Likewise.
57         (bfd_elf64_swap_symbol_in): Likewise.
58         (bfd_elf64_swap_symbol_out): Likewise.
59         (elf_reloc_cookie): Add locsym_shndx field.  Make locsyms a PTR.
60         (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
61         symtab_shndx_section.
62         (elf_numsections): Define.
63         (elf_symtab_shndx): Define.
64         * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
65         (bfd_elf_find_section): Likewise.
66         (bfd_section_from_elf_index): Likewise.
67         (bfd_section_from_shdr): Likewise.  Handle SHT_SYMTAB_SHNDX.
68         (bfd_section_from_r_symndx): Read symbol shndx extension, and
69         translate st_shndx for > SHN_HIRESERVE.
70         (assign_section_numbers): Skip reserved sections.  Assign
71         symtab_shndx_section and elf_numsections.  Exclude reserved
72         sections from e_shnum.  Set up symtab_shndx_hdr.
73         (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
74         (map_sections_to_segments): Don't map eh_frame_hdr unless required.
75         (assign_file_positions_except_relocs): Use elf_numsections rather
76         than header e_shnum.  Skip reserved sections and symtab_shndx_section.
77         (prep_headers): Set name for symtab_shndx_hdr.
78         (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
79         (_bfd_elf_write_object_contents): Likewise.  Skip reserved sections.
80         (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
81         first.  Use elf_section_data if available.  Use elf_numsections.
82         Start scan at index 1.
83         (copy_private_bfd_data ): Comment fixes.
84         (MAP_ONESYMTAB): Define above SHN_HIOS.
85         (MAP_DYNSYMTAB): Likewise.
86         (MAP_STRTAB): Likewise.
87         (MAP_SHSTRTAB): Likewise.
88         (MAP_SYM_SHNDX): New define.
89         (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
90         (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
91         * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
92         extension.
93         (elf_swap_symbol_out): Likewise.
94         (elf_object_p): Set elf_numsections, and use instead of e_shnum.
95         Initialialise reserved elf_elfsections to point at shdr[0].  Remove
96         redundant bfd_release calls.
97         (elf_slurp_symbol_table): Read symbol shndx extension, and use with
98         elf_swap_symbol_in.  Translate st_shndx for > SHN_HIRESERVE too.
99         * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
100         extension, and use with elf_swap_symbol_in.
101         (elf_link_record_local_dynamic_symbol): Likewise.
102         (elf_link_add_object_symbols): Likewise.  Also translate st_shndx
103         for elf sections > SHN_HIRESERVE.
104         (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
105         call.
106         (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
107         (elf_bfd_final_link): Allocate the above, and tidy code allocating
108         other buffers.  Use elf_numsections instead of e_shnum.  Adjust
109         elf_swap_symbol_out calls.
110         (elf_link_output_sym): Swap out symbol shndx extension too.
111         (elf_link_flush_output_syms): And flush them to disk.
112         (elf_link_output_extsym): Use SHN_BAD.  Adjust elf_swap_symbol_out
113         calls.
114         (elf_gc_mark): Read symbol shndx extension, and use with
115         elf_swap_symbol_in.
116         (elf_link_input_bfd): Likewise,  Translate st_shndx for elf sections
117         > SHN_HIRESERVE too.  Use SHN_BAD.
118         (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
119         elf_swap_symbol_in.  Translate st_shndx > SHN_HIRESERVE too.
120         (elf_bfd_discard_info): Read symbol shndx extension.  Don't attempt
121         to continue after a bfd error.
122         * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
123         Stash them immediately to symtab_hdr->contents rather than later
124         in multiple places.  Clean up afterwards.  Read symbol shndx
125         extension, and use with swap_symbol_in.  Translate SHN_UNDEF,
126         SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
127         sections too.  Remove dead code.
128         (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
129         when swapping in symbols.  Tidy code adjusting global syms.
130         Don't swap in global syms.
131         (mn10200_elf_symbol_address_p): Likewise.  Remove extsyms param.
132         (mn10200_elf_get_relocated_section_contents): Read symbol shndx
133         extension, and use with swap_symbol_in.  Rename "size" -> "amt"
134         to maximize code in common with other files.  Translate st_shndx
135         for > SHN_HIRESERVE too.  Remove dead code.
136         * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
137         Stash them immediately to symtab_hdr->contents rather than later
138         in multiple places.  Clean up afterwards.  Read symbol shndx
139         extension, and use with swap_symbol_in.  Remove dead code.
140         (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
141         (mn10300_elf_symbol_address_p): Likewise.
142         (mn10300_elf_get_relocated_section_contents): Likewise.
143         * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
144         (elf32_h8_relax_delete_bytes): Likewise.
145         (elf32_h8_symbol_address_p): Likewise.
146         (elf32_h8_get_relocated_section_contents): Likewise.
147         * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
148         extension, and use with swap_symbol_in.
149         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
150         * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
151         bfd_elf32_swap_symbol_out.
152         * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
153         elf sections > SHN_HIRESERVE too.
154         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
155         local syms.  Read symbol shndx extension, and use with swap_symbol_in.
156         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
157         elf_numsections rather than header e_shnum.
158         * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
159         (sh_elf_relax_delete_bytes): Likewise.
160         (sh_elf_get_relocated_section_contents): Likewise.  Only read local
161         symbols.
162         * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
163         hold section index.  Use elf_numsections rather than e_shnum.
164         Rename "index" -> "indx" to avoid shadowing warning.
165         (v850_elf_add_symbol_hook): Likewise.
166         * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
167         Read symbol shndx extension, and use with swap_symbol_in.
168         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
169         Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
170         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
171         (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
173         * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
174         before calling bfd_section_from_elf_index on local syms.
175         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
176         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
177         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
178         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
179         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
180         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
181         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
182         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
183         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
184         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
185         * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
186         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
187         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
188         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
189         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
190         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
191         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
192         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
193         * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
194         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
195         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
196         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
197         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
199 2001-12-17  Alan Modra  <amodra@bigpond.net.au>
201         Hash bfd sections for fast lookup and create.
202         * bfd.c (struct _bfd): Add section_htab, section_tail.
203         * libbfd-in.h (_bfd_delete_bfd): Declare.
204         (bfd_section_hash_newfunc): Declare.
205         * opncls.c (_bfd_new_bfd): Free memory on failure.  Init
206         section_htab and section_tail.
207         (_bfd_delete_bfd): New function.
208         (bfd_openr): Use it.
209         (bfd_fdopenr): Likewise.
210         (bfd_openstreamr): Likewise.
211         (bfd_openw): Likewise.
212         (bfd_close): Likewise.
213         (bfd_close_all_done): Likewise.
214         (bfd_release): Comment.
215         * section.c (struct section_hash_entry): New.
216         (bfd_section_hash_newfunc): New function.
217         (section_hash_lookup): Define.
218         (bfd_section_init): New function, split out from
219         bfd_make_section_anyway.
220         (bfd_get_section_by_name): Lookup via hash table.
221         (bfd_get_unique_section_name): Likewise.
222         (bfd_make_section_old_way): Rewrite to use hash table.
223         (bfd_make_section_anyway): Likewise.
224         (bfd_make_section): Likewise.  Return NULL for attempts to make
225         BFD_{ABS,COM,UND,IND}_SECTION_NAME.
226         (_bfd_strip_section_from_output): Adjust section_tail if needed.
227         * configure.in: Bump bfd version.
228         * configure: Regenerate.
229         * libbfd.h: Regenerate.
230         * bfd-in2.h: Regenerate.
232 2001-12-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
234         * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
235         (mips_elf64_high): New Function.
236         (mips_elf64_higher): Likewise.
237         (mips_elf64_highest): Likewise.
238         (mips_elf64_info_to_howto_rel): Likewise.
239         (mips_elf64_info_to_howto_rela): Likewise.
240         (mips_elf64_write_rel): Likewise.
241         (mips_elf64_write_rela): Likewise.
242         (mips_elf64_link_hash_newfunc): Likewise.
243         (mips_elf64_hi16_reloc): Likewise.
244         (mips_elf64_higher_reloc): Likewise.
245         (mips_elf64_highest_reloc): Likewise.
246         (mips_elf64_gprel16_reloc): Likewise.
247         (mips_elf64_gprel16_reloca): Likewise.
248         (mips_elf64_literal_reloc): Likewise.
249         (mips_elf64_gprel32_reloc): Likewise.
250         (mips_elf64_shift6_reloc): Likewise.
251         (mips_elf64_got16_reloc): Likewise.
252         (mips_elf64_assign_gp): Likewise.
253         (mips_elf64_final_gp): Likewise.
254         (gprel16_with_gp): Likewise.
255         (mips_elf64_additional_program_headers): Likewise.
256         (mips_elf64_link_hash_table_create): Likewise.
257         (mips_elf64_got_offset_from_index): Likewise.
258         (_mips_elf64_got_info): Likewise.
259         (mips_elf64_sign_extend): Likewise.
260         (mips_elf64_overflow_p): Likewise.
261         (mips_elf64_global_got_index): Likewise.
262         (mips_elf64_sort_hash_table_f): Likewise.
263         (mips_elf64_sort_hash_table): Likewise.
264         (mips_elf64_swap_msym_out): Likewise.
265         (mips_elf64_create_local_got_entry): Likewise.
266         (mips_elf64_local_got_index): Likewise.
267         (mips_elf64_got_page): Likewise.
268         (mips_elf64_got16_entry): Likewise.
269         (mips_elf64_local_relocation_p): Likewise.
270         (mips_elf64_next_relocation): Likewise.
271         (mips_elf64_create_dynamic_relocation): Likewise.
272         (mips_elf64_calculate_relocation): Likewise.
273         (mips_elf64_obtain_contents): Likewise.
274         (mips_elf64_perform_relocation): Likewise.
275         (mips_elf64_relocate_section): Likewise.
276         (mips_elf64_create_dynamic_sections): Likewise.
277         (mips_elf64_adjust_dynamic_symbol): Likewise.
278         (mips_elf64_always_size_sections): Likewise.
279         (mips_elf64_size_dynamic_sections): Likewise.
280         (mips_elf64_finish_dynamic_symbol): Likewise.
281         (mips_elf64_finish_dynamic_sections): Likewise.
282         (mips_elf64_gc_mark_hook): Likewise.
283         (mips_elf64_gc_sweep_hook): Likewise.
284         (mips_elf64_create_got_section): Likewise.
285         (mips_elf64_record_global_got_symbol): Likewise.
286         (mips_elf64_create_msym_section): Likewise.
287         (mips_elf64_allocate_dynamic_relocations): Likewise.
288         (mips_elf64_check_relocs): Likewise.
289         (mips_elf64_output_extsym): Likewise.
290         (mips_elf64_swap_gptab_in): Likewise.
291         (mips_elf64_swap_gptab_out): Likewise.
292         (gptab_compare): Likewise.
293         (mips_elf64_final_link): Likewise.
294         (prev_reloc_addend): Remenber addend of previous parts of a combined
295         reloc.
296         (ELF_MIPS_GP_OFFSET): New define.
297         (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
298         (MIPS_FUNCTION_STUB_SIZE): Likewise.
299         (mips_elf64_howto_rel): Fix HOWTO defines.
300         (mips_elf64_howto_rela): Likewise.
301         (mips_elf64_swap_reloca_out): Fix signedness.
302         (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
303         (mips_elf64_be_swap_reloca_in): Likewise.
304         (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
305         (mips_elf64_be_swap_reloca_out): Likewise.
307 2001-12-15  Jakub Jelinek  <jakub@redhat.com>
309         * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
310         * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
311         (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
312         sec_info here.  Free ehbuf.
313         (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
314         if hdr_info->strip.
315         (_bfd_elf_maybe_strip_eh_frame_hdr): New.
316         * elflink.h (size_dynamic_sections): Call it.
318 2001-12-14  Alan Modra  <amodra@bigpond.net.au>
320         * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
322 2001-12-13  Jakub Jelinek  <jakub@redhat.com>
324         * elf-bfd.h (enum elf_link_info_type): New.
325         (struct bfd_elf_section_data): Remove stab_info and merge_info
326         fields, add sec_info and sec_info_type.
327         (struct elf_obj_tdata): Add eh_frame_hdr field.
328         (_bfd_elf_discard_section_eh_frame): New prototype.
329         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
330         (_bfd_elf_eh_frame_section_offset): Likewise.
331         (_bfd_elf_write_section_eh_frame): Likewise.
332         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
333         * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
334         (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
335         (elf-eh-frame.lo): New.
336         * Makefile.in: Rebuilt.
337         * configure.in (elf): Add elf-eh-frame.lo.
338         * configure: Rebuilt.
339         * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
340         (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
341         (get_program_header_size): Take into account PT_GNU_EH_FRAME
342         segment.
343         (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
344         (_bfd_elf_rel_local_sym): Likewise.
345         (_bfd_elf_section_offset): Likewise.  Call
346         _bfd_elf_eh_frame_section_offset too.
347         * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
348         sec_info.
349         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
350         * elf-eh-frame.c: New file.
351         * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
352         .stab sections.  Set sec_info_type, use sec_info instead
353         of merge_info and stab_info.
354         (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
355         if --eh-frame-hdr.
356         (elf_bfd_final_link): Write .eh_frame_hdr section.
357         (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
358         (elf_link_input_bfd): Likewise.
359         Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
360         (elf_bfd_discard_info): Add output_bfd argument.
361         Call _bfd_elf_discard_section_eh_frame and
362         _bfd_elf_discard_section_eh_frame_hdr.
363         (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
364         names.
365         * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
366         prototypes.
367         * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
369 2001-12-12  Richard Henderson  <rth@redhat.com>
371         * syms.c (_bfd_generic_read_minisymbols): Early return for
372         no symbols.  Patch from FreeBSD folk; exact origin unknown.
374 2001-12-11  Alan Modra  <amodra@bigpond.net.au>
376         * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
377         and e_shstrndx if out of range.
378         (elf_object_p): Read extended values for e_shnum and e_shstrndx
379         from the first section header.  Allocate space in elf_elfsections
380         for reserved sections and set to NULLs.
381         (elf_write_shdrs_and_ehdr): Set overflow fields in first section
382         header.  Skip reserved sections in elf_elfsections.  Remove
383         duplicate size calculation.
385 2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
386             Richard Henderson  <rth@redhat.com>
387             Corinna Vinschen  <vinschen@redhat.com>
389         * Makefile.am: Add support for xstormy16.
390         * archures.c: Add support for xstormy16.
391         * config.bfd: Add support for xstormy16.
392         * configure.in: Add support for xstormy16.
393         * reloc.c: Add support for xstormy16.
394         * targets.c: Add support for xstormy16.
395         * cpu-xstormy16.c: New file.
396         * elf32-xstormy16.c: New file.
397         * Makefile.in: Regenerated.
398         * bfd-in2.h: Regenerated.
399         * configure: Regenerated.
400         * libbfd.h: Regenerated.
402 2001-12-07  Nick Clifton  <nickc@cambridge.redhat.com>
404         * elf.c (assign_file_positions_for_segments): Combine sentance
405         fragments into a single sentance in order to permit better
406         translation into foreign languages.
408 2001-12-07  Jim Blandy  <jimb@redhat.com>
410         * elf32-s390.c (elf32_s390_grok_prstatus): New function.
411         (elf_backend_grok_prstatus): Define.    
413 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
415         * elf32-sparc.c (elf32_sparc_relocate_section): Revert
416         2001-09-14 change.
418 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
420         * elf.c (_bfd_elf_rela_local_sym): Only call
421         _bfd_merged_section_offset if merge_info is non-NULL.
422         (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
423         * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
424         prototypes.
425         * elf32-arm.h (elf32_arm_final_link_relocate): Use
426         _bfd_elf_section_offset.
427         (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
428         * elf32-i386.c (elf_i386_relocate_section): Use
429         _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
430         * elf32-sh.c (sh_elf_relocate_section): Likewise.
431         * elf32-sparc.c (elf32_sparc_relocate_section): Use
432         _bfd_elf_section_offset.
433         * elf32-cris.c (cris_elf_relocate_section): Likewise.
434         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
435         * elf32-i370.c (i370_elf_relocate_section): Likewise.
436         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
437         * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
438         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
439         * elf32-s390.c (elf_s390_relocate_section): Likewise.
440         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
441         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
442         * elf64-s390.c (elf_s390_relocate_section): Likewise.
443         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
444         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
445         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
447 2001-12-07  Alan Modra  <amodra@bigpond.net.au>
449         * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
450         already forced local.
452 2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>
454         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
455         fragmented sentence parts into a whole sentence to permit
456         better translation into foreign languages.
458 2001-12-06  Hans-Peter Nilsson  <hp@bitrange.com>
460         * configure: Regenerate.
461         * Makefile.in: Regenerate.
463 2001-12-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
465         * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
466         BFD64_LIBS, make the latter depending on the availability of BFD64.
467         Add archive64.c source file.
468         * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
469         and bfd_elf64_archive_write_armap, code from elf64-mips.c
470         * archive.c (bfd_slurp_armap): Add ELF64 archive support.
471         * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
472         (mips64*el-*-linux*): Likewise.
473         (mips*el-*-linux*): Likewise. Reorder entries.
474         * configure.in (bfd_libs): Define in dependency of BFD64 and
475         AC_SUBST it.
476         * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
477         bfd_elf64_archive_slurp_armap instead.
478         (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
479         instead.
481 2001-12-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
483         * config.bfd: Remove trailing blanks.
484         * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
486 2001-12-04  Alexandre Oliva  <aoliva@redhat.com>
488         * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
489         R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
490         R_D10V_18_PCREL.  Check 10_PCREL relocations as signed.
491         Disable pointless overflow checking of NONE and 32.
493 2001-12-04  Alan Modra  <amodra@bigpond.net.au>
495         * reloc.c (bfd_install_relocation): Correct reloc address test.
496         (bfd_perform_relocation): Formatting fix.
497         * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
499 2001-12-03  Nick Clifton  <nickc@cambridge.redhat.com>
501         * configure.in (LINGUAS): Add tr.
502         * configure: Regenerate.
503         * po/tr.po: Import from translation project's web site.
505 2001-12-03  Alan Modra  <amodra@bigpond.net.au>
507         * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
508         happens to trigger on undefined symbols.
509         (final_link_relocate): Return bfd_reloc_undefined for undefined
510         stubs.
511         (elf32_hppa_relocate_section): Don't say we can't handle a reloc
512         if we have already warned about an undefined symbol.
514 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
516         * elf32-mips.c (NEWABI_P): New define.
517         (USE_REL): Remove, replaced by
518         (elf_backend_may_use_rel_p): New define.
519         (elf_backend_may_use_rela_p): Likewise.
520         (elf_backend_default_use_rela_p): Likewise.
521         (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
522         Fix some relocation definitions.
523         (elf_mips_howto_table_rela): New RELA relocation definitions for
524         NewABI support.
525         (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
526         (bfd_elf32_bfd_reloc_type_lookup): Likewise.
527         (mips_rtype_to_howto): Likewise.
528         (_bfd_mips_elf_relocate_section): Likewise.
529         (_bfd_mips_elf_object_p): Typo.
530         (elf_backend_sign_extend_vma): Reordered together with many other
531         defines nearby to resemble the order of declaration in the header
532         file.
534 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
536         * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
537         BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
538         * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
539         * elf32-mips.c (mips_reloc_map): Likewise. Replace
540         BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
541         * elf64-mips.c (mips_reloc_map): Likewise.
542         * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
543         (BFD_RELOC_MIPS_GPREL32): Remove.
545 2001-11-30  H.J. Lu <hjl@gnu.org>
547         * elflink.h (elf_add_default_symbol): New.
548         (elf_link_add_object_symbols): Call elf_add_default_symbol ()
549         to create an indirect symbol from the default for the symbol
550         with the default version if needed.
552 2001-11-29  "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
554         * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
555         if it has already been set by another thread.
557 2001-11-28  Jakub Jelinek  <jakub@redhat.com>
559         * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
560         (elf64_alpha_relocate_section): Translate local_got_entries
561         for STT_SECTION symbol to SHF_MERGE section the first time
562         we see it.
563         * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
564         sec_merge_done.
565         (get_local_sym_hash): New, extracted from get_dyn_sym_info.
566         (get_dyn_sym_info): Use it.
567         (elfNN_ia64_relocate_section): Translate local dyn entries
568         for STT_SECTION symbol to SHF_MERGE section the first time
569         we see it.
571 2001-11-27  H.J. Lu <hjl@gnu.org>
573         * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
574         ELF.
576 2001-11-26  Jeffrey A Law  (law@cygnus.com)
578         * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
579         prototypes.
581 2001-11-24  Alan Modra  <amodra@bigpond.net.au>
583         * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
584         group sizes to accommodate c++.
586 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
588         * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
589         relocations in non-alloced sections against global symbols
590         defined in shared library being built.
591         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
593 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
595         * elf.c (_bfd_elf_rela_local_sym): New.
596         * elflink.h (elf_link_input_bfd): Don't consider empty
597         merged sections as removed in relocation tests.
598         * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
599         * elf32-i386.c (elf_i386_relocate_section): Handle relocs
600         against STT_SECTION symbol of SHF_MERGE section.
601         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
602         * elf32-avr.c (elf32_avr_relocate_section): Call
603         _bfd_elf_rela_local_sym.
604         * elf32-cris.c (cris_elf_relocate_section): Likewise.
605         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
606         * elf32-fr30.c (fr30_final_link_relocate): Likewise.
607         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
608         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
609         * elf32-i370.c (i370_elf_relocate_section): Likewise.
610         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
611         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
612         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
613         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
614         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
615         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
616         * elf32-s390.c (elf_s390_relocate_section): Likewise.
617         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
618         * elf32-v850.c (v850_elf_relocate_section): Likewise.
619         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
620         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
621         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
622         * elf64-s390.c (elf_s390_relocate_section): Likewise.
623         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
624         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
625         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
626         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
627         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
628         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
629         * elf32-sh.c (sh_elf_relocate_section): Likewise for
630         !partial_inplace relocs. Handle relocs against STT_SECTION
631         symbol of SHF_MERGE for partial_inplace relocs.
633 2001-11-21  Nick Clifton  <nickc@cambridge.redhat.com>
635         * po/Make-in (distclean): Move SRC-POTFILES.in and
636         BLD-POTFILES.in to maintainer-clean target.
638 2001-11-21  Alan Modra  <amodra@bigpond.net.au>
640         * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
641         than sym_sec->output_section to detect relocs against discarded
642         sections.
644 2001-11-19  H.J. Lu  <hjl@gnu.org>
646         * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
647         discarding relocations.
649 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
651         * section.c (bfd_is_const_section): New macro.  Return true if the
652         given seciton is one of the special, constant, sections.
653         * bfd-in2.h: Regenerate.        
654         * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
655         (coff_write_native_symbol): Use bfd_is_const_section.
657 2001-11-19  Alan Modra  <amodra@bigpond.net.au>
659         * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
661         * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
662         millicode syms as candidates for import stubs.
664         * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
665         (allocate_PIC_calls): Rename to allocate_plt_static.
666         (allocate_dynrelocs): Move most of code handling .plt entries to..
667         (allocate_plt_static): ..here.  Don't drop plabel entries.
669 2001-11-19  Hans-Peter Nilsson  <hp@bitrange.com>
671         * mmo.c: Adjust documentation tags to use texinfo 4 features.
673 2001-11-16  Nick Clifton  <nickc@cambridge.redhat.com>
675         * section.c (bfd_is_const_section): New macro.  Return true if the
676         section pointer refers to one of the special, constant sections.
677         * bfd-in2.h: Regenerate.
679         * coffgen.c (coff_count_linenumbers): Only update the line number
680         count in non-special sections.
681         (coff_write_native_symbol): Only update the line number file
682         position in non-special sections.
684 2001-11-15  Daniel Jacobowitz  <drow@mvista.com>
686         * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
687         local syms from discarded sections.  Update comment.
689 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
691         * po/SRC-POTFILES.in: Regenerate.
693         * elflink.h (elf_link_input_bfd): Complain about all relocs
694         against local syms from discarded sections.  K&R fixes.
695         (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
696         K&R fixes.
698 2001-11-15  Alexandre Oliva  <aoliva@redhat.com>
700         * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
701         overflows in the .stab section.
703 2001-11-14  Daniel Jacobowitz  <drow@mvista.com>
705         * bfd-in.h (bfd_elf32_discard_info): Add prototype.
706         (bfd_elf64_discard_info): Likewise.
707         * bfd-in2.h: Regenerate.
708         * elf-bfd.h (struct elf_reloc_cookie): New.
709         (struct elf_backend_data): Add elf_backend_discard_info,
710         elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
711         (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
712         (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
713         * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
714         (_bfd_elf32_mips_ignore_discarded_relocs): New.
715         (_bfd_elf32_mips_write_section): New.
716         (elf_backend_discard_info): Define.
717         (elf_backend_ignore_discarded_relocs): Define.
718         (elf_backend_write_section): Define.
719         * elfcode.h (elf_bfd_discard_info): Define.
720         (elf_reloc_symbol_deleted_p): Define.
721         * elflink.h (elf_link_input_bfd): Check
722         elf_section_ignore_discarded_relocs.  Call
723         bed->elf_backend_write_section if available.
724         (elf_reloc_symbol_deleted_p): New.
725         (elf_bfd_discard_info): New.
726         (elf_section_ignore_discarded_relocs): New.
727         * elfxx-target.h (elf_backend_discard_info): Define.
728         (elf_backend_ignore_discarded_relocs): Define.
729         (elf_backend_write_section): Define.
730         (elfNN_bed): Add elf_backend_discard_info,
731         elf_backend_ignore_discarded_relocs, and
732         elf_backend_write_section.
733         * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
734         * libbfd.h: Regenerate.
735         * stabs.c (_bfd_discard_section_stabs): New.
737 2001-11-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
739         * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
740         scheme to get rid of an ugly complicated test.
741         * elf64-s390.c (elf_s390_relocate_section): Likewise.
743 2001-11-14  Andreas Jaeger  <aj@suse.de>
745         * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
746         x86-64 for display.
748 2001-11-14  Jakub Jelinek  <jakub@redhat.com>
750         * dwarf2.c (struct line_head) [total_length]: Change type to
751         bfd_vma.
752         (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
753         (struct comp_unit): Add stash and offset_size.
754         (read_8_bytes): Return bfd_vma.
755         (read_indirect_string): New.
756         (read_attribute): Handle DW_FORM_strp.
757         (decode_line_info): Support 64-bit DWARF format.
758         (_bfd_dwarf2_find_nearest_line): Likewise.
759         (parse_comp_unit): Set offset_size and stash.
761 2001-11-13  Keith Walker <keith.walker@arm.com>
763         * dwarf2.c (read_attribute_value): New function to handle
764         DW_FORM_indirect.
765         (read_attribute): Use it.
767 2001-11-13  Geoffrey Keating  <geoffk@redhat.com>
769         * dwarf2.c (decode_line_info): Properly deal with unknown standard
770         opcodes.
772 2001-11-13  John Marshall  <jmarshall@acm.org>
773             Alan Modra  <amodra@bigpond.net.au>
775         * section.c (bfd_make_section_anyway): Don't increment section_id
776         and the BFD's section_count if adding the section failed.
777         * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
778         change.
780 2001-11-12  Orjan Friberg  <orjanf@axis.com>
782         * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
783         core dump format.
785 2001-11-11  H.J. Lu <hjl@gnu.org>
787         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
788         _bfd_elf_strtab_size instead of _bfd_stringtab_size.
790         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
791         dynstr type to `struct elf_strtab_hash *'.
793 2001-11-11  Hans-Peter Nilsson  <hp@bitrange.com>
795         * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
796         size_t.  Rename second i to j.
798 2001-11-10  Jeffrey A Law  (law@cygnus.com)
800         * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
802 2001-11-10  Alan Modra  <amodra@bigpond.net.au>
804         * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
805         relocs into shared libs.
806         * elf32-cris.c (cris_elf_relocate_section): Likewise.
807         * elf32-i370.c (i370_elf_relocate_section): Likewise.
808         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
809         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
810         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
811         * elf32-sh.c (sh_elf_relocate_section): Likewise.
812         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
813         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
814         * elf64-s390.c (elf_s390_relocate_section): Likewise.
815         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
816         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
817         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
819         * elf.c (bfd_section_from_r_symndx): New function.
820         * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
821         (struct sym_sec_cache): New.
822         (bfd_section_from_r_symndx): Declare.
823         (struct bfd_elf_section_data): Change local_dynrel type to PTR.
824         * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
825         relocs when relocatable.  Don't zero entire reloc, just zero the
826         addend and sym.
827         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
828         (elf32_hppa_link_hash_table_create): Init it.
829         (elf32_hppa_check_relocs): Track dynamic relocs needed for local
830         syms on a per-section basis as we do for globals.
831         (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
832         (allocate_dynrelocs): Warning fix.
833         (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
834         section has been discarded.
835         (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
836         into shared libs.
837         * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
838         (elf_i386_link_hash_table_create): Init it.
839         (elf_i386_check_relocs): Track dynamic relocs needed for local
840         syms on a per-section basis as we do for globals.
841         (elf_i386_gc_sweep_hook): Update for local_dynrel change.
842         Remove dead code.
843         (allocate_dynrelocs): Warning fix.
844         (elf_i386_size_dynamic_sections): Don't allocate relocs when
845         section has been discarded.
846         (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
847         into shared libs.
848         * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
849         (elf_s390_link_hash_table_create): Init it.
850         (elf_s390_check_relocs): Track dynamic relocs needed for local
851         syms on a per-section basis as we do for globals.
852         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
853         Remove dead code.
854         (allocate_dynrelocs): Warning fix.
855         (elf_s390_size_dynamic_sections): Don't allocate relocs when
856         section has been discarded.
857         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
858         into shared libs.
859         * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
860         (ppc64_link_hash_table_create): Init it.
861         (ppc64_elf_check_relocs): Track dynamic relocs needed for local
862         syms on a per-section basis as we do for globals.
863         (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
864         (allocate_dynrelocs): Call the correct record_dynamic_dymbol
865         function.  Warning fix.
866         (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
867         section has been discarded.
868         (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
869         into shared libs.
870         * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
871         (elf_s390_link_hash_table_create): Init it.
872         (elf_s390_check_relocs): Track dynamic relocs needed for local
873         syms on a per-section basis as we do for globals.
874         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
875         Remove dead code.
876         (allocate_dynrelocs): Warning fix.
877         (elf_s390_size_dynamic_sections): Don't allocate relocs when
878         section has been discarded.
879         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
880         into shared libs.
882 2001-11-08  Martin Schwidefsky  <schwidefsky@de.ibm.com>
884         * elf32-s390: Major rework that introduces all recent changes to
885         the s390 backends.  Get a closer match to elf32-i386.
886         (elf_s390_relocate_section): Make use of dynamic section short-cuts.
887         Localise vars, and delay setting.  Better error reporting, replace
888         BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
889         symbol is not defined in the regular object file and tread the weak
890         definition as the normal one.  Don't discard relocs for undefweak or
891         undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
892         test for avoided copy relocs.  Reinstate fudge for unresolved relocs
893         in debugging sections.
894         (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
895         reloc processing for weakdefs.  Remove redundant casts and aborts.
896         Delay setting of vars until needed.  Move creation of dynamic symbols
897         and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
898         BFD_ASSERT with abort.  Discard .plt entries for everything with
899         plt.refcount <= 0.
900         (elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
901         .got or .relgot here but do it in allocate_dynrelocs.  Reference count
902         possible .plt and .got entries.  Don't test input section SEC_READONLY
903         here to try to avoid copy relocs, and keep dyn_relocs regardless of
904         ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
905         variables until needed.  Remove separate switch stmt for creating .got
906         section.  Initialise local_got_refcounts to 0.  Cache pointer to
907         "sreloc" section in elf_section_data. Tweak condition under which .got
908         created.  Report files with bad relocation section names.
909         (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
910         have been forced local.  Use same test to decide if we can use a
911         relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
912         comment.  Move expressions out of function calls.  Replace BFD_ASSERT
913         with abort.
914         (elf_s390_finish_dynamic_sections): Migrate common code out of switch
915         statement.  Replace BFD_ASSERT with abort.
916         (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
917         to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
918         instead of looking up section names for DT_TEXTREL.  Replace
919         BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
920         Add a comment to remind us that one day this ought to be fixed.
921         (struct elf_s390_link_hash_entry): Rename "root" to "elf".
922         (struct elf_s390_link_hash_table): Likewise.
923         (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
924         rid of unnecessary casts.
925         (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
926         Remove "section" field.
927         (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
928         Reference count possible .plt entries.  Don't deallocate .got and
929         .relgot space here.
930         (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
931         Update comment.
932         (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
933         dyn_relocs.
934         (elf_s390_discard_copies):  Delete.
935         (elf_s390_link_hash_traverse): Delete.
936         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
937         rather than gc variety).
938         (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
939         srelplt, sdynbss, srelbss fields.
940         (elf_s390_link_hash_table_create): Init them.
941         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
942         (allocate_dynrelocs): New function.
943         (create_got_section): New function.
944         (elf_backend_can_refcount): Define.
945         (elf_backend_copy_indirect_symbol): Define.
946         (elf_s390_copy_indirect_symbol): New function.
947         (elf_s390_create_dynamic_sections): New function.
948         (readonly_dynrelocs): New function.
949         * elf64-s390.c: Likewise.
951 2001-11-07  Jakub Jelinek  <jakub@redhat.com>
953         * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
954         (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
955         (elf-strtab.lo): Add rule.
956         * Makefile.in: Rebuilt.
957         * configure.in (elf): Add elf-strtab.lo.
958         * configure: Rebuilt.
959         * elf-bfd.h (elf_strtab_hash): Forward declare.
960         (struct elf_link_hash_table): Change dynstr type to
961         struct elf_strtab_hash *.
962         (struct elf_obj_tdata): Change strtab_ptr type to
963         struct elf_strtab_hash *.
964         (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
965         _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
966         _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
967         _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
968         _bfd_elf_strtab_finalize): New prototypes.
969         * elf-strtab.c: New file.
970         * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
971         and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
972         Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
973         when forcing dynamic symbol to local.
974         (elf_link_create_dynamic_sections): Call
975         _bfd_elf_strtab_init instead of elf_stringtab_init.
976         (elf_link_record_local_dynamic_symbol): Likewise, change
977         dynstr type.  Use _bfd_elf_strtab functions instead of
978         _bfd_stringtab calls.
979         (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
980         _bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
981         call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
982         (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
983         (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
984         dynamic symbol to local.
985         (elf_link_assign_sym_version): Likewise.
986         (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
987         _bfd_stringtab_emit.
988         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
989         type.  Call _bfd_elf_strtab functions instead of
990         _bfd_stringtab functions.
991         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
992         * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
993         (elf_fake_sections): Likewise.
994         (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
995         on shstrtab hash table, call _bfd_elf_strtab_addref on each section
996         name in the output.  Call _bfd_elf_strtab_finalize and
997         use _bfd_elf_strtab_offset to finalize sh_name section header fields.
998         (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
999         instead of _bfd_stringtab_size.
1000         (prep_headers): Change shstrtab type.
1001         Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
1003 2001-11-07  Alan Modra  <amodra@bigpond.net.au>
1005         * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
1006         bad symtab segfault.  Formatting and warning fixes.  Improve
1007         error message for internationalisation.
1009 2001-11-06  H.J. Lu  (hjl@gnu.org)
1011         * elflink.h (elf_link_input_bfd): Complain about relocs against
1012         discarded sections.
1014 2001-11-03  Alan Modra  <amodra@bigpond.net.au>
1016         * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
1018 2001-11-02  H.J. Lu  <hjl@gnu.org>
1020         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1021         dynamic relocation for symbols defined in regular objects when
1022         creating executables.
1024 2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
1026         * configure.in (ALL_LINGUAS): Add "fr".
1027         * configure: Regenerate.
1028         * po/fr.po: New file.
1030         * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
1032 2001-11-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1034         * som.c (setup_sections): Initialize subspace_sections.
1036 2001-11-02  H.J. Lu  (hjl@gnu.org)
1038         * coffgen.c (coff_object_p): Return 0 if the header is too big.
1040 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
1042         * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1043         information.  Save bfd arch and mach values.  Restore on error.
1045 2001-11-02  Alan Modra  <amodra@bigpond.net.au>
1047         * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1048         (allocate_PIC_calls): New function.
1049         (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1050         (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1051         (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1053 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
1055         * elf32-cris.c (cris_elf_grok_prstatus): New function.
1056         (cris_elf_grok_psinfo): New function.
1057         (elf_backend_grok_prstatus): Define.
1058         (elf_backend_grok_psinfo): Define.
1060 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
1062         * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1063         prediction bits.
1065 2001-10-31  Chris Demetriou  <cgd@demetriou.com>
1067         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1068         relocations properly.
1070 2001-10-31  H.J. Lu <hjl@gnu.org>
1072         * elflink.h (elf_link_output_extsym): Don't clear the visibility
1073         field for relocateable.
1075 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
1077         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1078         .plt relocs in DT_RELASZ.
1080 2001-10-29  NIIBE Yutaka  <gniibe@m17n.org>
1082         * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1083         targets.
1085 2001-10-31  Nick Clifton  <nickc@cambridge.redhat.com>
1087         * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1089 2001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
1091         * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1092         (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1093         (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1094         Regenerate dependencies.
1095         * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1096         * config.bfd: [BFD64] (mmix-*-*): New case.
1097         * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1098         * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1099         (bfd_mmix_arch): Declare.
1100         (bfd_archures_list): Add bfd_mmix_arch.
1101         * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1102         (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1103         (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1104         bfd_mmo_mmix_vec.
1105         * reloc.c: Add MMIX relocations.
1106         * bfd.c (struct _bfd, tdata): Add mmo_data.
1107         * Makefile.in: Regenerate.
1108         * configure: Regenerate.
1109         * libbfd.h: Regenerate.
1110         * bfd-in2.h: Regenerate.
1111         * configure: Rebuild.
1113 2001-10-30  Richard Earnshaw (rearnsha@arm.com)
1115         * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1116         p_paddr of the segment that contains it.
1117         (copy_private_bfd_data): If the LMA for a segment is known, use it
1118         for matching sections to segments.
1119         (assign_file_positions_for_segments): Use the LMA when adjusting
1120         for inter-section alignment padding.
1122 2001-10-29  Kazu Hirata  <kazu@hxi.com>
1124         * README: Fix a typo.
1126 2001-10-24  Richard Henderson  <rth@redhat.com>
1128         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1129         timestamp to time_t for ctime.
1131 2001-10-24  Hans-Peter Nilsson  <hp@axis.com>
1133         * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1134         unsigned, increasing index.
1136 2001-10-23  H.J. Lu <hjl@gnu.org>
1138         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1139         m != NULL before accessing it.
1141 2001-10-23  Alan Modra  <amodra@bigpond.net.au>
1143         * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1144         bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1145         doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1147         * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1148         (hppa_link_hash_newfunc): Likewise.
1149         (elf32_hppa_finish_dynamic_symbol): Likewise.
1150         (allocate_dynrelocs): Always allocate .got relocs if shared.
1151         (elf32_hppa_relocate_section): Output them too.  Similarly
1152         consolidate .plt reloc code, and no longer initialise .plt
1153         when a reloc is output.
1154         (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1155         when no reloc is output.
1157         From Herbert Xu <herbert@gondor.apana.org.au>
1158         * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1159         unreachable branches.
1161 2001-10-22  H.J. Lu <hjl@gnu.org>
1163         * configure.in (WIN32LIBADD): Use -L../libiberty for
1164         mips*-*-linux*.
1165         * configure: Rebuild.
1167 2001-10-21  H.J. Lu <hjl@gnu.org>
1169         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1170         if shared library is enabled only for Linux hosts.
1171         * configure: Rebuild.
1173 2001-10-21  H.J. Lu <hjl@gnu.org>
1175         * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1176         ../libiberty/Makefile instead of $enable_shared.
1177         * configure: Rebuild.
1179 2001-10-21  H.J. Lu <hjl@gnu.org>
1181         * elf32-cris.c (cris_reloc_type_lookup): Use int for index.  Cover
1182         index 0.
1184 2001-10-20  H.J. Lu <hjl@gnu.org>
1186         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1187         if shared library is enabled.
1188         * configure: Rebuild.
1190 2001-10-20  H.J. Lu <hjl@gnu.org>
1192         * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1194 2001-10-19  H.J. Lu <hjl@gnu.org>
1196         * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1197         size is empty.
1199 2001-10-18  H.J. Lu <hjl@gnu.org>
1201         * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1202         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1204 2001-10-18  Jakub Jelinek  <jakub@redhat.com>
1206         * section.c (_bfd_strip_section_from_output): Don't count
1207         SEC_EXCLUDE sections as references.  Set SEC_EXCLUDE.
1209 2001-10-17  Alan Modra  <amodra@bigpond.net.au>
1211         * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1212         Elf_Internal_Shdr.contents now that it's no longer a PTR.
1213         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1214         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1215         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1216         * elf32-sh.c (sh_elf_relax_section): Likewise.
1217         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1218         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1219         * elf.c (setup_group): Warning fixes.
1220         * elflink.h (elf_link_sort_relocs): Likewise.
1221         * pdp11.c (slurp_reloc_table): Likewise.
1223 2001-10-16  Jeff Holcomb  <jeffh@redhat.com>
1225         * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1226         casts.
1228 2001-10-15  H.J. Lu <hjl@gnu.org>
1230         * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1231         for relocations against discarded link-once section.
1233 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
1235         * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1236         bfd_reloc_outofrange and similar errors.
1238         * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1239         rather than ind->weakdef.
1240         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1241         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1242         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1243         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1244         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1246 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
1247             H.J. Lu  <hjl@gnu.org>
1249         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1250         counts for aliases instead of aborting.
1251         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1252         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1254         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1255         to -1 for non-function symbols.
1256         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1257         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1258         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1259         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1260         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1261         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1262         plt.offset instead of plt.refcount when setting to -1.
1264 2001-10-12  Nick Clifton  <nickc@cambridge.redhat.com>
1266         * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1267         like R_ARM_PC24.  Include reloc number in error message about
1268         unresolvable relocs.
1270 2001-10-10  Jakub Jelinek  <jakub@redhat.com>
1272         * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1273         relocations against the same symbol in .rel{,a}.dyn section.
1275 2001-10-10  Kazu Hirata  <kazu@hxi.com>
1277         * aout-encap.c: Fix comment typos.
1278         * aoutx.h: Likewise.
1279         * archive.c: Likewise.
1280         * bout.c: Likewise.
1281         * coff64-rs6000.c: Likewise.
1282         * coffcode.h: Likewise.
1283         * coffgen.c: Likewise.
1284         * cofflink.c: Likewise.
1285         * coff-mips.c: Likewise.
1286         * ecoff.c: Likewise.
1287         * elf32-m32r.c: Likewise.
1288         * libcoff-in.h: Likewise.
1289         * libecoff.h: Likewise.
1290         * libxcoff.h: Likewise.
1291         * nlm32-i386.c: Likewise.
1292         * pdp11.c: Likewise.
1293         * section.c: Likewise.
1294         * som.c: Likewise.
1295         * som.h: Likewise.
1296         * bfd-in2.h: Regenerate.
1297         * libcoff.h: Likewise.
1299 2001-10-10  Alan Modra  <amodra@bigpond.net.au>
1301         * elf.c (elf_map_symbols): Don't create new section symbols; Use
1302         existing section syms.  Update comments.
1303         (copy_private_bfd_data): Formatting fixes.
1304         (elfcore_grok_win32pstatus): Likewise.
1305         (swap_out_syms): Likewise.  Remove unnecessary level of braces.
1307 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1309         * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1310         "group_name".
1311         (elf_group_name): Define.
1312         (elf_next_in_group): Define.
1313         * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1314         (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1315         first member section; Instead use elf_next_in_group.
1316         (bfd_section_from_shdr): Likewise.
1317         (set_group_contents): Likewise.  Use elf_section_syms, not sec->symbol.
1319 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1321         * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1322         "next_in_group".  Fix gp and gp_size comments.
1323         * elf.c (union elf_internal_group): New.
1324         (setup_group): New function.
1325         (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1326         Call setup_group for SHF_GROUP sections.
1327         (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1328         (elf_fake_sections): Set header type for SEC_GROUP, and header
1329         flags for sections in a group.
1330         (set_group_contents): New function.
1331         (_bfd_elf_compute_section_file_positions): Call it.
1332         (assign_section_numbers): Set sh_link for SHT_GROUP.
1334         * elflink.h (gc_mark_hook): Handle section groups.
1335         * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1336         * section.c (SEC_GROUP): Define.
1337         (struct sec): Comment fixes.
1338         * bfd-in2.h: Regenerate.
1340         * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1341         out of function args.
1342         (_bfd_elf_canonicalize_reloc): Similarly.
1343         (_bfd_elf_get_symtab): Here too.
1344         (_bfd_elf_canonicalize_dynamic_symtab): And here.
1345         * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1346         bfd_bread, and remove unnecessary cast.
1348 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
1350         * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1352 2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
1354         * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1355         compilation unit.
1357 2001-10-06  Alan Modra  <amodra@bigpond.net.au>
1359         * bfd.c (bfd_assert): Report bfd version.
1360         (_bfd_abort): Likewise.
1362         * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1363         section sym values.  Instead replace any relocs against them with
1364         relocs against STN_UNDEF, which has a zero value.
1366         * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1367         relocs.
1369 2001-10-05  Jeff Law <law@redhat.com>
1371         * som.h (som_exec_data): New field "version_id".
1372         * som.c (som_object_setup): Record the version_id if it
1373         exists.
1374         (som_prep_headers): Do not initialize version_id here.
1375         (som_finish_writing): Initialize version_id here.
1377 2000-10-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1379         * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1380         according to the MIPS/SGI ELF64 ABI Draft.
1381         (mips_elf_sort_hash_table): Typo.
1383 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1385         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1387         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1388         copying flags if this is a weakdef.
1390 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1392         * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1393         packing.
1395         * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1396         to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1397         (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1399         * Makefile.am (BFD_H_DEPS): Add symcat.h.  Ensure everything
1400         depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1401         backends we configure.  Run "make dep-am".
1402         (install-data-local): Install symcat.h.
1403         * dep-in.sed: Remove symcat.h from dependencies.
1404         * Makefile.in: Regenerate.
1406 2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
1408         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1410 2001-10-03  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1412         * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1413         (elf_backend_default_use_rela_p): New define.
1415 2001-10-03  Alan Modra  <amodra@bigpond.net.au>
1417         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1418         change.
1420         * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1421         * configure: Regenerate.
1422         * Makefile.am (BFD_H_FILES): Add version.h.
1423         * Makefile.in: Regenerate.
1424         * po/SRC-POTFILES.in: Regenerate.
1426         * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1427         elf_backend_copy_indirect_symbol so that backend has a chance to
1428         copy other necessary fields.
1429         * elf-bfd.h (struct elf_backend_data): Update description of
1430         elf_backend_copy_indirect_symbol.
1431         * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1432         copying flags if this is a weakdef.
1433         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1434         (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1435         than bfd_link_hash_lookup.
1436         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1437         reloc processing for weakdefs.
1438         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1439         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1441 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1443         * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1444         result of ELF64_R_TYPE to enum before using in a switch.
1445         (ppc64_elf_gc_mark_hook): Likewise.
1446         (ppc64_elf_gc_sweep_hook): Likewise.
1447         (ppc64_elf_reloc_type_class): Likewise.
1449 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1451         * version.h: New file.
1452         * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1453         (BFD_VERSION_DATE): Define.
1454         (BFD_VERSION_STRING): Define.
1455         * configure.in: AC_SUBST bfd_version, bfd_version_date and
1456         bfd_version_string.
1457         (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1458         * bfd-in2.h: Regenerate.
1459         * configure: Regenerate.
1460         * Makefile.am: Run "make dep-am".
1461         * Makefile.in: Regenerate.
1463         * bfd-in.h: Include "symcat.h".
1464         (CONCAT4): Redefine as for old CAT4.
1465         * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1466         Add warning regarding whitespace.
1467         * aout-cris.c: Likewise.
1468         * aout-ns32k.c: Likewise.
1469         * aout-sparcle.c: Likewise.
1470         * aout-tic30.c: Likewise.
1471         * aout0.c: Likewise.
1472         * armnetbsd.c: Likewise.
1473         * demo64.c: Likewise.
1474         * elf-bfd.h: Likewise.
1475         * gen-aout.c: Likewise.
1476         * host-aout.c: Likewise.
1477         * hp300bsd.c: Likewise.
1478         * hp300hpux.c: Likewise.
1479         * i386aout.c: Likewise.
1480         * i386bsd.c: Likewise.
1481         * i386dynix.c: Likewise.
1482         * i386freebsd.c: Likewise.
1483         * i386linux.c: Likewise.
1484         * i386lynx.c: Likewise.
1485         * i386mach3.c: Likewise.
1486         * i386netbsd.c: Likewise.
1487         * libaout.h: Likewise.
1488         * m68k4knetbsd.c: Likewise.
1489         * m68klinux.c: Likewise.
1490         * m68klynx.c: Likewise.
1491         * m68knetbsd.c: Likewise.
1492         * m88kmach3.c: Likewise.
1493         * mipsbsd.c: Likewise.
1494         * newsos3.c: Likewise.
1495         * ns32knetbsd.c: Likewise.
1496         * pc532-mach.c: Likewise.
1497         * pdp11.c: Likewise.
1498         * riscix.c: Likewise.
1499         * sparclinux.c: Likewise.
1500         * sparclynx.c: Likewise.
1501         * sparcnetbsd.c: Likewise.
1502         * sunos.c: Likewise.
1503         * targets.c: Likewise.
1504         * vaxnetbsd.c: Likewise.
1505         * vms-hdr.c: Likewise.
1507 2001-10-01  Alan Modra  <amodra@bigpond.net.au>
1509         * bfd-in.h: Remove comments regarding generated files.
1510         * libbfd-in.h: Likewise.
1511         * libcoff-in.h: Likewise.
1512         * bfd-in2.h: Regenerate.
1513         * libbfd.h: Likewise.
1514         * libcoff.h: Likewise.
1516 2001-09-30  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1517             Hans-Peter Nilsson  <hp@bitrange.com>
1519         * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1520         partial_inplace, matching assembler output.  Set src_mask to
1521         all ones.
1522         (sh_elf_relocate_section): Delete misplaced comment.
1523         For relocatable linking against section symbol, call
1524         _bfd_relocate_contents for partial_inplace relocs and adjust
1525         rel->r_addend for others.
1526         <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1527         bfd_get_32, not at rel->r_addend.
1529 2001-09-30  Alan Modra  <amodra@bigpond.net.au>
1531         * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1532         the old dir refcount, so we indirectly set them to init_refcount.
1533         Short-circuit asserts when we've just verified they are true.
1535 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1537         * section.c (struct sec): Remove kept_section.
1538         (STD_SECTION): Remove kept_section initialisation.
1539         (bfd_make_section_anyway): Here too.
1540         * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1541         * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1542         * elflink.h (elf_link_input_bfd): Set discarded link-once section
1543         symbols to zero, and remove all code involved with kept_section
1544         and tracking section symbol values.
1545         * bfd-in2.h: Regenerate.
1546         * configure.in: Bump version number.
1547         * configure: Regenerate.
1549 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1551         * elf64-ppc.c (struct ppc_dyn_relocs): New.
1552         (IS_ABSOLUTE_RELOC): Define.
1553         (struct ppc_link_hash_entry): New.
1554         (struct ppc_link_hash_table): New.
1555         (ppc_hash_table): Define.
1556         (link_hash_newfunc): New function.
1557         (ppc64_elf_link_hash_table_create): New function.
1558         (create_got_section): New function.
1559         (ppc64_elf_create_dynamic_sections): Call create_got_section.  Stash
1560         pointers to our dynamic sections in hash table.
1561         (ppc64_elf_copy_indirect_symbol): New function.
1562         (ppc64_elf_check_relocs): Remove DEBUG code.  Use short-cuts to
1563         dynamic sections.  Localise vars.  Modify code for refcounts
1564         starting from zero.  Don't allocate here, or force symbols dynamic.
1565         Don't copy all relocs if shared, select ones we need.  Add code
1566         to track possible copy relocs for non-shared link.
1567         (ppc64_elf_gc_mark_hook): Update comment.
1568         (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1569         (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code.  Rewrite .plt
1570         code for reference counting garbage collection.  Don't create .plt
1571         entries for functions that don't comply with ABI naming convention,
1572         and don't allocate .plt space here.  Use short-cuts to dynamic
1573         sections.  If possible, keep dynamic relocations instead of using
1574         copy relocs.  Remove confused comments.
1575         (ppc_adjust_dynindx): Delete.
1576         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1577         (allocate_dynrelocs): New function.
1578         (readonly_dynrelocs): New function.
1579         (ppc64_elf_size_dynamic_sections): Rewrite.  Allocate local .got
1580         space here, and call allocate_dynrelocs to allocate space for
1581         global .plt, .got and reloc sections.  Use short-cuts to dynamic
1582         sections.  Call readonly_dynrelocs to determine whether we need
1583         DT_TEXTREL.  Don't generate section symbols here, the generic
1584         ELF linker code does it for us.
1585         (ppc64_elf_final_link): Call regular ELF backend linker rather than
1586         gc variety, since we do our own .got handling.
1587         (ppc64_elf_relocate_section): Remove DEBUG code.  Make use of
1588         dynamic section short-cuts.  Localise vars, and delay setting.
1589         Handle unknown relocs in main switch statement.  Replace ugly
1590         complicated tests for unresolvable relocs with a simple direct
1591         scheme using "unresolved_reloc" var.  Test ELF_ST_VISIBILITY
1592         before allowing an undefined sym in a shared lib.  Do R_*_DS tests
1593         after main switch, when we've set addend.  Do non-addend insn
1594         tweaks before main swithc.  Ignore input_section->vma when
1595         calculating reloc offsets as it's always zero.  Rewrite dynamic
1596         reloc handling.  Consolidate R_*_HA handling.  Handle more relocs.
1597         (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code.  Make use
1598         of dynamic section short-cuts.  Reorganise .plt handling code.
1599         Remove confused comments.  Take note of ELF_LINK_FORCED_LOCAL.
1600         Move expressions out of swap_reloca_out function calls.
1601         (ppc64_elf_reloc_type_class): New function.
1602         (ppc64_elf_info_to_howto): Move common expression to local var.
1603         (ppc64_elf_finish_dynamic_sections): Remove DEBUG code.  Make use
1604         of dynamic section short-cuts.  Don't fiddle with section syms
1605         here as the ELF linker does it for us.
1606         (elf_backend_can_refcount): Define.
1607         (bfd_elf64_bfd_link_hash_table_create): Define.
1608         (elf_backend_copy_indirect_symbol): Define.
1609         (elf_backend_reloc_type_class): Define.
1610         (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1612 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1614         * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1615         (struct elf_backend_data): Add can_refcount.
1616         * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts.  Set
1617         got.refcount and plt.refcount from init_refcount.
1618         (_bfd_elf_link_hash_table_init): Set up init_refcount.
1619         (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1620         rather than got/plt.offset, and test for <= 0 rather than -1.
1621         * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1622         * elfxx-target.h (elf_backend_can_refcount): Define.
1623         (elfNN_bed): Init can_refcount.
1624         * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1625         (_bfd_generic_link_hash_newfunc): Likewise.
1626         * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1627         starting from zero.
1628         (elf_backend_can_refcount): Define.
1629         * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1630         starting from zero.
1631         (elf32_hppa_copy_indirect_symbol): Make static to agree with
1632         prototype.
1633         (elf_backend_can_refcount): Define.
1634         * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1635         starting from zero.
1636         (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1637         (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1638         (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1639         (elf_backend_can_refcount): Define.
1640         (elf_i386_copy_indirect_symbol): Make static to agree with
1641         prototype.  Formatting fix.
1642         * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1643         starting from zero.
1644         (elf_backend_can_refcount): Define.
1645         * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1646         starting from zero.
1647         (elf_backend_can_refcount): Define.
1648         * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1649         starting from zero.
1650         (elf_backend_can_refcount): Define.
1651         * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1652         starting from zero.
1653         (elf_backend_can_refcount): Define.
1654         * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1655         starting from zero.
1656         (elf_backend_can_refcount): Define.
1658         * som.c (som_write_symbol_strings): Cast current_offset in
1659         bfd_seek call to match param type.
1661 2001-09-28  J. Brobecker <brobecker@gnat.com>
1663         * som.c (som_write_symbol_strings): Fix incorrect type of
1664         current_offset to match the function definition. Fixes a build
1665         failure on HPUX-11.00.
1667 2001-09-28  Richard Henderson  <rth@redhat.com>
1669         * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1670         SEC_MERGE, SEC_STRINGS.
1672         * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1673         * bfd-in2.h: Rebuild.
1675 2001-09-28  Alan Modra  <amodra@bigpond.net.au>
1677         * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1678         reloc code using x86_64_reloc_map.
1680         * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1681         no longer allocate here.  Localise some vars to blocks where they
1682         are used.
1683         (elf32_hppa_adjust_dynamic_symbol): Correct a comment.  Delay
1684         setting of vars until needed.
1685         (allocate_dynrelocs): Don't create a .plt entry without a reloc
1686         when symbol visibilty makes a function local.
1687         (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1688         swap_reloca_out function calls.
1689         (elf32_hppa_relocate_section): Likewies.  Comment typo fix.
1690         (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1691         switch statement.
1693         * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1694         no longer allocate here.  Localise some vars to blocks where they
1695         are used.  Remove separate switch stmt for creating .got sec.
1696         (elf_i386_adjust_dynamic_symbol): Correct a comment.  Remove
1697         redundant casts and aborts.  Delay setting of vars until needed.
1698         (allocate_dynrelocs): Remove redundant casts and aborts.
1699         (elf_i386_size_dynamic_sections): Move comment.
1700         (elf_i386_finish_dynamic_symbol): Move expressions out of function
1701         calls.
1702         (elf_i386_relocate_section): Likewise.  Comment typo fix.
1703         (elf_i386_finish_dynamic_sections): Migrate common code out of
1704         switch statement.
1705         (elf_backend_* defines): Sort.
1707         * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1708         without a reloc when symbol visibilty makes a function local.
1710 2001-09-27  Nick Clifton  <nickc@cambridge.redhat.com>
1712         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1713         conflicting float flags.
1715 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1717         * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1718         (elf_backend_copy_indirect_symbol): Define.
1719         (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1720         (struct elf_i386_link_hash_table): Likewise.
1721         (link_hash_newfunc): Get rid of unnecessary casts.
1722         (elf_i386_link_hash_table_create): Likewise.
1723         (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1724         Don't test input section SEC_READONLY here to try to avoid copy
1725         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1726         (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1727         here to properly test whether we need copy relocs.  Do so for weak
1728         syms too.
1730         * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1731         (elf_backend_copy_indirect_symbol): Define.
1732         (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1733         (stub_hash_newfunc): Get rid of unnecessary casts.
1734         (hppa_link_hash_newfunc): Likewise.
1735         (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1736         Don't test input section SEC_READONLY here to try to avoid copy
1737         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1738         (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1739         here to properly test whether we need copy relocs.  Do so for weak
1740         syms too.
1742 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1744         * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1745         VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1746         (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1748 2001-09-25  Jakub Jelinek  <jakub@redhat.com>
1750         * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1751         computation.
1753 2001-09-25  H.J. Lu  <hjl@gnu.org>
1755         * bfd-in2.h: Regenerated.
1757 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1759         * elf32-i386.c: Add comment re linker function names and ordering.
1760         (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1761         (elf_i386_grok_prstatus): Move before linker functions.
1762         (elf_i386_grok_psinfo): Likewise.
1763         (elf_i386_fake_sections): Move so that functions are ordered.
1764         (elf_i386_reloc_type_class): Likewise.  Comment function purpose.
1766 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1768         * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1769         throughout file.
1771         * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete.  Remove all
1772         code handling this option.
1773         (LONG_BRANCH_VIA_PLT): Likewise.
1774         (RELATIVE_DYNRELOCS): Define as zero.
1775         (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1776         "pc_count" fields.  Remove "section" field.
1777         (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1778         (elf32_hppa_check_relocs): Don't allocate space for dynamic
1779         relocs here.  Instead, record all needed dynamic relocs via
1780         dyn_relocs and local_dynrel.  Cache pointer to "sreloc" section
1781         in elf_section_data.
1782         (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1783         (allocate_plt_and_got_and_discard_relocs): Rename to
1784         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1785         (readonly_dynrelocs): New function.
1786         (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1787         Call readonly_dynrelocs to determine need for DT_TEXTREL.
1788         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1789         (elf32_hppa_relocate_section): Make use of cached sreloc.
1790         (elf32_hppa_reloc_type_class): New function.
1791         (elf_backend_reloc_type_class): Define.
1793 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1795         * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1796         and "sreloc" fields.
1797         * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1798         "pc_count" fields.  Remove "section" field.
1799         (elf_i386_check_relocs): Don't set DF_TEXTREL here.  Don't
1800         allocate space for dynamic relocs here.  Instead, record all
1801         needed dynamic relocs via dyn_relocs and local_dynrel.  Cache
1802         pointer to "sreloc" section in elf_section_data.
1803         (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1804         (allocate_plt_and_got_and_discard_relocs): Rename to
1805         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1806         (readonly_dynrelocs): New function.
1807         (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1808         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1809         (elf_i386_relocate_section): Make use of cached sreloc.
1811 2001-09-24  Alan Modra  <amodra@bigpond.net.au>
1813         * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1814         reloc rather than just the type.
1815         (_bfd_elf_reloc_type_class): Likewise.
1816         * elf.c (_bfd_elf_reloc_type_class): Likewise.
1817         * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1818         * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1819         * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1820         * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1821         * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1822         * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1823         * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1824         * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1825         * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1826         * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1827         * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1828         * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1829         * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1830         * elflink.h: Formatting fixes.
1831         (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1832         Call bfd_zmalloc rather than calloc.  Remove unnecessary cast of
1833         o->contents to PTR.  Update call to elf_backend_reloc_type_class.
1835 2001-09-22  John Reiser  <jreiser@BitWagon.com>
1837         * elfcode.h (elf_object_p): Allow for no section header at all in
1838         non-ET_REL files.  Honor 0 for e_shnum, e_shstrndx, e_shoff.
1840 2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
1842         * elfxx-ia64.c: Fix compile time warning messages.
1843         * coff-mcore.c: Fix compile time warning messages.
1844         * coff-ppc.c: Fix compile time warning messages.
1845         * coffcode.h: Fix compile time warning messages.
1846         * elf32-mips.c: Fix compile time warning messages.
1847         * elf64-alpha.c: Fix compile time warning messages.
1848         * libbfd.c: Fix compile time warning messages.
1849         * bfd-in2.h: Regenerate.
1851 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1853         * Makefile.am: Run "make dep-am".
1854         * Makefile.in: Regenerate.
1856         * aoutx.h: Formatting fixes.
1857         * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1859         * linker.c: Replace bfd_get_filename with bfd_archive_filename
1860         in error message.
1862 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1864         * bfd.c (bfd_archive_filename): New function.
1865         * bfd-in2.h: Regenerate.
1866         * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1867         in error messages where the bfd is an input bfd.
1868         * aout-cris.c: Likewise.
1869         * coff-arm.c: Likewise.
1870         * coff-mcore.c: Likewise.
1871         * coff-ppc.c: Likewise.
1872         * coff-rs6000.c: Likewise.
1873         * coff-sh.c: Likewise.
1874         * coff-tic54x.c: Likewise.
1875         * coff-tic80.c: Likewise.
1876         * coff64-rs6000.c: Likewise.
1877         * coffcode.h: Likewise.
1878         * coffgen.c: Likewise.
1879         * cofflink.c: Likewise.
1880         * ecofflink.c: Likewise.
1881         * elf-hppa.h: Likewise.
1882         * elf.c: Likewise.
1883         * elf32-arm.h: Likewise.
1884         * elf32-cris.c: Likewise.
1885         * elf32-gen.c: Likewise.
1886         * elf32-hppa.c: Likewise.
1887         * elf32-i370.c: Likewise.
1888         * elf32-i386.c: Likewise.
1889         * elf32-m32r.c: Likewise.
1890         * elf32-mcore.c: Likewise.
1891         * elf32-mips.c: Likewise.
1892         * elf32-ppc.c: Likewise.
1893         * elf32-s390.c: Likewise.
1894         * elf32-sh.c: Likewise.
1895         * elf32-sparc.c: Likewise.
1896         * elf32-v850.c: Likewise.
1897         * elf64-alpha.c: Likewise.
1898         * elf64-gen.c: Likewise.
1899         * elf64-ppc.c: Likewise.
1900         * elf64-s390.c: Likewise.
1901         * elf64-sparc.c: Likewise.
1902         * elf64-x86-64.c: Likewise.
1903         * elflink.h: Likewise.
1904         * elfxx-ia64.c: Likewise.
1905         * ieee.c: Likewise.
1906         * ihex.c: Likewise.
1907         * libbfd.c: Likewise.
1908         * pdp11.c: Likewise.
1909         * pe-mips.c: Likewise.
1910         * peicode.h: Likewise.
1911         * srec.c: Likewise.
1912         * xcofflink.c: Likewise.
1914         * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1916         * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1917         error message.
1919         * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1920         error message.
1922         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1923         Consolidate error messages, and split long messages to two lines.
1925 2001-09-20  John Reiser  <jreiser@BitWagon.com>
1927         * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1928         and info->allow_shlib_undefined.
1929         * elf32-cris.c: Likewise.
1930         * elf32-hppa.c: Likewise.
1931         * elf32-m68k.c: Likewise.
1932         * elf32-mips.c: Likewise.
1933         * elf32-ppc.c: Likewise.
1934         * elf32-s390.c: Likewise.
1935         * elf32-sh.c: Likewise.
1936         * elf32-sparc.c: Likewise.
1937         * elf64-alpha.c: Likewise.
1938         * elf64-hppa.c: Likewise.
1939         * elf64-ppc.c: Likewise.
1940         * elf64-s390.c: Likewise.
1941         * elf64-sparc.c: Likewise.
1942         * elf64-x86-64.c: Likewise.
1943         * elfxx-ia64.c: Likewise.
1945 2001-09-18  Bruno Haible  <haible@clisp.cons.org>
1947         * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1948         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1949         * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1950         (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1951         * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1952         (bfd_default_scan): Use ISDIGIT instead of isdigit.
1953         * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1954         (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1955         isxdigit/isdigit/islower.
1956         * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1957         (mangle_name): Use ISALNUM instead of isalnum.
1958         * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1959         (scan): Use ISDIGIT instead of isdigit.
1960         * hosts/alphavms.h: Don't include <ctype.h>.
1961         * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1962         (ieee_object_p): Use TOUPPER instead of toupper.
1963         * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1964         (ihex_bad_byte): Use ISPRINT instead of isprint.
1965         * merge.c: Don't include <ctype.h>.
1966         * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1967         (oasys_write_sections): Use ISDIGIT instead of isdigit.
1968         * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1969         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1970         * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1971         (mangle_name): Use ISALNUM instead of isalnum.
1972         * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1973         (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1974         isupper/islower/isdigit.
1975         (som_decode_symclass): Use TOUPPER instead of toupper.
1976         * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1977         (srec_bad_byte): Use ISPRINT instead of isprint.
1978         (srec_scan): Use ISSPACE instead of isspace.
1979         * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1980         (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1981         * syms.c: Include "safe-ctype.h"
1982         (islower, toupper): Remove macro definitions.
1983         (bfd_decode_symclass): Use TOUPPER instead of toupper.
1984         * vms-gsd.c: Don't include <ctype.h>.
1985         * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1986         (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1987         islower/toupper.
1988         * vms-tir.c: Don't include <ctype.h>.
1990 2001-09-18  Alan Modra  <amodra@bigpond.net.au>
1992         * libbfd.c (bfd_bread): New function replacing bfd_read without
1993         redundant params.  Allow reads up to (size_t) -2 in length.
1994         (bfd_bwrite): Similarly for bfd_write.
1995         (real_read): Return a size_t.
1996         (bfd_read): Call bfd_bread.
1997         (bfd_write): Call bfd_bwrite.
1998         (warn_deprecated): New function to annoy everybody.
1999         (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
2000         * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
2001         (bfd_read, bfd_write): Define as macro.
2002         * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
2003         likewise for bfd_write.  Ensure function args are correct size by
2004         using casts or local vars.  In some cases, remove unnecessary
2005         casts.  Formatting fixes, in some cases removing a large expression
2006         from function args by using a local var.  Replace CONST with const.
2007         Modify variable types to avoid warings.  Use casts to avoid
2008         warnings when using negative numbers in unsigned expressions.
2009         * aout-adobe.c: Likewise.
2010         * aout-arm.c: Likewise.
2011         * aout-cris.c: Likewise.
2012         * aout-encap.c: Likewise.
2013         * aout-ns32k.c: Likewise.
2014         * aout-target.h: Likewise.
2015         * aout-tic30.c: Likewise.
2016         * aoutf1.h: Likewise.
2017         * aoutx.h: Likewise.
2018         * archive.c: Likewise.
2019         * archures.c: Likewise.
2020         * bfd-in.h: Likewise.
2021         * bfd.c: Likewise.
2022         * binary.c: Likewise.
2023         * bout.c: Likewise.
2024         * cache.c: Likewise.
2025         * cisco-core.c: Likewise.
2026         * coff-a29k.c: Likewise.
2027         * coff-alpha.c: Likewise.
2028         * coff-arm.c: Likewise.
2029         * coff-h8300.c: Likewise.
2030         * coff-h8500.c: Likewise.
2031         * coff-i386.c: Likewise.
2032         * coff-i860.c: Likewise.
2033         * coff-i960.c: Likewise.
2034         * coff-ia64.c: Likewise.
2035         * coff-m68k.c: Likewise.
2036         * coff-m88k.c: Likewise.
2037         * coff-mcore.c: Likewise.
2038         * coff-mips.c: Likewise.
2039         * coff-ppc.c: Likewise.
2040         * coff-rs6000.c: Likewise.
2041         * coff-sh.c: Likewise.
2042         * coff-sparc.c: Likewise.
2043         * coff-stgo32.c: Likewise.
2044         * coff-tic30.c: Likewise.
2045         * coff-tic54x.c: Likewise.
2046         * coff-tic80.c: Likewise.
2047         * coff-w65.c: Likewise.
2048         * coff-z8k.c: Likewise.
2049         * coff64-rs6000.c: Likewise.
2050         * coffcode.h: Likewise.
2051         * coffgen.c: Likewise.
2052         * cofflink.c: Likewise.
2053         * coffswap.h: Likewise.
2054         * corefile.c: Likewise.
2055         * cpu-arc.c: Likewise.
2056         * cpu-h8300.c: Likewise.
2057         * cpu-h8500.c: Likewise.
2058         * cpu-i960.c: Likewise.
2059         * cpu-ia64-opc.c: Likewise.
2060         * cpu-ns32k.c: Likewise.
2061         * cpu-pdp11.c: Likewise.
2062         * cpu-pj.c: Likewise.
2063         * cpu-sh.c: Likewise.
2064         * cpu-w65.c: Likewise.
2065         * cpu-z8k.c: Likewise.
2066         * dwarf1.c: Likewise.
2067         * dwarf2.c: Likewise.
2068         * ecoff.c: Likewise.
2069         * ecofflink.c: Likewise.
2070         * ecoffswap.h: Likewise.
2071         * elf-bfd.h: Likewise.
2072         * elf-hppa.h: Likewise.
2073         * elf-m10200.c: Likewise.
2074         * elf-m10300.c: Likewise.
2075         * elf.c: Likewise.
2076         * elf32-arc.c: Likewise.
2077         * elf32-arm.h: Likewise.
2078         * elf32-avr.c: Likewise.
2079         * elf32-cris.c: Likewise.
2080         * elf32-fr30.c: Likewise.
2081         * elf32-gen.c: Likewise.
2082         * elf32-h8300.c: Likewise.
2083         * elf32-hppa.c: Likewise.
2084         * elf32-i370.c: Likewise.
2085         * elf32-i386.c: Likewise.
2086         * elf32-i860.c: Likewise.
2087         * elf32-m32r.c: Likewise.
2088         * elf32-m68k.c: Likewise.
2089         * elf32-mcore.c: Likewise.
2090         * elf32-mips.c: Likewise.
2091         * elf32-openrisc.c: Likewise.
2092         * elf32-pj.c: Likewise.
2093         * elf32-ppc.c: Likewise.
2094         * elf32-s390.c: Likewise.
2095         * elf32-sh-lin.c: Likewise.
2096         * elf32-sh.c: Likewise.
2097         * elf32-sparc.c: Likewise.
2098         * elf32-v850.c: Likewise.
2099         * elf64-alpha.c: Likewise.
2100         * elf64-hppa.c: Likewise.
2101         * elf64-mips.c: Likewise.
2102         * elf64-ppc.c: Likewise.
2103         * elf64-s390.c: Likewise.
2104         * elf64-sparc.c: Likewise.
2105         * elf64-x86-64.c: Likewise.
2106         * elfarm-nabi.c: Likewise.
2107         * elfcode.h: Likewise.
2108         * elfcore.h: Likewise.
2109         * elflink.c: Likewise.
2110         * elflink.h: Likewise.
2111         * elfxx-ia64.c: Likewise.
2112         * elfxx-target.h: Likewise.
2113         * format.c: Likewise.
2114         * hash.c: Likewise.
2115         * hp300hpux.c: Likewise.
2116         * hppabsd-core.c: Likewise.
2117         * hpux-core.c: Likewise.
2118         * i386aout.c: Likewise.
2119         * i386dynix.c: Likewise.
2120         * i386linux.c: Likewise.
2121         * i386lynx.c: Likewise.
2122         * i386mach3.c: Likewise.
2123         * i386msdos.c: Likewise.
2124         * i386os9k.c: Likewise.
2125         * ieee.c: Likewise.
2126         * ihex.c: Likewise.
2127         * irix-core.c: Likewise.
2128         * libaout.h: Likewise.
2129         * libbfd-in.h: Likewise.
2130         * libbfd.c: Likewise.
2131         * libcoff-in.h: Likewise.
2132         * libecoff.h: Likewise.
2133         * libieee.h: Likewise.
2134         * libnlm.h: Likewise.
2135         * libpei.h: Likewise.
2136         * libxcoff.h: Likewise.
2137         * linker.c: Likewise.
2138         * lynx-core.c: Likewise.
2139         * m68klinux.c: Likewise.
2140         * merge.c: Likewise.
2141         * mipsbsd.c: Likewise.
2142         * netbsd-core.c: Likewise.
2143         * nlm.c: Likewise.
2144         * nlm32-alpha.c: Likewise.
2145         * nlm32-i386.c: Likewise.
2146         * nlm32-ppc.c: Likewise.
2147         * nlm32-sparc.c: Likewise.
2148         * nlmcode.h: Likewise.
2149         * nlmswap.h: Likewise.
2150         * ns32k.h: Likewise.
2151         * oasys.c: Likewise.
2152         * opncls.c: Likewise.
2153         * osf-core.c: Likewise.
2154         * pc532-mach.c: Likewise.
2155         * pdp11.c: Likewise.
2156         * pe-mips.c: Likewise.
2157         * peXXigen.c: Likewise.
2158         * peicode.h: Likewise.
2159         * ppcboot.c: Likewise.
2160         * ptrace-core.c: Likewise.
2161         * reloc.c: Likewise.
2162         * reloc16.c: Likewise.
2163         * riscix.c: Likewise.
2164         * rs6000-core.c: Likewise.
2165         * sco5-core.c: Likewise.
2166         * section.c: Likewise.
2167         * som.c: Likewise.
2168         * sparclinux.c: Likewise.
2169         * sparclynx.c: Likewise.
2170         * srec.c: Likewise.
2171         * stabs.c: Likewise.
2172         * sunos.c: Likewise.
2173         * syms.c: Likewise.
2174         * targets.c: Likewise.
2175         * tekhex.c: Likewise.
2176         * trad-core.c: Likewise.
2177         * versados.c: Likewise.
2178         * vms-gsd.c: Likewise.
2179         * vms-hdr.c: Likewise.
2180         * vms-misc.c: Likewise.
2181         * vms-tir.c: Likewise.
2182         * vms.c: Likewise.
2183         * vms.h: Likewise.
2184         * xcofflink.c: Likewise.
2185         * bfd-in2.h: Regenerate.
2186         * libbfd.h: Regenerate.
2187         * libcoff.h: Regenerate.
2189         * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2190         * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2191         (ufile_ptr): Define.
2192         (bfd_tell): Return a ufile_ptr.
2193         * libbfd.c (bfd_tell): Likewise.
2194         (bfd_seek): Use bfd_size_type locals.  Don't call bfd_set_error
2195         unnecessarily.
2196         * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2197         * aoutf1.h: Likewise.
2198         * som.c: Likewise.
2199         * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2200         larger than unsigned long can represent.
2202         * libbfd.c (bfd_malloc): Take a bfd_size_type arg.  Error if
2203         size overflows size_t.
2204         (bfd_realloc): Likewise.
2205         (bfd_zmalloc): Likewise.
2206         * opncls.c (bfd_alloc): Likewise.
2207         (bfd_zalloc): Likewise.
2208         * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2209         (bfd_alloc, bfd_zalloc): Update.
2211         * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2212         8 bits.
2213         (bfd_get_signed_8): Likewise.
2214         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2215         H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2216         H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2217         H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2218         * libaout.h: Likewise define and use here.
2219         * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2220         * aout-arm.c: Likewise.
2221         * aout-encap.c: Likewise.
2222         * aout-ns32k.c: Likewise.
2223         * aout-tic30.c: Likewise.
2224         * aoutf1.h: Likewise.
2225         * aoutx.h: Likewise.
2226         * bout.c: Likewise.
2227         * coff-alpha.c: Likewise.
2228         * coff-h8300.c: Likewise.
2229         * coff-h8500.c: Likewise.
2230         * coff-i960.c: Likewise.
2231         * coff-ia64.c: Likewise.
2232         * coff-m88k.c: Likewise.
2233         * coff-mips.c: Likewise.
2234         * coff-ppc.c: Likewise.
2235         * coff-rs6000.c: Likewise.
2236         * coff-sh.c: Likewise.
2237         * coff-sparc.c: Likewise.
2238         * coff-stgo32.c: Likewise.
2239         * coff-tic30.c: Likewise.
2240         * coff-tic80.c: Likewise.
2241         * coff-w65.c: Likewise.
2242         * coff-z8k.c: Likewise.
2243         * coff64-rs6000.c: Likewise.
2244         * coffgen.c: Likewise.
2245         * cofflink.c: Likewise.
2246         * coffswap.h: Likewise.
2247         * ecoff.c: Likewise.
2248         * ecoffswap.h: Likewise.
2249         * elf.c: Likewise.
2250         * elf32-mips.c: Likewise.
2251         * elf64-mips.c: Likewise.
2252         * hp300hpux.c: Likewise.
2253         * i386dynix.c: Likewise.
2254         * i386lynx.c: Likewise.
2255         * i386msdos.c: Likewise.
2256         * i386os9k.c: Likewise.
2257         * libpei.h: Likewise.
2258         * nlm32-alpha.c: Likewise.
2259         * nlm32-i386.c: Likewise.
2260         * nlm32-ppc.c: Likewise.
2261         * nlmcode.h: Likewise.
2262         * nlmswap.h: Likewise.
2263         * oasys.c: Likewise.
2264         * pdp11.c: Likewise.
2265         * pe-mips.c: Likewise.
2266         * peXXigen.c: Likewise.
2267         * peicode.h: Likewise.
2268         * riscix.c: Likewise.
2269         * sunos.c: Likewise.
2270         * xcofflink.c: Likewise.
2271         * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2272         Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2273         * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2274         equivalent H_PUT_* macro instead.
2275         (GETWORD, GETHALF, GETBYTE): Similarly.
2276         * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2277         (GETWORD, GETHALF, GETBYTE): Likewise.
2278         * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2280         * bfd-in.h (struct orl): Change "pos" to a union.
2281         * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2282         (bsd_write_armap): Here too.
2283         (coff_write_armap): And here.
2284         * coff-rs6000.c (xcoff_write_armap_old): And here.
2285         (xcoff_write_one_armap_big): And here.
2286         (xcoff_write_armap_big): And here.
2287         * ecoff.c (_bfd_ecoff_write_armap): And here.
2288         * elf64-mips.c (mips_elf64_write_armap): And here.
2290         * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2291         * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2292         * elf32-h8300.c (elf32_h8_mach): Likewise.
2293         * elf32-mips.c (elf_mips_mach): Likewise.
2294         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2296         * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2297         calls.
2298         (aix386_core_vec): Typo fix.
2300         * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2301         etc. to avoid redefined macro warning.
2302         (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2303         (MY(fix_pcrel_26)): Likewise.
2304         * aout-ns32k.c (MY(put_reloc)): Likewise.
2305         * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2306         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2307         * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2309         * aout-encap.c: Include "file", not <file> for binutils headers.
2310         (encap_object_p): Half baked attempt to fix compile errors in
2311         code dealing with "magic".
2313         * aout-ns32k.c: Include "file", not <file> for binutils headers.
2314         (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2315         bfd_vma's rather than longs.
2316         * cpu-ns32k.c (ns32k_sign_extend): Delete.
2317         (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2318         (_bfd_ns32k_get_immediate): Likewise.  Add code for 8 byte values,
2319         remove case 3.
2320         (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2321         Use unsigned comparisons.
2322         (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2323         (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2324         (_bfd_do_ns32k_reloc_contents): Likewise.
2325         * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2326         (_bfd_ns32k_get_immediate): Likewise.
2327         (_bfd_ns32k_put_displacement): Likewise.
2328         (_bfd_ns32k_put_immediate): Likewise.
2329         (bfd_reloc_status_type): Likewise.
2331         * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2332         to avoid shadowing.
2333         * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2334         * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2335         * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2336         avoid shadowing.
2337         (record_toc): Use a bfd_signed_vma for our_toc_offset.
2338         * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2339         * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2340         shadow warning.
2341         (_bfd_elfcore_strndup): Likewise for "dup".
2342         * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2343         "name" to avoid shadowing.
2344         * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2345         definition of "off".
2346         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2347         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2348         definition of "s".
2349         (_bfd_mips_elf_final_link): Rename "i" to "j".  Remove duplicate
2350         "secpp".
2351         * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2352         to avoid shadowing.
2353         * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2354         to avoid shadowing.
2355         (elf_link_input_bfd): Likewise.
2356         (elf_bfd_final_link): Remove duplicate innermost "off" var.
2357         * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2358         * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2359         "input_section".
2360         * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2361         * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2362         (sunos_write_dynamic_symbol): Remove unused vars.
2363         * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2364         innermost "directory_name" and "file_name" vars.
2365         * tekhex.c (first_phase): Rename local var "type" to "stype".
2366         (tekhex_write_object_contents): Rename innermost "s" to "sym".
2367         * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2368         doing comparison at caller.
2369         (vms_esecflag_by_name): Likewise.
2370         * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2371         * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2372         (xcoff_write_global_symbol): Rename "p" param to "inf".
2374         * cisco-core.c: Add missing prototypes.
2375         (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2376         (cisco_core_file_failing_signal): Likewise.
2377         (cisco_core_file_matches_executable_p): Likewise.
2378         * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2379         * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2380         * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2381         * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2383         * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2384         thumb_glue_size and arm_glue_size.
2385         * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2387         * coff64-rs6000.c: Group prototypes together.
2389         * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2390         (buy_and_read): Remove "seek" param.  Change "size" to bfd_size_type.
2392         * cpu-arc.c: Add missing prototypes.
2393         * cpu-h8500.c: Likewise.
2394         * cpu-i960.c: Likewise.
2395         * cpu-pj.c: Likewise.
2396         * cpu-sh.c: Likewise.
2397         * cpu-w65.c: Likewise.
2398         * cpu-z8k.c: Likewise.
2399         * elf32-fr30.c: Likewise.
2400         * elf32-h8300.c: Likewise.
2401         * elf32-i370.c: Likewise.
2402         * hpux-core.c: Likewise.
2403         * versados.c: Likewise.
2405         * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2406         * cpu-h8500.c: Likewise.
2407         * cpu-i960.c: Likewise.
2408         * cpu-z8k.c: Likewise.
2410         * cpu-ia64-opc.c: Correct comment.
2412         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2414         * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2415         to unsigned.
2416         (bfd_elf32_write_out_phdrs): Likewise.
2417         (bfd_elf64_write_out_phdrs): Likewise.
2418         (elf_linker_section_pointers): Change addend to bfd_vma.
2419         (_bfd_elf_find_pointer_linker_section): Likewise.
2420         (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2421         filepos to unsigned file_ptr.
2422         (_bfd_elfcore_strndup): Change max param to size_t.
2423         * elf.c (_bfd_elfcore_make_pseudosection): As above.
2424         (_bfd_elfcore_strndup): Likewise.
2425         (_bfd_elf_find_pointer_linker_section): Likewise.
2427         * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2428         insn and sym_value to ints.
2430         * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2431         bfd_size_type.
2432         (elfcore_read_notes): Likewise.
2434         * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2435         param from unsigned char to int.
2436         (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2437         for info_to_howto call.
2438         (add_dynamic_entry): Define macro.
2439         (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2441         * elf32-cris.c (add_dynamic_entry): Define macro.
2442         (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2444         * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2445         (elf32_h8_object_p): Likewise.
2446         (elf32_h8_merge_private_bfd_data): Likewise.
2447         (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2449         * elf32-hppa.c (add_dynamic_entry): Define macro.
2450         (elf32_hppa_size_dynamic_sections): Use it.
2451         * elf32-i370.c (add_dynamic_entry): Define macro.
2452         (i370_elf_size_dynamic_sections): Use it.
2453         (i370_noop): Make static.
2454         * elf32-i386.c (add_dynamic_entry): Define macro.
2455         (elf_i386_size_dynamic_sections): Use it.
2456         * elf32-m68k.c (add_dynamic_entry): Define macro.
2457         (elf_m68k_size_dynamic_sections): Use it.
2458         * elf32-ppc.c (add_dynamic_entry): Define macro.
2459         (ppc_elf_size_dynamic_sections): Use it.
2460         * elf32-s390.c (add_dynamic_entry): Define macro.
2461         (elf_s390_size_dynamic_sections): Use it.
2462         * elf64-alpha.c (add_dynamic_entry): Define macro.
2463         (elf64_alpha_size_dynamic_sections): Use it.
2464         * elf64-hppa.c (add_dynamic_entry): Define macro.
2465         (elf64_hppa_size_dynamic_sections): Use it.
2466         * elf64-ppc.c (add_dynamic_entry): Define macro.
2467         (ppc64_elf_size_dynamic_sections): Use it.
2468         * elf64-s390.c (add_dynamic_entry): Define macro.
2469         (elf_s390_size_dynamic_sections): Use it.
2470         * elf64-sparc.c (add_dynamic_entry): Define macro.
2471         (sparc64_elf_size_dynamic_sections): Use it.
2472         * elf64-x86-64.c (add_dynamic_entry): Define macro.
2473         (elf64_x86_64_size_dynamic_sections): Use it.
2474         * elfxx-ia64.c (add_dynamic_entry): Define macro.
2475         (elfNN_ia64_size_dynamic_sections): Use it.
2477         * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2478         (v850_elf_perform_relocation): Make "r_type" param unsigned.
2480         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2481         false if the first malloc fails rather than going via error_return.
2483         * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2484         "index" param.
2485         (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2487         * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2489         * elfxx-ia64.c (global_sym_index): Return a long.
2491         * ieee.c (get_symbol): Use int rather than char param.
2492         (ieee_slurp_sections): Move "section" var to inner blocks.
2493         (copy_expression): Don't init "value" to zero or worry about
2494         clearing to zero after using.
2495         (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2496         shadowing.
2498         * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2499         unsigned int.
2501         * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2502         (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2504         * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2506         * pc532-mach.c (MYNSX): Delete.
2507         (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2508         (write_object_contents): Correct prototype.
2510         * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2511         than unsigned short.
2513         * section.c (bfd_set_section_contents): Remove redundant
2514         "offset < 0" test.  Check that "count" doesn't overflow size_t.
2515         (bfd_get_section_contents): Likewise.
2517         * som.c (som_fixup_formats): Add missing braces.
2518         (som_reloc_addend): Pass a bfd_vma for "addend".
2520         * srec.c (srec_write_record): Pass "type" as an unsigned int.
2521         (srec_write_symbols): Remove an unnecessary var.
2523         * targets.c (_bfd_target_vector): Sort entries.  Sort externs
2524         to match.
2525         * configure.in: Sort to match.  Bump version number.
2526         * configure: Regenerate.
2528         * tekhex.c (move_section_contents): Assert offset == 0.
2530         * versados.c (new_symbol_string): Constify arg.
2531         (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2532         (versados_get_symbol_info): Make static.
2533         (versados_print_symbol): Likewise.
2534         (versados_get_reloc_upper_bound): Likewise.
2535         (versados_canonicalize_reloc): Likewise.
2537 2001-09-18  Nick Clifton  <nickc@cambridge.redhat.com>
2539         * elflink.h (elf_link_input_bfd): Fix typo in error message.
2541 2001-09-17  H.J. Lu  <hjl@gnu.org>
2543         * dwarf1.c (parse_die): Take a new arg for the end of the
2544         section. Return false if die is beyond the section.
2545         (parse_functions_in_unit): Pass the end of the section to
2546         parse_die ().
2547         (_bfd_dwarf1_find_nearest_line): Likewise.
2549 2001-09-14  Michael Rauch <mrauch@netbsd.org>
2551         * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2552         just like R_SPARC_32.
2554 2001-09-14  Kevin Lo <kevlo@openbsd.org>
2556         * configure.bfd: Add arm-openbsd target.
2558 2001-09-14  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2560         * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2561         Add support for mips64.
2563 2001-09-13  Alexandre Oliva  <aoliva@redhat.com>
2565         * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2567 2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
2569         * elf.c (prep_headers): Get the machine code from the elf
2570         backend data.
2571         * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2572         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2573         * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2574         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2575         * elf-arc.c (arc_elf_final_write_processing): Don't override
2576         e_machine, it's now properly set in prep_headers.
2577         * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2578         EM_AVR_OLD.
2579         (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2580         * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2581         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2582         * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2583         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2584         * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2585         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2586         * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2587         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2588         * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2589         * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2590         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2592 2001-09-11  Richard Henderson  <rth@redhat.com>
2594         * elf64-alpha.c (elf64_alpha_section_flags): New.
2595         (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2597 2001-09-11  Richard Henderson  <rth@redhat.com>
2599         * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2600         apply HINT relocations against dynamic symbols.
2602 2001-09-11  H.J. Lu  <hjl@gnu.org>
2604         * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2606 2001-09-09  Richard Henderson  <rth@redhat.com>
2608         * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2610         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2611         following a call to a near function.
2613 2001-09-08  Richard Henderson  <rth@redhat.com>
2615         * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2616         relocation errors.  Fail gp-relative relocations against
2617         dynamic symbols.
2619 2001-09-08  Alan Modra  <amodra@bigpond.net.au>
2621         * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2622         as well as DEF_DYNAMIC in test for avoided copy relocs.
2623         (allocate_plt_and_got_and_discard_relocs): Likewise.
2624         * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2625         (allocate_plt_and_got_and_discard_relocs): Likewise.
2627 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2629         * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2630         of R_MIPS_PC16.
2632 2001-09-06  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2634         * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2635         definitions.
2636         (mips_elf64_howto_table_rel): Likewise.
2638 2001-09-05  Tom Rix <trix@redhat.com>
2640         * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2641         and syscall symbols.
2642         (write_global_symbol) : Same.
2643         (bfd_xcoff_export_symbol): Remove unused syscall param.
2644         * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2645         bfd_xcoff_import_symbol.
2646         * bfd-in.h: Same.
2647         * bfd-in2.h : Regenerate.
2649 2001-09-04  Richard Henderson  <rth@redhat.com>
2651         * elf64-alpha.c (SKIP_HOWTO): New.
2652         (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2653         Fix sizes of 16-bit mem format relocs.
2654         (elf64_alpha_reloc_map): Update to match.
2655         (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2656         (elf64_alpha_relax_without_lituse): Likewise.
2657         (elf64_alpha_check_relocs): Handle GPREL16.
2658         (elf64_alpha_relocate_section): Likewise.
2659         * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2660         (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2661         * bfd-in2.h, libbfd.h: Rebuild.
2663 2001-09-04  Jeff Law <law@redhat.com>
2665         * elf32-h8300.c (elf32_h8_relax_section): New function.
2666         (elf32_h8_relax_delete_bytes): Likewise.
2667         (elf32_h8_symbol_address_p): Likewise.
2668         (elf32_h8_get_relocated_section_contents): Likewise.
2669         (bfd_elf32_bfd_relax_section): Define.
2670         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2672         * elf32-h8300.c (special): New function.
2673         (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2674         all relocations.
2675         (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2676         relocations.  Fix problems with the true 24bit reloc R_H8_DIR24R8.
2677         Fix minor problems with 8bit and 16bit PC relative relocations.
2679 2001-09-01  Andreas Jaeger  <aj@suse.de>
2681         * vms-tir.c: Add missing prototypes.
2682         * vms-hdr.c: Likewise.
2683         * vms-gsd.c: Likewise.
2684         * vms-misc.c: Likewise.
2686 2001-08-31  H.J. Lu  <hjl@gnu.org>
2688         * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2689         with bad relocation.
2691 2001-08-31  Eric Christopher  <echristo@redhat.com>
2692             Jason Eckhardt  <jle@redhat.com>
2694         * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2695         mips32_4k and mips64.
2696         * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2697         bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2698         * bfd/cpu-mips.c: Ditto.
2699         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2700         * bfd/bfd-in2.h: Regenerate.
2702 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
2704         * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2705         value into R_ALPHA_RELATIVE's addend.
2706         (elf64_alpha_finish_dynamic_symbol): Likewise.
2708 2001-08-31  Nick Clifton  <nickc@cambridge.redhat.com>
2710         * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2711         recomputed addend during relocatable link if not USE_REL.
2713         * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2714         error.
2716 2001-08-30  H.J. Lu  <hjl@gnu.org>
2718         * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2719         2 changes.
2720         (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2721         relocations for weak definitions.
2723 2001-08-30  H.J. Lu  <hjl@gnu.org>
2725         * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2726         (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2727         * Makefile.in: Rebuild.
2729 2001-08-30  H.J. Lu  <hjl@gnu.org>
2731         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2732         dynamic relocation for undefined weak symbols when creating
2733         executables. Check h->root.root.type, instead of h->root.type.
2735 2001-08-29  Joel Sherrill <joel@OARcorp.com>
2737         * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2738         default from coff to elf.
2740 2001-08-29  Jeff Law <law@redhat.com>
2742         * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2743         relocations.
2744         (h8_reloc_map): Similarly.
2745         (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2746         Add support for PC relative relocations.
2748         * elf32-h8300.c: Put all prototypes together.
2749         (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2750         (elf32_h8_final_link_relocate): New function for linker.
2751         (elf32_h8_relocate_section): Similarly.
2752         (elf_backend_relocate_section): Define.
2754         * cpu-h8300.c (h8300_scan, compatible): Prototype.
2755         (h8300_scan): Handle architecture:machine encodings typically
2756         found in linker scripts.
2757         * elf.c (prep_headers): Do not try to do H8 machine recognition
2758         here.
2759         * elf32-h8300.c:  Add some missing prototypes.
2760         (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2761         (elf32_h8_object_p): Similarly.
2763 2001-08-29  Tom Rix <trix@redhat.com>
2765         * xcofflink.c (xcoff_link_add_symbols):  Fix XTY_LD symbol that
2766         does not follow a XTY_SD.
2768 2001-08-29  Alan Modra  <amodra@bigpond.net.au>
2770         * targmatch.sed: Delete case statements.
2771         * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2772         aix4.3 and above.
2774 2001-08-29  J"orn Rennecke <amylaar@redhat.com>
2776         * Makefile.am (elf32-h8300.lo): New target.
2777         * config.bfd (h8300*-*-elf): New case.
2778         * configure.in (bfd_elf32_h8300_vec): New case.
2779         * elf.c (prep_headers): Add case for bfd_arch_h8300.
2780         * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2781         (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2782         (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2783         * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2784         * elf32-h8300.c: New file.
2785         * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2787 2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>
2789         * sparclynx.c: Add missing prototypes.
2790         * coff-mcore.c: Add missing prototypes.
2791         * elf32-pj.c: Add missing prototypes.
2792         * nlm32-sparc.c: Add missing prototypes.
2793         * oasys.c: Add missing prototypes.
2794         * pdp11.c: Add missing prototypes.
2795         * pe-mips.c: Add missing prototypes.
2796         * riscix.c: Add missing prototypes.
2798 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2800         * elf32-i386.c: Add missing prototypes.
2801         * elf32-ppc.c: Likewise.
2802         * elf32-sh-lin.c: Likewise.
2803         * elfarm-nabi.c: Likewise.
2805 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2807         * elf32-i386.c (elf_i386_grok_prstatus): New function.
2808         (elf_i386_grok_psinfo): New function.
2809         (elf_backend_grok_prstatus): Define.
2810         (elf_backend_grok_psinfo): Likewise.
2811         * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2812         (ppc_elf_grok_psinfo): New function.
2813         (elf_backend_grok_prstatus): Define.
2814         (elf_backend_grok_psinfo): Likewise.
2815         * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2816         (elf32_shlin_grok_psinfo): New function.
2817         (elf_backend_grok_prstatus): Define.
2818         (elf_backend_grok_psinfo): Likewise.
2819         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2820         (elf32_arm_nabi_grok_psinfo): New function.
2821         (elf_backend_grok_prstatus): Define.
2822         (elf_backend_grok_psinfo): Likewise.
2824 2001-08-27  H.J. Lu  <hjl@gnu.org>
2826         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2827         sanity check.
2828         (mips_elf_calculate_relocation): Create dynamic relocation for
2829         symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2830         bit is not set.
2832 2001-08-27  H.J. Lu  <hjl@gnu.org>
2834         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2835         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2836         (_bfd_elf32_mips_grok_prstatus): Likewise.
2837         (_bfd_elf32_mips_grok_psinfo): Likewise.
2838         (_bfd_mips_elf_hide_symbol): Make it static and cast to
2839         `struct mips_elf_link_hash_entry *'.
2840         (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2842 2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>
2844         * mipsbsd.c: Add missing prototypes.
2845         * hp300hpux.c: Add missing prototypes.
2846         * i386aout.c: Add missing prototypes.
2847         * i386lynx.c: Add missing prototypes.
2848         * i386mach3.c: Add missing prototypes.
2849         * i386msdos.c: Add missing prototypes.
2850         * i386os9k.c: Add missing prototypes.
2852 2001-08-27  Linus Nordberg  <linus@swox.se>
2853             Torbjorn Granlund  <tege@swox.com>
2854             Staffan Ulfberg  <staffanu@swox.se>
2855             Alan Modra  <amodra@bigpond.net.au>
2857         * config.bfd: Add powerpc64 target.  Add powerpc64 vectors to
2858         targ64_selvecs for 32 bit powerpc targets.
2859         * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2860         (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2861         Run "make dep-am".
2862         * Makefile.in: Regenerate.
2863         * configure.in: Add elf64_powerpc vecs.
2864         * configure: Regenerate.
2865         * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2866         * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2867         * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2868         * elf64-ppc.c: New file.
2869         * reloc.c: Add powerpc64 relocs.
2870         * libbfd.h: Regenerate.
2871         * bfd-in2.h: Regenerate.
2873 2001-08-27  Andreas Schwab  <schwab@suse.de>
2875         * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2876         reloc is against read-only section.
2877         (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2878         looking up section names for DT_TEXTREL.
2879         (elf32_m68k_reloc_type_class): New function.
2880         (elf_backend_reloc_type_class): Define.
2882 2001-08-27  Andreas Jaeger  <aj@suse.de>
2884         * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2885         reloc is against read-only section.
2886         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2887         looking up section names for DT_TEXTREL.
2888         (elf_s390_reloc_type_class): New.
2889         (elf_backend_reloc_type_class): Define.
2891         * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2892         reloc is against read-only section.
2893         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2894         looking up section names for DT_TEXTREL.
2895         (elf_s390_reloc_type_class): New.
2896         (elf_backend_reloc_type_class): Define.
2898         * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2899         is against read-only section.
2900         (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2901         looking up section names for DT_TEXTREL.
2902         (ppc_elf_reloc_type_class): New.
2903         (elf_backend_reloc_type_class): Define.
2905 2001-08-26  Andreas Jaeger  <aj@suse.de>
2907         * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2908         reloc is against read-only section.
2909         (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2910         looking up section names for DT_TEXTREL.
2911         (elf_cris_reloc_type_class): New.
2912         (elf_backend_reloc_type_class): Define.
2914         * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2915         against read-only section.
2916         (elf_backend_reloc_type_class): Define.
2917         (sh_elf_reloc_type_class): New.
2918         (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2919         looking up section names for DT_TEXTREL.
2921         * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2922         reloc is against read-only section.
2923         (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2924         looking up section names for DT_TEXTREL.
2925         (elf32_arm_reloc_type_class): New.
2926         (elf_backend_reloc_type_class): Define.
2928 2001-08-25  Andreas Jaeger  <aj@suse.de>
2930         * oasys.c: Add missing prototypes.
2932         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2933         attribute for parameter.
2934         * elf.c (_bfd_elf_reloc_type_class): Likewise.
2936         * versados.c (get_4): Make static.
2937         (get_10): Make static.
2938         Add missing prototypes.
2939         (process_esd): Fix call to versados_new_symbol.
2941 2001-08-25  Nick Clifton  <nickc@cambridge.redhat.com>
2943         * coff-a29k.c: Add missing prototypes.
2944         * coff-apollo.c: Add missing prototypes.
2945         * coff-arm.c: Add missing prototypes.
2946         * coff-i860.c: Add missing prototypes.
2947         * coff-rs6000.c: Add missing prototypes.
2948         * coff-tic80.c: Add missing prototypes.
2949         * elf-m10200.c: Add missing prototypes.
2950         * elf-m10300.c: Add missing prototypes.
2951         * elf32-arm.h: Add missing prototypes.
2952         * elf32-d10v.c: Add missing prototypes.
2953         * elf32-m32r.c: Add missing prototypes.
2954         * elf32-mcore.c: Add missing prototypes.
2955         * elf32-openrisc.c: Add missing prototypes.
2956         * elf32-sh.c: Add missing prototypes.
2957         * elf32-sparc.c: Add missing prototypes.
2958         * elf32-v850.c: Add missing prototypes.
2959         * elfarm-nabi.c: Add missing prototypes.
2960         * elfarm-oabi.c: Add missing prototypes.
2962 2001-08-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2964         * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2965         E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2967 2001-08-24  H.J. Lu  <hjl@gnu.org>
2969         * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2970         hash structure.
2972 2001-08-24  Nick Clifton  <nickc@cambridge.redhat.com>
2974         * elf-bfd.h (elf_hash_table): Revert definition.
2975         (is_elf_hash_table): New macro.
2976         * elflink.h (elf_link_add_object_symbols): Test
2977         is_elf_hash_table before accessing ELF only fields in hash
2978         structure.
2979         (elf_link_create_dynamic_sections): Fail if not using an ELF
2980         hash structure.
2981         (elf_add_dynamic_entry): Fail if not using an ELF hash
2982         structure.
2983         (elf_link_record_local_dynamic_symbol): Fail if not using an
2984         ELF hash structure.
2985         (size_dynamic_sections): Fail if not using an ELF hash
2986         structure.
2987         (elf_adjust_dynamic_symbol): Fail if not using an ELF
2988         hash structure.
2989         (elf_bfd_final_link): Fail if not using an ELF hash
2990         structure.
2992 2001-08-24  H.J. Lu  <hjl@gnu.org>
2994         * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2995         table is not an ELF linker hash table.
2997         * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2998         table type to bfd_link_elf_hash_table.
3000         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
3001         the last change.
3003         * linker.c (_bfd_link_hash_table_init): Set the linker hash
3004         table type to bfd_link_generic_hash_table.
3006 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
3008         * bfd.c (bfd_alt_mach_code): New function.
3009         * bfd-in2.h: Rebuilt.
3011 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
3013         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
3014         `type' field in the hash entry when deciding whether to follow a
3015         link.
3017 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
3019         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
3020         last.
3021         (elf_link_sort_relocs): Adjust accordingly.
3023         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
3024         (elf64_alpha_check_relocs): Set it if section this reloc is against
3025         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
3026         read-only section.
3027         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
3028         is is against read-only section.
3029         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
3030         check section names.
3031         (elf64_alpha_reloc_type_class): New.
3032         (elf_backend_reloc_type_class): Define.
3034 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3036         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
3037         by bfd_malloc().
3039 2001-08-23  Andreas Jaeger  <aj@suse.de>
3041         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3042         the reloc is against read-only section.
3043         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3044         of looking up section names for DT_TEXTREL.
3045         (elf64_x86_64_reloc_type_class): New.
3046         (elf_backend_reloc_type_class): Define.
3048 2001-08-23  H.J. Lu  <hjl@gnu.org>
3050         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3051         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3053         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3054         bfd_print_symbol_vandf.
3055         * coffgen.c (coff_print_symbol): Likewise.
3056         * elf.c (bfd_elf_print_symbol): Likewise.
3057         * ieee.c (ieee_print_symbol): Likewise.
3058         * nlmcode.h (nlm_print_symbol): Likewise.
3059         * oasys.c (oasys_print_symbol): Likewise.
3060         * pdp11.c (NAME(aout,print_symbol)): Likewise.
3061         * som.c (som_print_symbol): Likewise.
3062         * srec.c (srec_print_symbol): Likewise.
3063         * tekhex.c (tekhex_print_symbol): Likewise.
3064         * versados.c (versados_print_symbol): Likewise.
3065         * vms.c (vms_print_symbol): Likewise.
3067         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3068         with bfd_fprintf_vma.
3069         (bfd_elf_print_symbol): Likewise.
3070         * syms.c (bfd_print_symbol_vandf): Likewise.
3072 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
3074         * aoutf1.h (sunos_write_object_contents): Silence compile time
3075         warning.
3076         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3078         * bout.c: Add missing function prototypes.  Fix formatting.
3079         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
3080         * coff-w65.c: Add missing function prototypes.  Fix formatting.
3081         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
3082         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
3083         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
3084         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
3085         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
3086         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
3087         * coff-sh.c: Add missing function prototypes.  Fix formatting.
3089 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
3091         * elf-bfd.h (enum elf_reloc_type_class): New.
3092         (struct elf_backend_data): Add elf_backend_reloc_type_class.
3093         (_bfd_elf_reloc_type_class): New.
3094         * elfxx-target.h (elf_backend_reloc_type_class): Define.
3095         (elfNN_bed): Add elf_backend_reloc_type_class.
3096         * elf.c (_bfd_elf_reloc_type_class): New.
3097         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3098         is against read-only section.
3099         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3100         looking up section names for DT_TEXTREL.
3101         (elf_i386_reloc_type_class): New.
3102         (elf_backend_reloc_type_class): Define.
3103         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3104         reloc is against read-only section.
3105         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3106         looking up section names for DT_TEXTREL.
3107         (elf32_sparc_reloc_type_class): New.
3108         (elf_backend_reloc_type_class): Define.
3109         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3110         reloc is against read-only section.
3111         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3112         looking up section names for DT_TEXTREL.
3113         (sparc64_elf_reloc_type_class): New.
3114         (elf_backend_reloc_type_class): Define.
3115         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3116         (elfNN_ia64_hash_table_create): Clear ia64_info.
3117         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3118         section.
3119         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3120         instead of looking up section names for DT_TEXTREL.
3121         (elfNN_ia64_reloc_type_class): New.
3122         (elf_backend_reloc_type_class): Define.
3123         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3124         (struct elf_link_sort_rela): New.
3125         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3126         (elf_bfd_final_link): Call elf_link_sort_relocs.
3127         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3128         necessary.
3130 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
3132         * configure.in (x86-bsdi): No corefile support.
3133         * configure: Regenerate.
3135 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
3137         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3138         comma.
3140 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
3142         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
3143         the alignment of dwarf2 linkonce sections to 0.
3144         * coff-sto32.c: Likewise.
3146 2001-08-20  Andreas Jaeger  <aj@suse.de>
3148         * coff-sparc.c: Add missing prototypes.
3149         * elf32-s390.c: Likewise.
3150         * elf32-i960.c: Likewise.
3151         * aout-target.h: Likewise.
3153 2001-08-20  H.J. Lu  <hjl@gnu.org>
3155         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3156         (elf_num_section_syms): New for num_section_syms.
3158         * elf.c (elf_map_symbols): Set num_section_syms.
3159         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3160         the section symbol index.
3162 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
3164         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3165         select the generic has table creator.  All elf backends need elf
3166         specific fields in the hash table.
3168 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
3170         * archive.c (offsetof): Remove define.
3171         * elf.c: Likewise.
3172         * oasys.c: Likewise
3173         * sysdep.h (offsetof): Define.
3175 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3177         * bfd.c (bfd_get_gp_size): Return an unsigned int.
3178         (bfd_set_gp_size): Make param unsigned.
3179         * bfd-in2.h: Regenerate.
3180         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3181         than calling bfd_get_gp_size.
3182         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3183         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3185 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3187         * linker.c (default_fill_link_order): Handle four byte fill value.
3189 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3191         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3192         prototype.
3193         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3195         * elf64-mips.c (UNUSED_RELOC): Define.
3196         (mips_elf64_howto_table_rel): Use it.
3197         (mips_elf64_howto_table_rela): Here too.
3198         (mips_elf64_write_relocs): Fix signed/unsigned warning.
3200         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3201         silence warning.
3202         * coffgen.c (coff_print_symbol): Fix warnings.
3203         (coff_find_nearest_line): Likewise.
3204         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3205         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3206         * format.c (bfd_check_format_matches): Likewise.
3207         (bfd_set_format): Likewise.
3208         * coff-ia64.c: Add missing prototypes.
3209         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3210         signed to silence warnings.
3211         (elf64_alpha_relocate_section): Likewise.
3212         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3213         (elf64_alpha_add_symbol_hook): Likewise.
3214         (elf64_alpha_final_link): Likewise.
3215         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3216         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3217         (elf64_alpha_size_got_sections): Likewise.
3218         * elfxx-ia64.c: Add missing prototypes.
3219         (elfNN_ia64_relocate_section): Fix warning.
3220         (elfNN_ia64_unwind_entry_compare): Make params const.
3222 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3224         * config.bfd (targ64_selvecs): New.
3225         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3227         * bfd-in.h (BFD_VERSION): Remove wrong comment.
3228         (BFD_DEFAULT_TARGET_SIZE): New.
3229         (BFD_ARCH_SIZE): Comment.
3230         * configure.in (target_size): New.  Set instead of target64 in
3231         selvecs case statement.  Set target64 from it.
3232         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
3233         * bfd-in2.h: Regenerate.
3234         * configure: Regenerate.
3236 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3238         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3239         (bfd_errmsgs): Add corresponding message.
3240         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3241         finding an archive that contains different format object files.
3242         Return bfd_error_wrong_object_format for this case.
3243         * format.c: Formatting fixes.  s/CONST/const/.
3244         (bfd_check_format_matches): Accept archives that give
3245         bfd_error_wrong_object_format if no full match is found.  Tidy
3246         code handling matching_vector.  Don't return a pointer to freed
3247         memory in `matching'.  Handle ambiguous matches as for partial
3248         archive matches.
3249         * bfd-in2.h: Regenerate.
3251 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
3253         * libieee.h (common_header_type): Add last_byte field.
3255         * ieee.c: Add missing prototypes.  Some format fixes.
3256         (struct output_buffer_struct): Move for availability to prototypes.
3257         (ieee_part_after): New function.
3258         (ieee_slurp_debug): Use it here.
3259         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
3260         ieee_part_after to set last_byte to one past end of current part.
3261         Update callers.
3262         (ieee_pos): Pass in ieee_data_struct rather than bfd.
3263         Update callers.
3264         (parse_expression): Don't go beyond the end of the current part.
3265         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3266         (ieee_get_symtab_upper_bound, ieee_get_symtab,
3267         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3268         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3269         ieee_set_section_contents, ieee_write_object_contents,
3270         ieee_make_empty_symbol): Make static.
3271         (ieee_archive_p): Correct comments regarding bfd_read.
3272         (ieee_object_p): Similarly.
3273         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
3274         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3275         input_bfd, output_bfd, output_buffer.
3276         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3277         do_with_relocs, ie. as a symbol for relocatable files.
3278         (ieee_vec): Add comments showing functions referenced by macros.
3280 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
3282         * aout-tic30.c: Add missing prototypes.  Fix formatting.
3283         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
3284         * peXXigen.c: Add missining prototypes.  Fix formatting.
3285         * aout-adobe.c: Add missining prototypes.  Fix formatting.
3287 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
3289         * elf32-v850.c: Add missing function prototypes.
3290         Fix some formatting.
3292         * cpu-v850.c: Add missing function prototype.
3293         Fix some formatting.
3295 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
3297         * elf-bfd.h (struct elf_backend_data): Add new fields
3298         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3299         (bfd_elf_sprintf_vma): Rename function prototype to
3300         '_bfd_elf_sprintf_vma'.
3301         (bfd_elf_fprintf_vma): Rename function prototype to
3302         '_bfd_elf_fprintf_vma'.
3303         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3304         directly, instead indirect via the elf_backend_data structure.
3305         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3306         instead indirect via the elf_backend_data structure.
3307         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3308         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3309         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3310         already defined.
3311         (elf_backend_fprintf_vma): Initialise if not already defined.
3312         (struct elf_backend_data): Initialise the
3313         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3315 2001-08-10  Andreas Jaeger  <aj@suse.de>
3317         * elf64-sparc.c: Add missing prototypes.
3318         * elf32-cris.c: Likewise.
3319         * elf32-i370.c: Likewise.
3320         * elf64-hppa.c: Likewise.
3321         * elf64-s390.c: Likewise.
3323 2001-08-10  Andreas Jaeger  <aj@suse.de>
3325         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3326         Add prototypes where needed.
3328 2001-08-10  H.J. Lu  <hjl@gnu.org>
3330         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3331         (bfd_fprintf_vma): Likewise.
3333 2001-08-10  H.J. Lu  <hjl@gnu.org>
3335         * bfd.c (bfd_sprintf_vma): Don't return void.
3336         (bfd_fprintf_vma): Likewise.
3338 2001-08-10  Andreas Jaeger  <aj@suse.de>
3340         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3341         to build warnings.
3342         * configure: Regenerate.
3344 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
3346         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3347         warning if not BFD64.  Add braces so emacs auto format works.
3348         (bfd_elf_fprintf_vma): Likewise.
3350         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3351         of _xcoff_swap_ld*.
3352         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3353         param to agree with libxcoff.h.
3354         (xcoff_swap_ldhdr_out): Likewise.
3355         (xcoff_swap_ldsym_in): Likewise.
3356         (xcoff_swap_ldsym_out): Likewise.
3357         (xcoff_swap_ldrel_in): Likewise.
3358         (xcoff_swap_ldrel_out): Likewise.
3359         (xcoff_create_csect_from_smclas): Likewise.
3360         * coff64-rs6000.c: Add missing prototypes.
3361         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3362         with libxcoff.h.
3363         (xcoff64_swap_ldhdr_out): Likewise.
3364         (xcoff64_swap_ldsym_in): Likewise.
3365         (xcoff64_swap_ldsym_out): Likewise.
3366         (xcoff64_swap_ldrel_in): Likewise.
3367         (xcoff64_swap_ldrel_out): Likewise.
3368         (xcoff64_ppc_relocate_section): Make static.
3369         (xcoff64_slurp_armap): Likewise.
3370         (xcoff64_archive_p): Likewise.
3371         (xcoff64_openr_next_archived_file): Likewise.
3372         (xcoff64_sizeof_headers): Likewise.
3373         (xcoff64_is_lineno_count_overflow): Likewise.
3374         (xcoff64_is_reloc_count_overflow): Likewise.
3375         (xcoff64_loader_symbol_offset): Likewise.
3376         (xcoff64_loader_reloc_offset): Likewise.
3377         * elf64-gen.c: Add missing prototypes.
3379 2001-08-09  H.J. Lu  <hjl@gnu.org>
3381         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3382         (bfd_elf_fprintf_vma): Likewise.
3384 2001-08-09  H.J. Lu  <hjl@gnu.org>
3386         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3387         to ...
3388         * elf-bfd.h: Here.
3389         * bfd-in2.h: Regenerated.
3391 2001-08-09  H.J. Lu  <hjl@gnu.org>
3393         * bfd-in.h (bfd_sprintf_vma): New prototype.
3394         (bfd_fprintf_vma): Likewise.
3395         (bfd_elf_sprintf_vma): Likewise.
3396         (bfd_elf_fprintf_vma): Likewise.
3397         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3398         * bfd-in2.h: Regenerated.
3400         * bfd.c (bfd_sprintf_vma): New. Defined.
3401         (bfd_fprintf_vma): Likewise.
3403         * elf.c (bfd_elf_sprintf_vma): New. Defined.
3404         (bfd_elf_fprintf_vma): Likewise.
3406 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
3408         * coff-rs6000.c: Add missing prototypes.
3409         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3410         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3411         xcoff_loader_reloc_offset): Make static.
3412         * dwarf1.c: Add missing prototypes.
3413         * dwarf2.c: Add missing prototypes.
3414         (struct abbrev_info): Move definition.
3415         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3416         * elf.c: Add missing prototypes.
3417         * elf32-gen.c: Likewise.
3418         * elf32-i386.c: Likewise.
3419         * elf32-ppc.c: Likewise.
3420         (ppc_elf_sort_rela): Use PTR instead of "void *".
3421         * elflink.h: Add missing prototypes.  Formatting fixes.
3422         * merge.c: Add missing prototypes.
3423         (last4_eq): Use PTR instead of "void *".
3424         (last_eq): Likewise.
3425         * syms.c: Add missing prototypes.
3427 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3429         * bfd.c: Fix formatting.
3430         * bfd-in2.h: Regenerate.
3432 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3434         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3435         true (this target uses REL relocations) and 'pcrel_offset' to
3436         false (the PC is implied, not stored in the offset).
3438 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
3440         1999-10-19  Linus Nordberg  <linus@swox.se>
3441         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3442         * elfxx-target.h (elf_backend_want_got_sym): Define.
3443         (elfNN_bed): Add elf_backend_want_got_sym.
3444         * elflink.c (_bfd_elf_create_got_section): Define
3445         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3447 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
3449         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3450         (find_rela_addend): New function.
3451         (parse_comp_unit): Call it to find the abbrev offset addend.
3452         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3453         members of dwarf2_debug as debugging information is read.
3455 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
3457         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3458         targets as well as sh-pe.
3460 2001-08-03  Ben Harris <bjh21@netbsd.org>
3462         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3463         reloc from start of section when computing value for R_ARM_REL32
3464         reloc.
3466 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
3468         From  H.J. Lu  <hjl@gnu.org>
3469         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3470         keep relocs for undefined syms if there are no dynamic sections in
3471         executable.
3472         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3474 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
3476         * cofflink.c (coff_link_check_ar_symbols): also search for
3477         __imp__symbol as well as _symbol.
3478         * linker.c (_bfd_generic_link_add_archive_symbols): also
3479         search for __imp__symbol as well as _symbol.
3481 2001-08-01  Adam Nemet  <anemet@lnxw.com>
3483         * elf.c (elf_sort_sections): Return zero only as the last step.
3485 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
3487         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3488         ARM_COFF_BUGFIX.
3489         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3490         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3491         ARM_COFF_BUGFIX.
3493 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3495         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3496         to match corresponding bfd_coff_backend data member.
3498 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
3500         * Makefile.am: Update dependencies with "make dep-am".
3501         * Makefile.in: Regenerate
3503 2001-07-15  H.J. Lu  <hjl@gnu.org>
3505         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3506         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3507         * Makefile.in: Regenerate.
3509 2001-07-11  H.J. Lu  <hjl@gnu.org>
3511         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3512         flags when creating the reloc section if the ALLOC flag in the
3513         source section is set.
3515 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
3517         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3518         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3519         * bfd-in2.h: Regenerate.
3520         * libbfd.h: Regenerate.
3521         * elfxx-ia64.c (ia64_howto_table): Define how to handle
3522         new relocations.
3523         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3524         (elfNN_ia64_check_relocs): Likewise.
3525         (elfNN_ia64_install_value): Likewise.
3526         (elfNN_ia64_relocate_section): Likewise.
3528 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
3530         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3531         R_SPARC_UA64.
3532         (elf32_sparc_check_relocs): Likewise.
3533         Only create .rela section for alloced sections in shared libraries.
3534         (elf32_sparc_relocate_section): Likewise.
3535         Remove redundant check.
3536         Optimize unaligned reloc usage.
3537         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3538         check.
3540 2001-07-11  H.J. Lu  <hjl@gnu.org>
3542         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3543         ALLOC|LOAD flags as the source section for debugging sections
3544         when creating the reloc section.
3546 2001-07-05  Jim Wilson  <wilson@redhat.com>
3548         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3549         the section of the bigger symbol.
3551         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3553 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
3555         * peicode.h (coff_swap_scnhdr_in): For sections containing
3556         uninitialised data, only set their size to s_paddr if this does
3557         not reset their size to zero.  MS's latest compilers will set
3558         s_paddr to zero.
3560 2001-07-04  H.J. Lu  <hjl@gnu.org>
3562         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3563         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3564         bfd_mach_mips5000.
3566 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
3568         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3570         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3571         sections being discarded.
3573 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
3575         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3576         instead of _bfd_elfcore_section_from_phdr.
3577         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3578         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3579         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3580         (elfcore_grok_prstatus): Likewise.
3581         (elfcore_grok_lwpstatus): Likewise.
3582         (bfd_get_elf_phdr_upper_bound): Likewise.
3583         (elfcore_make_note_pseudosection): Formatting.
3584         (_bfd_elfcore_strndup): Formatting.
3585         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3586         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3588 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
3590         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3591         and _bfd_elfcore_strndup.
3592         (struct elf_backend_data): Add elf_backend_grok_prstatus
3593         and elf_backend_grok_psinfo.
3594         * elf.c (_bfd_elfcore_make_pseudosection): New function.
3595         (elfcore_grok_prstatus): Use it.
3596         (elfcore_make_note_pseudosection): Likewise.
3597         (elfcore_strndup):  Rename to...
3598         (_bfd_elfcore_strndup): Here, and make global.
3599         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3600         (elfcore_grok_note): Call elf_backend_grok_prstatus
3601         and elf_backend_grok_psinfo if available.
3602         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3603         (_bfd_elf32_mips_grok_psinfo): New function.
3604         (elf_backend_grok_prstatus): Define.
3605         (elf_backend_grok_psinfo): Define.
3606         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3607         (elf_backend_grok_psinfo): Likewise.
3608         (elfNN_bed): Include elf_backend_grok_prstatus and
3609         elf_backend_grok_psinfo.
3611 2001-06-29  H.J. Lu  <hjl@gnu.org>
3613         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3614         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
3615         is NULL before filling PLT.
3617 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
3619         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3621 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
3623         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3624         here..
3625         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3626         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3627         after gc has run.
3629         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3630         (IS_ABSOLUTE_RELOC): Define.
3631         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3632         (hppa_link_hash_newfunc): Always init it.
3633         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3634         create COPY relocs only when the reloc is in a read-only section.
3635         Instead, allocate space for a dynamic reloc to reference the
3636         library symbol directly.  Keep track of space we allocate using
3637         relocs_entries.
3638         (hppa_discard_copies): Delete, and move code to..
3639         (allocate_plt_and_got): ..here.  Rename to
3640         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3641         relocs for non-shared link.
3642         (elf32_hppa_size_dynamic_sections): Update calls to above.
3643         (elf32_hppa_relocate_section): Write out the dynamic relocs used
3644         in lieu of COPY relocs.
3646         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3647         here..
3648         (elf_i386_adjust_dynamic_symbol): ..nor here..
3649         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3650         after gc has run.
3651         (elf_i386_size_dynamic_sections): Fix a comment.
3652         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3653         involved in writing reloc out.
3655 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
3657         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3658         Ensure syms are dynamic if we might be emitting a reloc.
3659         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3660         for undefweak or undefined syms..
3661         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3663         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3664         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3665         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3666         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3668 2001-06-24  H.J. Lu  <hjl@gnu.org>
3670         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3671         strncasecmp/strcasecmp instead of strncmp/strcmp.
3673 2001-06-23  H.J. Lu  <hjl@gnu.org>
3675         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3676         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3677         in the regular object file and treat the weak definition as
3678         the normal one.
3680 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
3682         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3683         unresolved_reloc test to exclude cases where we use "relocation"
3684         before setting it to point into the .got.  Reinstate fudge for
3685         unresolved relocs in debugging sections.
3687         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3688         complicated tests for unresolvable relocs with a simple direct
3689         scheme using "unresolved_reloc" var.
3691         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3692         elf_i386_dyn_relocs.  Update comment.
3693         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3694         dyn_relocs.
3695         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3696         others to aborts.
3697         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3698         abort.
3699         (elf_i386_size_dynamic_sections): Likewise.
3700         (elf_i386_finish_dynamic_symbol): Likewise.
3701         (elf_i386_finish_dynamic_sections): Likewise.
3702         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
3703         handling code.
3705         Avoid creating COPY relocs if possible.
3706         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3707         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
3708         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3709         reloc is in a read-only section.  Instead, allocate space for a
3710         dynamic reloc to reference the library symbol directly.  Keep
3711         track of space we allocate using pcrel_relocs_copied.
3712         (discard_copies): Delete, and move code to ..
3713         (allocate_plt_and_got): ..here.  Rename to
3714         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3715         relocs for non-shared link.
3716         (elf_i386_size_dynamic_sections): Update calls to above functions.
3717         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
3718         more ugly logic to avoid "unresolvable relocation" error.  Use
3719         htab shortcut in place of elf_hash_table macro.
3720         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3721         not always be created now.
3723 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
3725         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3726         shared libraries.
3728 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3730         * configure.host (mips64-*-linux): Reformat.
3732 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
3734         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3735         allocate local .got space.  Use shortcuts from hash table for .got
3736         and .plt rather than comparing section names.
3737         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3738         adjusting index into local_got_refcounts to document what we are
3739         really doing.
3740         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3741         Tidy .got and .plt error checking.
3743 2001-06-20  Catherine Moore  <clm@redhat.com>
3745         * elf-bfd.h (struct elf_backend_data):
3746         elf_backend_emit_relocs: New field: Function for emitting
3747         relocs.
3748         elf_backend_count_relocs: New field: Function for determining
3749         the number of relocs to be emitted.
3750         * elfxx-target.h: Provide default (NULL) values for
3751         elf_backend_emit_relocs and elf_backend_count_relocs.
3752         * elflink.h (elf_link_size_reloc_section): Make the hash table
3753         big enough to hold the relocs counted by either reloc_count or
3754         o->reloc_count.
3755         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3756         should be emitted, either because of a command line option
3757         stored in the info structure or because the target provides a
3758         special reloc emitting function.
3759         If the target provides a reloc counting function use it,
3760         unless performing a relocatable link or emitting all relocs.
3761         Also set the SEC_RELOC flag on any output section which will
3762         contain relocs.
3763         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3764         should be emitted, either because of a command line option
3765         stored in the info structure or because the target provides a
3766         special reloc emitting function.
3767         If the target provides a reloc emitting function, use it,
3768         unless performing a relocatable link or emitting all relocs.
3770 2001-06-20  H.J. Lu  <hjl@gnu.org>
3772         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3773         allocate local .got space.
3775 2001-06-19  Andreas Jaeger  <aj@suse.de>
3777         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3778         dynamic symbols.
3780 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
3782         * elflink.h (struct elf_assign_sym_version_info): Remove member
3783         export_dynamic.  All users changed to use info member.
3784         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3785         export_dynamic, instead use member in parameter info.
3786         * bfd-in.h (bfd_elf32_size_dynamic_sections,
3787         bfd_elf64_size_dynamic_sections): Update prototype.
3788         * bfd-in2.h: Regenerate.
3790 2001-06-18  H.J. Lu  <hjl@gnu.org>
3792         * elflink.h (elf_info_failed): Add a new field, verdefs.
3793         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3794         elf_export_symbol.
3795         (elf_export_symbol): Check eif->verdefs to decide if a symbol
3796         should be exported.
3798 2001-06-17  H.J. Lu  <hjl@gnu.org>
3800         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3801         readonly_reloc, to record if a relocation in the .rel.dyn
3802         section is against a read-only section.
3803         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3804         field to false.
3805         (_bfd_mips_elf_check_relocs): Record if there is a relocation
3806         in the .rel.dyn section against a read-only section by setting
3807         DF_TEXTREL or readonly_reloc.
3808         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3809         it is true.
3810         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3811         there is a relocation in the .rel.dyn section against a
3812         read-only section.
3813         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3814         DF_TEXTREL is set.
3816 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
3818         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3819         function.  Move flagword result into parameter list.  Remove
3820         comment about setting bfd_error_handler to intercept failure
3821         results.
3822         * coffgen.c (make_a_section_from_file): Examine result of
3823         calling bfd_coff_styp_to_sec_flags and pass a failure back to
3824         caller.
3825         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3826         function.  Move flagword result into parameter list.
3827         * libcoff.h: Regenerate.
3828         * libecoff.h: Regenerate.
3830 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
3832         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3833         section is going to follow it.
3835 2001-06-12  Catherine Moore  <clm@redhat.com>
3837         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3838         with the file_align entry from elf_backend_data.
3839         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3840         (elf_gc_record_vtentry): Likewise.
3842 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
3844         * elflink.h: Whitespace changes.
3845         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3846         rather than "unsigned char".
3847         (elf_link_output_relocs): Likewise.
3848         (elf_link_input_bfd): Likewise.
3849         (elf_reloc_link_order): LIkewise.
3850         * elf.c: s/CONST/const/.  Whitespace changes.
3851         * elf32-mips.c: Formatting fix.
3853         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3854         * Makefile.in: Regenerate.
3855         * po/Make-in: Remove trailing tab.
3857 2001-06-09  Philip Blundell  <philb@gnu.org>
3859         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3860         change.
3861         (elf32_arm_plt_entry): Likewise.
3863 2001-06-08  H.J. Lu  <hjl@gnu.org>
3865         * elf.c (swap_out_syms): Keep names for global section symbols.
3867 2001-06-07  H.J. Lu  <hjl@gnu.org>
3869         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3870         MIPS-based machines need it.
3872 2001-06-07  H.J. Lu  <hjl@gnu.org>
3874         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3875         for SGI only.
3877         * config.bfd: Remove ecoff from Linux/mips.
3879 2001-06-07  Andreas Jaeger  <aj@suse.de>
3881         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3882         assertion.
3883         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3884         alignment of 8 for .rela sections; handle further relocations.
3886 2001-06-06  Christian Groessler <cpg@aladdin.de>
3888         * coff-z8k.c: Fix formatting.
3889         Fix howtos: howto->size was always 1.
3891 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3893         * configure.host (mips64*-*-linux*): Define.
3895 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
3897         * elf32-i386.c (elf_i386_discard_copies): Rename to
3898         discard_copies, and use elf_link_hash_entry arg rather than
3899         elf_i386_link_hash_entry.
3900         (elf_i386_link_hash_traverse): Delete.
3901         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3902         Tidy sizing of dynamic sections.
3903         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3904         possible .plt entries.
3905         (elf_i386_gc_sweep_hook): Likewise.
3906         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3907         everything with plt.refcount <= 0.
3909         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3910         .relgot space here.
3911         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3912         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3913         .rel.plt here..
3914         (allocate_plt_and_got): ..instead do it all here.  New function.
3915         (elf_i386_size_dynamic_sections): Allocate local .got space and
3916         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
3917         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
3918         rather than gc variety).
3919         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3920         (elf_i386_relocate_section): Use it here and correct handling of
3921         R_386_GOT32.  Provide section and offset for "unresolvable
3922         relocation" error message.
3923         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3925         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3926         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3927         (elf_i386_link_hash_table_create): Init them.
3928         (create_got_section): New function.
3929         (elf_i386_create_dynamic_sections): New function.
3930         (elf_backend_create_dynamic_sections): Set to above.
3931         (elf_i386_check_relocs): Use shortcuts from hash table rather than
3932         calling bfd_get_section_by_name.
3933         (elf_i386_gc_sweep_hook): Likewise.
3934         (elf_i386_adjust_dynamic_symbol): Likewise.
3935         (elf_i386_size_dynamic_sections): Likewise.
3936         (elf_i386_relocate_section): Likewise.
3937         (elf_i386_finish_dynamic_sections): Likewise.
3939         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3941 2001-06-02  H.J. Lu  <hjl@gnu.org>
3943         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3944         and ELFOSABI_HPUX.
3945         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3947 2001-06-02  H.J. Lu  <hjl@gnu.org>
3949         * aout-cris.c (MACHTYPE_OK): New. Defined.
3951 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
3953         * section.c (_bfd_strip_section_from_output): Handle NULL
3954         output_section.
3956 2001-06-02  H.J. Lu  <hjl@gnu.org>
3958         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3959         rs6000coff64_vec only if BFD64 is defined.
3960         (powerpc64-*-aix*): Enable only if BFD64 is defined.
3962 2001-06-02  H.J. Lu  <hjl@gnu.org>
3964         * coff-ia64.c (ia64coff_object_p): Rewrite with
3965         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3967 2001-06-01  Andreas Jaeger  <aj@suse.de>
3969         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3970         relocation, small reformatting.
3972 2001-05-29  Andreas Jaeger  <aj@suse.de>
3974         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3975         (elf64_x86_64_relocate_section): Likewise.
3977 2001-05-30  Alan Modra  <amodra@one.net.au>
3979         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3980         millicode.  Don't allocate .got and .rela.got space here..
3981         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3982         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3983         .rela.plt here..
3984         (hppa_handle_PIC_calls): ..nor here..
3985         (allocate_plt_and_got): ..instead do it all here.  New function.
3986         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3987         call allocate_plt_and_got.  No need to zap .got if not dynamic.
3988         (elf32_hppa_final_link): Call regular bfd_final_link instead of
3989         gc_common_final_link.
3990         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3991         (elf32_hppa_relocate_section): Use it here.
3992         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3993         dynamic_sections_created.
3994         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3996 2001-05-28  Andreas Jaeger  <aj@suse.de>
3998         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3999         generic version since we want a hashsize of 4.
4000         (elf_backend_size_info): Likewise.
4002 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
4004         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
4005         a zeroing loop.
4006         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
4007         (elf_link_input_bfd): Likewise.
4008         (elf_reloc_link_order): Likewise.
4009         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
4010         relocations correctly.
4012 2001-05-28  Nicolas Pitre <nico@cam.org>
4014         * elf32-arm.h: fix PLT generation for big endian ARM
4016 2001-05-28  Alan Modra  <amodra@one.net.au>
4018         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
4019         for symbols forced local that need plabels.
4020         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
4021         .plt.rela for local syms if non-shared.
4022         (hppa_build_one_stub): Mask lsb of plt.offset.
4023         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
4024         (clobber_millicode_symbols): Correct comment.
4025         (elf32_hppa_relocate_section): Likewise.
4026         (elf32_hppa_finish_dynamic_symbol): Likewise.
4028 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
4030         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
4031         * bfd-in2.h: Regenerate.
4032         * libbfd.h: Regenerate.
4033         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
4034         and BFD_RELOC_SPARC_UA64 mapping
4035         * elf64-sparc.c: Likewise.
4037 2001-05-25  H.J. Lu  <hjl@gnu.org>
4039         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
4040         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4041         (coff-rs6000.lo): Remove the old dependency.
4042         * Makefile.in: Rebuild.
4044         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4045         coff-rs6000.lo.
4047 2001-05-25  H.J. Lu  <hjl@gnu.org>
4049         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4050         rs6000coff_core_file_matches_executable_p,
4051         rs6000coff_core_file_failing_command and
4052         rs6000coff_core_file_failing_signal only if AIX_CORE is
4053         defined.
4054         (pmac_xcoff_vec): Likewise.
4055         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4057 2001-05-25  Timothy Wall  <twall@redhat.com>
4059         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4060         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
4062 2001-05-25  H.J. Lu  <hjl@gnu.org>
4064         * bfd-in2.h: Regenerated.
4065         * libcoff.h: Likewise.
4067 2001-05-25  Alan Modra  <amodra@one.net.au>
4069         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4070         undefined millicode syms in shared libs.
4071         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4072         (elf32_hppa_check_relocs): Likewise.
4073         (elf32_hppa_adjust_dynamic_symbol): Likewise.
4074         (elf32_hppa_size_dynamic_sections): Likewise.
4075         (elf32_hppa_relocate_section): Likewise.
4076         (elf32_hppa_finish_dynamic_symbol): Likewise.
4077         (elf32_hppa_finish_dynamic_sections): Likewise.
4079 2001-05-24  Tom Rix <trix@redhat.com>
4081         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4082         xcoff-target.h not used to define rs6000 or ppc bfd.
4083         * Makefile.in same
4085         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4086         to 64 bit.
4088         * coff-rs6000.c : Many changes for 64 bit support.  Move common
4089         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
4090         and pmac_xcoff_vec
4092         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
4093         linker now supported.  Explictly define the rs6000coff64_vec.
4095         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4096         (coff_print_aux) same
4097         (coff_write_object_contents) same
4098         (coff_slurp_line_table) same
4100         * coffgen.c : (coff_fix_symbol_name) formatting
4101         (coff_mangle_symbols) xcoff 64 bit support
4102         (coff_write_symbol) same
4103         (coff_write_alien_symbol) same
4104         (coff_write_native_symbol) same
4105         (coff_write_symbols) same
4106         (coff_get_symbol_info) same
4107         (bfd_coff_get_syment) same
4108         (coff_print_symbol) same
4110         * config.bfd : add powerpc64-*-aix* target
4112         * libcoff-in.h : formatting
4114         * libcoff.h : move xcoff extern declarations to libxcoff.h
4116         * libxcoff.h : New file
4118         * xcofflink.c : Many changes for xcoff64 support.  Move common
4119         structures to include/coff/xcoff.h.  Move specific structure to
4120         backends coff-rs6000.c and coff64-rs6000.c.  Use new backend
4121         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4123         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4124         aix4.2+ -binitfini.
4126         (xcoff_build_ldsyms) : handle special __rtinit symbol.
4128 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
4130         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4131         s/ENTIRES/ENTRIES/.
4133 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4135         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4136         * libbfd.h: Regenerate.
4137         * bfd-in2.h: Regenerate.
4139         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4140         * archures.c (bfd_mach_mips12000): Define.
4141         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4142         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4143         support.
4144         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4145         * bfd-in2.h: Regenerate.
4146         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4148 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
4150         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4151         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4152         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4153         that is used by GCC.
4155 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
4157         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4158         of entries in a structured section.
4159         * elf.c: Use new macro.
4160         * elf32-i386.c: Use new macro.
4161         * elf32-mips.c: Use new macro.
4162         * elf64-alpha.c: Use new macro.
4163         * elf64-sparc.c: Use new macro.
4164         * elfcode.h: Use new macro.
4165         * elflink.h: Use new macro.
4167 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
4169         * bfdint.texi: Replace -oformat with --oformat.
4171 2001-05-21  Andreas Jaeger  <aj@suse.de>
4173         * dwarf2.c (decode_line_info): Fix error message.
4174         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4175         adjust error message.
4177 2001-05-18  H.J. Lu  <hjl@gnu.org>
4179         * elflink.h (elf_link_add_object_symbols): Revert the last
4180         change.
4182 2001-05-17  Alan Modra  <amodra@one.net.au>
4184         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4185         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4186         (hppa_build_one_stub): Add an assert to check plt.offset.
4188 2001-05-17  H.J. Lu  <hjl@gnu.org>
4190         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4191         version definition to basename of the output filename.
4193 2001-05-17  H.J. Lu  <hjl@gnu.org>
4195         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4196         basename of the bfd filename.
4198 2001-05-16  Alan Modra  <amodra@one.net.au>
4200         * section.c (asection): Add linker_has_input field.
4201         (STD_SECTION): Adjust initialization to suit.
4202         * ecoff.c (bfd_debug_section): Likewise.
4203         * bfd-in2.h: Regenerate.
4205 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
4207         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4208         negative 32-bit operands to 16 operands when the operand is
4209         going to be zero-extended by the modified opcode.
4211 2001-05-12  Peter Targett  <peter.targett@arccores.com>
4213         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4214         name for 'arc5' core versions.
4215         (bfd_arc_arch): Make bfd_mach_arc_6 default.
4217         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4218         architecture.
4219         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4221 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
4223         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4224         sections as well.
4225         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4226         to .gnu.linkonce.t.FOO text section.
4228 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
4230         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4231         fields, change sec into secinfo.
4232         (struct sec_merge_info): Add chain, remove last fields.
4233         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4234         (sec_merge_hash_lookup): If lookup could not use a string only
4235         because it has bad alignment, mark the old string for deletion.
4236         (sec_merge_add): Add secinfo argument. Don't compute entry's
4237         position, instead record the section.
4238         (sec_merge_emit): Update for the sec into secinfo change in
4239         struct sec_merge_hash_entry.
4240         (_bfd_merge_section): Only record the section for merging, defer
4241         putting strings into the hash table.
4242         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4243         _bfd_merge_sections): New functions.
4244         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4245         changes.
4246         * libbfd-in.h (_bfd_merge_sections): Add prototype.
4247         (_bfd_nolink_bfd_merge_sections): Define.
4248         * libbfd.h: Likewise.
4249         (bfd_generic_merge_sections): Add prototype.
4250         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4251         (struct bfd_target): Likewise.
4252         * bfd.c (bfd_merge_sections): Define.
4253         * bfd-in2.h: Rebuilt.
4254         * elf.c (_bfd_elf_merge_sections): New function.
4255         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4256         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4257         * reloc.c (bfd_generic_merge_sections): New function.
4258         * vms.c (vms_bfd_merge_sections): New function.
4259         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4260         * aout-target.h (MY_bfd_merge_sections): Define.
4261         * aout-tic30.c (MY_bfd_merge_sections): Define.
4262         * binary.c (binary_bfd_merge_sections): Define.
4263         * bout.c (b_out_bfd_merge_sections): Define.
4264         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4265         * coffcode.c (coff_bfd_merge_sections): Define.
4266         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4267         * i386msdos.c (msdos_bfd_merge_sections): Define.
4268         * i386os9k.c (os9k_bfd_merge_sections): Define.
4269         * ieee.c (ieee_bfd_merge_sections): Define.
4270         * ihex.c (ihex_bfd_merge_sections): Define.
4271         * nlm-target.h (nlm_bfd_merge_sections): Define.
4272         * oasys.c (oasys_bfd_merge_sections): Define.
4273         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4274         * som.c (som_bfd_merge_sections): Define.
4275         * srec.c (srec_bfd_merge_sections): Define.
4276         * tekhex.c (tekhex_bfd_merge_sections): Define.
4277         * versados.c (versados_bfd_merge_sections): Define.
4278         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4280 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
4282         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4283         to be unsigned long, in order to match its use.
4285 2001-05-10  H.J. Lu  <hjl@gnu.org>
4287         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4288         indirect symbols.
4290 2001-05-09  H.J. Lu  <hjl@gnu.org>
4292         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4293         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4294         Remove the unused veriable `dynver'.
4296 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
4298         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4299         NULL or is not COFF.
4300         (coff_i386_rtype_to_howto): Don't dump core if output section
4301         owner is not COFF.
4303 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4305         * ecoff.c (bfd_debug_section): Fix initialization.
4306         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4307         is always a positive integer. Cast away sign mismatch.
4308         * elf32-mips.c: Fix misleading comment and typo.
4309         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4310         correct data type.
4311         * elflink.c: Fix typo.
4312         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4313         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4315 2001-05-04  Richard Henderson  <rth@redhat.com>
4317         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4319 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
4321         * elf32-arm.h (elf32_arm_final_link_relocate): Set
4322         EF_ARM_HASENTRY if the start address is set.
4324 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
4326         * targets.c (_bfd_target_vector_entries): Compute value based on
4327         the size of the _bfd_target_vector and not bfd_target_vector.
4329 2001-05-03  H.J. Lu  <hjl@gnu.org>
4331         * elfcode.h: Include "libiberty.h".
4333         * elflink.h (elf_link_add_object_symbols): Set
4334         elf_dt_name (abfd) to basename of the bfd filename.
4335         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4336         of the bfd filename.
4338 2001-05-03  Andreas Jaeger  <aj@suse.de>
4340         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4341         (elf_generic_info_to_howto_rel): Likewise.
4342         * coff-alpha.c (reloc_nil): Likewise.
4343         (alpha_ecoff_bad_format_hook): Likewise.
4344         (alpha_adjust_reloc_out): Likewise.
4345         (alpha_bfd_reloc_type_lookup): Likewise.
4346         (alpha_convert_external_reloc): Likewise.
4347         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4348         (elf64_alpha_reloc_bad): Likewise.
4349         (elf64_alpha_reloc_gpdisp): Likewise.
4350         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4351         (elf64_alpha_info_to_howto): Likewise.
4352         (elf64_alpha_add_symbol_hook): Likewise.
4353         (elf64_alpha_create_got_section): Likewise.
4354         (elf64_alpha_is_local_label_name): Likewise.
4355         (elf64_alpha_merge_ind_symbols): Likewise.
4356         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4357         (mips_elf64_get_reloc_upper_bound): Likewise.
4358         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4359         (nlm_alpha_get_public_offset): Likewise.
4361 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
4363         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4364         about overflow in R_OPENRISC_LO_16_IN_INSN and
4365         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4367 2001-04-30  H.J. Lu  <hjl@gnu.org>
4369         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4370         only for ELF_LINK_FORCED_LOCAL.
4371         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4372         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4373         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4375         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4376         if the symbol has hidden or internal visibility.
4378 2001-04-30  Alan Modra  <amodra@one.net.au>
4380         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4381         calls to undefined weak symbols.
4383 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4385         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4386         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4388 2001-04-27  Andreas Jaeger  <aj@suse.de>
4390         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4391         out handled entries.
4392         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4393         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4394         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4395         GOT32.
4397 2001-04-27  Sean McNeil <sean@mcneil.com>
4399         * config.bfd: Add arm-vxworks target.
4400         * coff-arm (coff_arm_relocate_section): Add in symbol value to
4401         addend (fro VXworks targets).
4403 2001-04-26  H.J. Lu  <hjl@gnu.org>
4405         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4406         valid.
4408 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
4410         * bfd-in.h (bfd_cache_close): Declare newly exported function.
4411         * bfd-in2.h: Regenerated.
4413 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
4415         * merge.c (struct sec_merge_hash_entry): Add alignment field.
4416         (struct sec_merge_hash): Remove alignment_power.
4417         (sec_merge_hash_newfunc): Clear alignment.
4418         (sec_merge_hash_lookup): Pass alignment as argument.
4419         Use hashp->root.next, not hashp->next to walk the hash chain.
4420         If a string already in the hashtable does not have required
4421         alignment, create a new hashtable entry.
4422         (sec_merge_init): Remove alignment_power argument.
4423         (sec_merge_add): Add alignment argument.
4424         (sec_merge_emit): Alignment is now a per-entity thing, not per
4425         section.
4426         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4427         for proper alignment.
4428         Pass alignment information to sec_merge_add.
4430 2001-04-24  Christian Groessler  <cpg@aladdin.de>
4432         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4433         and R_REL16 reloc types; accept odd values for R_REL16 type
4435 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
4437         * cpu-openrisc.c: New file.
4438         * elf32-openrisc.c: Likewise.
4440         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4441         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4442         (BFD32_BACKENDS): Add elf32-openrisc.lo.
4443         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4444         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4445         * Makefile.in: Regenerated.
4446         * config.bfd: (openrisc-*-elf): New target.
4447         * configure.in (bfd_elf32_openrisc_vec): New vector.
4448         * configure: Regenerated.
4449         * libbfd.h: Regenerated.
4450         * bfd-in2.h: Regenerated.
4451         * reloc.c: Add OpenRISC relocations.
4452         * targets.c (bfd_elf32_openrisc_vec): Declare.
4453         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4454         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4455         (bfd_openrisc_arch): Declare.
4456         (bfd_archures_list): Add bfd_openrisc_arch.
4457         * elf.c (prep_headers): Add bfd_arch_openrisc.
4459 2001-04-23  Bo Thorsen  <bo@suse.de>
4461         * elf64-x86-64.c: Add c++ vtable hack.
4462         Small whitespace and comment changes.
4464 2001-04-19  Andreas Jaeger  <aj@suse.de>
4466         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4467         (elf64_x86_64_plt_entry): Likewise.
4468         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4469         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4471 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
4473         * elf32-cris.c: Tweak comments related to dynamic linking.
4474         (cris_elf_relocate_section): When not creating shared object, fill
4475         in the .got table for any symbol not in the dynamic symbol table.
4476         (elf_cris_finish_dynamic_symbol): When not creating shared object,
4477         only emit a .got.rela reloc if the symbol is in the dynamic symbol
4478         table.
4479         (cris_elf_check_relocs): Use variable r_type in all places rather
4480         than the original expression.  Add default case in switch for
4481         reloc types.
4482         (elf_cris_size_dynamic_sections): Iterate over
4483         elf_cris_discard_excess_program_dynamics when not creating shared
4484         library.
4485         (elf_cris_discard_excess_dso_dynamics): Renamed from
4486         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
4487         (elf_cris_discard_excess_program_dynamics): New.
4489 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
4491         * coffcode.h (coff_write_object_contents): Use
4492         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4494 2001-04-14  H.J. Lu  <hjl@gnu.org>
4496         * bfd-in2.h: Regenerate.
4498 2001-04-14  Jakub Jelinek <jakub@redhat.com>
4500         * section.c (STD_SECTION): Add entsize.
4502 2001-04-13  H.J. Lu  <hjl@gnu.org>
4504         * section.c (SEC_MERGE): Define new flag for merging.
4505         (SEC_STRINGS): Likewise.
4506         (entsize): New field.
4508 2001-04-13  Roger Sayle  <roger@metaphorics.com>
4510         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4511         flag on pe-i386 targets.
4513 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
4515         * libbfd-in.h (_bfd_merge_section): New.
4516         (_bfd_write_merged_section): New.
4517         (_bfd_merged_section_offset): New.
4518         * libbfd.h: Rebuilt.
4519         * linker.c (_bfd_generic_link_output_symbols): Handle
4520         discard_sec_merge.
4521         * aoutx.h (aout_link_write_symbols): Likewise.
4522         * pdp11.c (aout_link_write_symbols): Likewise.
4523         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4524         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4525         sections.
4526         (elf_link_sec_merge_syms): New.
4527         (elf_link_input_bfd): Call _bfd_merged_section_offset
4528         and _bfd_write_merged_section.
4529         Handle discard_sec_merge.
4530         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4531         field.
4532         (struct bfd_elf_section_data): Likewise.
4533         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4534         SEC_STRINGS section flags and entsize from their ELF counterparts.
4535         (_bfd_elf_link_hash_table_init): Initialize merge_info.
4536         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4537         from their BFD counterparts.
4538         * merge.c: New file.
4539         * Makefile.am: Add strtab.lo.
4540         * Makefile.in: Rebuilt.
4542 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
4544         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4545         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4547 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
4549         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4550         endian MIPS ELF target.
4551         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4552         MIPS ELF target.
4554         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4555         64bit big endian MIPS ELF target.
4556         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4557         endian MIPS ELF target.
4558         * configure: Regenerated.
4560         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4561         little endian targets.
4562         (mips_elf_sym_is_global): Handle traditional targets.
4564         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4565         64bit big endian MIPS ELF target.
4566         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4567         endian MIPS ELF target.
4569         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4570         and bfd_elf64_tradlittlemips_vec.
4572 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
4574         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4575         ordinary "progbits" section.
4577 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
4579         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4580         when -Bsymbolic causes a symbol to no longer need a .plt entry.
4582 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
4584         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4586 2001-03-30  H.J. Lu  <hjl@gnu.org>
4588         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4589         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4591 2001-03-26  H.J. Lu  <hjl@gnu.org>
4593         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4594         if there are any relocations for generic ELF.
4595         (bfd_elf32_bfd_link_add_symbols): Defined to
4596         elf32_generic_link_add_symbols.
4597         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4598         if there are any relocations for generic ELF.
4599         (bfd_elf64_bfd_link_add_symbols): Defined to
4600         elf64_generic_link_add_symbols.
4602 2001-03-23  Nick Clifton  <nickc@redhat.com>
4604         * Makefile.am (BUILD_CFILES): New variable: List of C source
4605         files created in build directory.
4606         (BUILD_HFILES): New variable: List of header files created in
4607         build directory.
4608         (POTFILES): Delete.
4609         (po/POTFILES.in): Replace rule with empty entry.
4610         (po/SRC-POTFILES.in): New rule: Create a list of source files
4611         in the source directory.
4612         (po/BLD-POTFILES.in): New rule: Create a list of source files
4613         in the build directory.
4614         (MOSTLYCLEAN): Do not delete source files created in build
4615         directory.
4616         * Makefile.in: Regenerate.
4617         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4618         into po/Makefile.
4619         * configure: Regenerate.
4621         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4622         and BLD_POTFILES.
4623         Add .. to the search path when building bfd.pot.
4624         Delete POTFILES when performing distclean.
4625         Add comment describing why distclean is broken in maintainer mode.
4626         * po/POTFILES.in: Delete.
4627         * po/SRC-POTFILES.in: New file.
4628         * po/BLD-POTFILES.in: New file.
4629         * po/bfd.pot: Regenerate.
4631 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
4633         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
4634         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4635         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4636         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4637         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4638         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4639         functions.
4640         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4641         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
4642         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4643         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4644         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4645         New HOWTO members for new relocs.
4646         (cris_reloc_map): Map new relocs.
4647         (ELF_DYNAMIC_INTERPRETER): Define.
4648         (PLT_ENTRY_SIZE): Define.
4649         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4650         elf_cris_pic_plt_entry): New, PLT templates.
4651         (struct elf_cris_pcrel_relocs_copied, struct
4652         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4653         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4654         (cris_final_link_relocate): Check that 16-bit GOT relocs have
4655         positive values.  Adjust PCREL relocs to be relative to location
4656         after relocation.
4657         (cris_elf_relocate_section): Handle relocations to dynamic
4658         objects.  Handle new relocations.  Call error handler when seeing
4659         non-PIC relocation for read-only sections while generating shared
4660         object.
4661         (cris_elf_check_relocs): Set reference counts for GOT and PLT
4662         entries.
4663         (bfd_elf32_bfd_link_hash_table_create,
4664         elf_backend_adjust_dynamic_symbol,
4665         elf_backend_size_dynamic_sections,
4666         elf_backend_finish_dynamic_symbol,
4667         elf_backend_finish_dynamic_sections,
4668         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4669         elf_backend_hide_symbol, elf_backend_want_got_plt,
4670         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4671         elf_backend_got_header_size, elf_backend_plt_header_size):
4672         Define.
4674         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4675         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4676         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4677         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4678         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4679         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4680         * bfd-in2.h, libbfd.h: Regenerate.
4682 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
4684         (_bfd_mips_elf_relocate_section): Give a better error message when
4685         a relocation is not recognized.
4687 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
4689         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4690         non-NULL before attempting to dereference.
4692 2001-03-20  H.J. Lu  <hjl@gnu.org>
4694         * configure.in: Remove the redundent AC_ARG_PROGRAM.
4695         * configure: Rebuild.
4697 2001-03-20  Andreas Schwab  <schwab@suse.de>
4699         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4700         relocation value when resolving a reference from a debugging
4701         section.
4703 2001-03-16  Scott Thomason  <SThomaso@hii.com>
4705         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4706         (xcoff64_swap_sym_out): Fix syntax errors.
4708 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
4710         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4712 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
4714         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4715         (hppa_link_hash_newfunc): Init it.
4716         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4717         section appears to be non-PIC.
4718         (final_link_relocate): Likewise.
4719         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4720         possible candidate function, and set pic_call for those that will
4721         only have a .plt entry for the PIC call stub.
4722         (hppa_handle_PIC_calls): Set maybe_pic_call.
4724 2001-03-12  DJ Delorie  <dj@redhat.com>
4726         * elf32-sh.c (sh_elf_relocate_section): Only relocation
4727         R_SH_DIR8WP* relocs if they're against external symbols, else
4728         they're just for relaxing.  Validate the reloc values.
4730 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
4732         * binary.c (bfd_external_binary_architecture): Declare.
4733         (binary_object_p): If bfd_external_binary_architecture is defined,
4734         set the architecture to this string.
4736 2001-03-11  Philip Blundell  <philb@gnu.org>
4738         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4739         entries that could serve as a definition for a weak symbol.
4741 2001-03-08  Nick Clifton  <nickc@redhat.com>
4743         * Most files: Update copyright notices using Perl script created
4744         by Kevin Buettner <kevinb@redhat.com>.
4746 2001-03-07  Nick Clifton  <nickc@redhat.com>
4748         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4749         prior patch on ! defined OLD_ARM_ABI.
4751 2001-03-07  Andreas Jaeger  <aj@suse.de>
4753         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4754         some relocation values.
4756 2001-03-06  Nick Clifton  <nickc@redhat.com>
4758         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4759         of offset in BLX(1) instruction.
4760         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4761         offset in BLX(1) instruction.
4762         Fix formatting.
4764 2001-03-06  Nick Clifton  <nickc@redhat.com>
4766         * coff-arm.c (coff_arm_reloc_type_lookup): Add
4767         BFD_RELOC_THUMB_PCREL_BLX.
4769 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
4771         * archures.c (bfd_default_scan): Add Coldfire CPUs.
4772         * bfd-in2.h: Regenerate.
4773         * cpu-m68k.c: Add Coldfire CPUs for arch table.
4774         * ieee.c (ieee_write_processor): Set proper id for
4775         Coldfire CPUs.
4777 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4779         * configure.in: Add s390 target.
4780         * configure: Regenerate.
4782 2001-02-28  Andreas Jaeger  <aj@suse.de>
4784         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4785         to addend.
4787 2001-02-28  Philip Blundell  <pb@futuretv.com>
4789         * elf32-arm.h: Update mentions of renamed EF_xx constants.
4790         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4792 2001-02-27  H.J. Lu  <hjl@gnu.org>
4794         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4795         abfd->tdata.aout_data == NULL.
4797 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
4799         * elf32-hppa.c: Correct field selector in stub comments.
4800         (clobber_millicode_symbols): Formatting fix.
4802         * configure.in: Bump version to 2.11.90.
4803         * configure: Regenerate.
4804         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4805         (CFILES): $SOURCE_CFILES + generated C files.
4806         (POTFILES): Include $HFILES not $SOURCE_HFILES.
4807         Run "make dep-am"
4808         * Makefile.in: Regenerate.
4809         * doc/Makefile.in: This too.
4811 2001-02-26  Timothy Wall  <twall@cygnus.com>
4813         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4814         comments.
4816 2001-02-26  Nick Clifton <nickc@redhat.com>
4818         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4819         up, replacing multiple if statements with a switch.
4820         (handle_COMDAT): New function.
4822 2001-02-26  H.J. Lu  <hjl@gnu.org>
4824         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4825         a warning for section flags we do not handle instead of
4826         aborting.
4828 2001-02-26  Andreas Jaeger  <aj@suse.de>
4830         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4832 2001-02-22  Timothy Wall  <twall@cygnus.com>
4834         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4835         * configure.in: Add objects for elf64_ia64_aix vectors.
4836         * configure: Regenerated.
4837         * configure.host: Recognize ia64-*-aix*.
4838         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
4839         for AIX.  AIX5 requires most relocations to be dynamic (*all*
4840         binaries are somewhat similar to shared libraries).
4841         * targets.c: Add elf64_ia64_aix vectors.
4843 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
4845         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4846         C8 said "1" instead of "8".  Clarify error string for IMM22:
4847         "signed integer" instead of just "integer".
4849 2001-02-20  Andreas Jaeger  <aj@suse.de>
4851         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4852         PLT entries that could serve as a definition for a weak symbol.
4854 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
4856         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4857         entries that could serve as a definition for a weak symbol.
4858         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4860 2001-02-18  David O'Brien  <obrien@FreeBSD>
4862         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4863         FreeBSD/i386-CURRENT differently until I can figure out the needed
4864         corefile changes.
4865         * configure: Regenerate.
4866         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4867         FreeBSD/PowerPC, and FreeBSD/sparc64.
4869 2001-02-18  lars brinkhoff  <lars@nocrew.org>
4871         * Makefile.am: Add PDP-11 a.out target.
4872         * config.bfd: Likewise.
4873         * configure.in: Likewise.
4874         * targets.c: Likewise.
4875         * archures.c: Likewise.
4876         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
4877         * libbfd.h: Add PDP-11 relocations.
4878         * reloc.c: Likewise.
4879         * cpu-pdp11.c: New file.
4880         * pdp11.c: New file.
4882         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4883         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4884         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4885         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4886         (GET_MAGIC): New macro.
4887         (PUT_MAGIC): Likewise.
4888         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4890 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
4892         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4893         multiarch needs it).
4895 2001-02-18  H.J. Lu  <hjl@gnu.org>
4897         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4898         index.
4900 2001-02-18  Kazu Hirata  <kazu@hxi.com>
4902         * vms-misc.c: Fix formatting.
4904 2001-02-16  Kazu Hirata  <kazu@hxi.com>
4906         * vms.c: Fix formatting.
4908 2001-02-14  H.J. Lu  <hjl@gnu.org>
4910         * elf.c (elf_find_function): New function.
4911         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4912         the file name and function name.
4914 2001-02-14  Nick Clifton  <nickc@redhat.com>
4916         * ecoff.c (bfd_debug_section): Update to initialise new fields in
4917         asection structure.
4919         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4920         (BFD64_BACKENDS): Add pepigen.c
4921         Add rules to create peigen.c and pepigen.c from peXXigen.c.
4923         * Makefile.in: Regenerate.
4924         * configure:  Regenerate.
4925         * po/POTFILES.in: Regenerate.
4926         * po/bfd.pot: Regenerate.
4928 2001-02-14  H.J. Lu  <hjl@gnu.org>
4930         * libcoff-in.h (pe_tdata): Add members target_subsystem and
4931         force_minimum_alignment.
4933 2001-02-14  Bo Thorsen  <bo@suse.de>
4935         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4936         (elf64_86_64_size_info): Struct added to fix a problem
4937         with the hashtable string entries.
4938         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4939         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4940         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4941         remove the FIXME for this.
4942         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4943         section. Also removed the FIXME for it.
4944         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4945         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4946         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4948 2001-02-13  Richard Henderson  <rth@redhat.com>
4950         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4951         and not user provided.
4953 2001-02-13  Kazu Hirata  <kazu@hxi.com>
4955         * vms.c (vms_print_symbol): Remove unreachable code.
4957         * rs6000-core.c: Fix formatting.
4959 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
4961         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4962         as _bfd_XXi_only_swap_filehdr_out.
4963         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4964         pe->force_minimum_alignment to TRUE.
4965         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4966         PEI_TARGET_SUBSYSTEM.
4967         (pe_print_private_bfd_data): Call
4968         _bfd_XX_print_private_bfd_data_common() instead of
4969         _bfd_pe_print_private_bfd_data_common().
4970         (pe_bfd_copy_private_bfd_data): Call
4971         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4972         _bfd_pe_bfd_copy_private_bfd_data_common().
4973         (coff_bfd_copy_private_section_data): Define as
4974         _bfd_XX_bfd_copy_private_section_data instead of
4975         _bfd_pe_bfd_copy_private_section_data.
4976         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4977         of a _bfd_pe_get_symbol_info.
4979         * peigen.c: Delete.
4981         * peXXigen.c: Renamed from peigen.c.
4982         (COFF_WITH_XX): Define this macro (will get expanded into
4983         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4984         compiled as peigen.c or pepigen.c.
4985         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4986         define the canonical PEP structures and definitions.
4987         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4988         effect, enforce minimum file and section alignments.  If
4989         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4990         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4991         so, by default, this is a no-op).
4993         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4994         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4995         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4996         _bfd_pefoo if it's not defined.  Use these macros to define
4997         coff swap macros.
4999         * libcoff.h (pe_tdata): Add members target_subsystem and
5000         force_minimum_alignment.
5002         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
5003         COFF_WITH_pep.
5004         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
5006         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
5007         peigen.lo.
5009         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
5010         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
5011         PEPAOUTHDR.
5013         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
5014         (BFD64_BACKENDS_CFILES): Mention pepigen.c
5015         (peigen.c): Add rule to generate from peXXigen.c.
5016         (pepigen.c): Ditto.
5017         (pepigen.lo): List dependencies for pepigen.lo.
5019 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
5021         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
5022         $global$ referenced but not defined, set its value here.
5024 2001-02-09  Bo Thorsen  <bo@suse.de>
5026         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
5027         alignment to 3.
5028         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
5029         and relocation.
5030         (elf64_x86_64_relocate_section): Fix formatting.
5031         (elf64_x86_64_relocate_section): Fix addend for relocation of
5032         R_X86_64_(8|16|32|PC8|PC16|PC32).
5034 2001-02-12  Jan Hubicka  <jh@suse.cz>
5036         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
5038 2001-02-11  H.J. Lu  <hjl@gnu.org>
5040         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5041         alignment.
5043 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5045         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5046         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
5047         relocations against dynsym symbols.
5049         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5050         the R_MIPS_26 relocation.
5051         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5052         the R_MIPS_26 relocation.
5053         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5054         relocation.
5055         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5056         the R_MIPS_26 relocation.
5057         (mips_elf64_howto_table_rela): Likewise.
5059         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5060         member to mark symbols that have non-CALL relocations against
5061         them.
5062         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5063         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5064         R_MIPS_GOT16.
5065         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5066         non-CALL relocation against it is encountered.
5067         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5068         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5069         no_fn_stub is not set.
5071         * elf32-mips.c (mips_elf_output_extsym): Get the output section
5072         information from the real symbol for indirect ones.
5073         Check no_fn_stub to find out if a symbol has a function stub
5074         indeed.
5076 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5078         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5079         * Makefile.in: Regenerate.
5081 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
5083         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
5084         true if section name is an unwind table section name.
5085         (elfNN_ia64_additional_program_headers): Count each unwind section
5086         separately.
5087         (elfNN_ia64_modify_segment_map): Install one unwind program header
5088         for each unwind separate section.  Note: normally the linker
5089         script merges the unwind sections that go into a single segment,
5090         so this still generates at most one unwind program header per
5091         segment.
5093         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5094         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5095         (elfNN_ia64_fake_sections): Mark sections with names that start
5096         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5097         unwind section.
5099         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5100         Use it to make sh_info in unwind section point to the text section
5101         it applies to.
5103 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5105         * Makefile.am: Add linux target for S/390.
5106         * archures.c: Likewise.
5107         * bfd-in2.h: Likewise.
5108         * config.bfd: Likewise.
5109         * configure.in: Likewise.
5110         * elf.c: Likewise.
5111         * libbfd.h: Likewise.
5112         * targets.c: Likewise.
5113         * cpu-s390.c: New file.
5114         * elf32-s390.c: New file.
5115         * elf64-s390.c: New file.
5117 2001-02-09  Nick Clifton  <nickc@redhat.com>
5119         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5120         ImageBase.  This has already been done by coff_swap_hdr_in.
5122 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
5124         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5126 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
5128         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5129         (sparc64_elf_relocate_section): Likewise.
5131 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
5133         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5134         similar to R_SPARC_32.
5135         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5137 2001-02-08  H.J. Lu  <hjl@gnu.org>
5139         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5140         relocation entries for weak definitions when building DSO with
5141         -Bsymbolic.
5143 2001-02-08  Richard Henderson  <rth@redhat.com>
5145         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5146         before visibility.  Locally defined protected symbols are not
5147         dynamic.
5149 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
5151         * config.bfd: Enable coff64 for rs6000-*.  Patch from
5152         <hzoli@austin.ibm.com>.
5154 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
5156         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5157         found, do not attempt to find dwarf2 info before returning.
5159 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
5161         * elflink.h (is_global_symbol_definition): Rename to
5162         is_global_data_symbol_definition and have it reject function
5163         symbols.
5164         (elf_link_is_defined_archive_symbol): Use renamed function.
5166 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
5168         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5169         * libbfd.h (bfd_target_vector): Likewise.
5170         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5171         make static; create pointer reference named bfd_target_vector.
5172         (_bfd_target_vector_entries): Calculate this based on the array
5173         typed _bfd_target_vector.
5175 2001-02-06  H.J. Lu  <hjl@gnu.org>
5177         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5178         internal symbols are not dynamic.
5179         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5181 2001-02-06  Nick Clifton  <nickc@redhat.com>
5183         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5184         that it will not be pulled into the list of files that make up
5185         po/POTFILES.in.
5186         * Makefile.in: Regenerate.
5187         * po/bfd.pot:  Regenerate.
5189 2001-02-06  H.J. Lu  <hjl@gnu.org>
5191         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5192         checking.
5193         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5194         external_PEI_IMAGE_hdr.
5196 2001-02-06  Kazu Hirata  <kazu@hxi.com>
5198         * elf-m10200.c: Fix formatting.
5200 2001-02-04  Nick Clifton  <nickc@redhat.com>
5202         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5203         rel, it will be handled later on.
5205 2001-02-02  Fred Fish  <fnf@ninemoons.com>
5207         * Makefile.in: Fix typo.
5209 2001-02-01  Kazu Hirata  <kazu@hxi.com>
5211         * elf-m10300.c: Fix formatting.
5213 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
5215         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5216         (elf_backend_get_symbol_type): Define.
5217         (elf64_hppa_object_p): Set architecture and machine from elf
5218         header flags.
5220 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
5222         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5223         before mdebug.
5225 2001-01-26  Richard Henderson  <rth@redhat.com>
5227         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5228         for non-default visibility.
5229         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5230         delete ugly macro and replace with pretty function.
5232 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
5234         * coff-go32.c: Update copyright.
5235         * coff-stgo32.c: Likewise.
5236         * coff-go32.c (COFF_LONG_FILENAMES): Define.
5237         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5238         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5239         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5241 2001-01-25  Kazu Hirata  <kazu@hxi.com>
5243         * bfd-in2.h: Rebuild.
5244         * libbfd.h: Likewise.
5246 2001-01-23  H.J. Lu  <hjl@gnu.org>
5248         * bfd-in2.h: Rebuild.
5250 2001-01-23  H.J. Lu  <hjl@gnu.org>
5252         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5253         is NULL or PRIV(vms_rec) is outside of the buffer.
5255 2001-01-23  Kazu Hirata  <kazu@hxi.com>
5257         * coff64-rs6000.c: Fix formatting.
5258         * coff-arm.c: Likewise.
5259         * coffgen.c: Likewise.
5260         * cofflink.c: Likewise.
5261         * coff-mcore.c: Likewise.
5262         * coff-mips.c: Likewise.
5263         * coff-pmac.c: Likewise.
5264         * coff-ppc.c: Likewise.
5265         * coff-rs6000.c: Likewise.
5266         * elf32.c: Likewise.
5267         * elf32-fr30.c: Likewise.
5268         * elf32-i370.c: Likewise.
5269         * elf32-i860.c: Likewise.
5270         * elf32-m32r.c: Likewise.
5271         * elf32-m68k.c: Likewise.
5272         * elf32-mcore.c: Likewise.
5273         * elf32-ppc.c: Likewise.
5274         * elf32-sh.c: Likewise.
5275         * elf32-v850.c: Likewise.
5276         * elf64-alpha.c: Likewise.
5277         * elf64-sparc.c: Likewise.
5278         * elflink.c: Likewise.
5279         * elflink.h: Likewise.
5280         * elf-m10200.c: Likewise.
5281         * elf-m10300.c: Likewise.
5282         * elfxx-ia64.c: Likewise.
5284         * aoutx.h: Fix formatting.
5285         * bfd.c: Likewise.
5286         * bfd-in2.h: Likewise.
5287         * bfd-in.h: Likewise.
5288         * cpu-i386.c: Likewise.
5289         * cpu-m68hc11.c: Likewise.
5290         * dwarf2.c: Likewise.
5291         * elf64-x86-64.c: Likewise.
5292         * format.c: Likewise.
5293         * freebsd.h: Likewise.
5294         * hash.c: Likewise.
5295         * hp300hpux.c: Likewise.
5296         * hppabsd-core.c: Likewise.
5297         * hpux-core.c: Likewise.
5299 2001-01-22  Bo Thorsen  <bo@suse.de>
5301         * elf64-x86-64.c: Added PIC support for X86-64.
5302         (elf64_x86_64_link_hash_newfunc): Function added.
5303         (elf64_x86_64_link_hash_table_create): Likewise.
5304         (elf64_x86_64_check_relocs): Likewise.
5305         (elf64_x86_64_gc_mark_hook): Likewise.
5306         (elf64_x86_64_gc_sweep_hook): Likewise.
5307         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5308         (elf64_x86_64_size_dynamic_sections): Likewise.
5309         (elf64_x86_64_discard_copies): Likewise.
5310         (elf64_x86_64_finish_dynamic_symbol): Likewise.
5311         (elf64_x86_64_finish_dynamic_sections): Likewise.
5312         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5314 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5316         * Makefile.am (install-data-local): Make use of $(DESTDIR).
5317         * Makefile.in: Regenerate.
5319 2001-01-21  Kazu Hirata  <kazu@hxi.com>
5321         * coff-a29k.c: Fix formatting.
5323 2001-01-19  H.J. Lu  <hjl@gnu.org>
5325         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5326         relocation section names.
5327         (elf_i386_relocate_section): Report files with bad relocation
5328         section names and return false.
5330 2001-01-17  Bo Thorsen  <bo@suse.de>
5332         * targets.c: Alphabetize list of xvecs.
5334 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
5336         * config.bfd: Add linux target variant for elfxx-hppa.
5337         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5338         bfd_elf64_hppa_linux_vec.
5339         * configure: Regenerate.
5340         * elf64-hppa.c: Include elf64-target.h again to support linux
5341         target variant.
5342         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5343         * elf32-hppa.c: Include elf32-target.h again to support linux
5344         target variant.
5345         (elf32_hppa_post_process_headers): New function.
5346         (elf_backend_post_process_headers): Define.
5347         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5348         bfd_elf32_hppa_linux_vec.
5350         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5351         and data_segment_base fields.
5352         (elf32_hppa_link_hash_table_create ): Init them.
5353         (elf32_hppa_check_relocs): Update comments.
5354         (hppa_record_segment_addr): New function.
5355         (elf32_hppa_relocate_section): Call it.
5356         (final_link_relocate): Handle R_PARISC_SEGREL32.
5357         (elf32_hppa_final_link): New function.
5358         (bfd_elf32_bfd_final_link): Define to call it.
5359         (hppa_unwind_entry_compare): New function.
5360         * cache.c (bfd_open_file): Create files in write+read mode.
5362         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5363         SEGREL32 and numerous other relocs.  Change duplicate
5364         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5366         * opncls.c (bfd_fdopenr): Add parens like the comment says around
5367         O_ACCMODE.
5369         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5370         .plt entries for DT_INIT and DT_FINI.
5371         (elf32_hppa_finish_dynamic_sections): Remove special handling of
5372         DT_INIT and DT_FINI.
5374         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5375         offsets for stub .plt access if wide mode.  Check offset in range.
5377 2001-01-13  Nick Clifton  <nickc@redhat.com>
5379         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5380         line.
5382         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5383         line.
5385 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
5387         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5388         * configure: Regenerate.
5390 2001-01-11  Peter Targett  <peter.targett@arccores.com>
5392         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5393         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5394         * cpu-arc.c (arch_info_struct): Add entries for variants.
5395         (bfd_arc_arch) Set default to bfd_mach_arc_5.
5396         (arc_get_mach) Don't assume machine names prefixed arc- before
5397         testing.
5398         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5399         selections.
5400         (arc_elf_final_write_processing) Likewise.
5401         (ELF_MACHINE_CODE) Use EM_ARC.
5403 2001-01-10  Nick Clifton  <nickc@redhat.com>
5405         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5407 2001-01-07  Philip Blundell  <philb@gnu.org>
5409         * README: Replace `bug-gnu-utils@gnu.org' with
5410         `bug-binutils@gnu.org'.
5412 2001-01-04  Kazu Hirata  <kazu@hxi.com>
5414         * som.c: Fix formatting.
5416 2001-01-03  Kazu Hirata  <kazu@hxi.com>
5418         * ecoffswap.h: Fix formatting.
5419         * elf-bfd.h: Likewise.
5420         * elfarm-nabi.c: Likewise.
5421         * elfarm-oabi.c: Likewise.
5422         * elfcode.h: Likewise.
5423         * elfcore.h: Likewise.
5424         * elflink.c: Likewise.
5425         * elflink.h: Likewise.
5426         * elfxx-ia64.c: Likewise.
5427         * elfxx-target.h: Likewise.
5428         * libbfd.c: Likewise
5429         * linker.c: Likewise.
5430         * lynx-core.c: Likewise.
5432 2001-01-02  Kazu Hirata  <kazu@hxi.com>
5434         * pc532-mach.c: Fix formatting.
5435         * pe-arm.c: Likewise.
5436         * pe-i386.c: Likewise.
5437         * pe-mips.c: Likewise.
5438         * pe-ppc.c: Likewise.
5439         * pe-sh.c: Likewise.
5440         * pei-mips.c: Likewise.
5441         * pei-sh.c: Likewise.
5442         * peicode.h: Likewise.
5443         * ppcboot.c: Likewise.
5444         * ptrace-core.c: Likewise.
5446 2001-01-01  Kazu Hirata  <kazu@hxi.com>
5448         * reloc.c: Fix formatting.
5449         * riscix.c: Likewise.
5450         * rs6000-core.c: Likewise.
5451         * xcoff-target.h: Likewise.
5453 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5455         * elfcode.h (elf_object_p): Also restore the bfd mach field on
5456         error, by calling bfd_default_set_arch_mach with incoming
5457         values.
5459 2000-12-26  Kazu Hirata  <kazu@hxi.com>
5461         * vaxnetbsd.c: Fix formatting.
5462         * versados.c: Likewise.
5463         * vms-gsd.c: Likewise.
5464         * vms-hdr.c: Likewise.
5465         * vms-misc.c: Likewise.
5467 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
5469         * archive.c (coff_write_armap): Don't write more than symbol_count
5470         `archive_member_file_ptr's.
5472 2000-12-25  Kazu Hirata  <kazu@hxi.com>
5474         * vms-tir.c: Fix formatting.
5476 2000-12-23  Kazu Hirata  <kazu@hxi.com>
5478         * vms.c: Fix formatting.
5479         * vms.h: Likewise.
5481 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
5483         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5485         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5487         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5488         arithmetic.
5490         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5492         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5494 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
5496         * libbfd.c (bfd_get_bits): Added
5497         (bfd_put_bits): Likewise
5498         * bfd-in.h: Declared the above.
5499         * bfd-in2.h: Regenerated.
5501 2000-12-20  Kazu Hirata  <kazu@hxi.com>
5503         * targets.c: Fix formatting.
5504         * tekhex.c: Likewise.
5505         * trad-core.c: Likewise.
5507 2000-12-19  Kazu Hirata  <kazu@hxi.com>
5509         * sco5-core.c: Fix formatting.
5510         * section.c: Likewise.
5511         * sparclinux.c: Likewise.
5512         * sparclynx.c: Likewise.
5513         * sparcnetbsd.c: Likewise.
5514         * srec.c: Likewise.
5515         * stabs.c: Likewise.
5516         * stab-syms.c: Likewise.
5517         * sunos.c: Likewise.
5518         * syms.c: Likewise.
5519         * sysdep.h: Likewise.
5521 2000-12-18  Nick Clifton  <nickc@redhat.com>
5523         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5524         defined.
5525         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5526         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5528 2000-12-18  Nick Clifton  <nickc@redhat.com>
5530         * vms-misc.c (_bfd_vms_get_record): Add default case to
5531         file_format switch.
5533 2000-12-15  Miloslav Trmac <mitr@volny.cz>
5535         * elfcore.h (elf_core_file_p): Move to the start of the program
5536         headers before attempting to read them.
5538 2000-12-14  Kazu Hirata  <kazu@hxi.com>
5540         * peigen.c: Fix formatting.
5541         * som.c: Likewise.
5542         * som.h: Likewise.
5544 2000-12-13  Kazu Hirata  <kazu@hxi.com>
5546         * peigen.c: Fix formatting.
5548 2000-12-12  Jim Wilson  <wilson@redhat.com>
5550         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5552 2000-12-08  Mark Salter  <msalter@redhat.com>
5554         * binary.c (binary_set_section_contents): Ignore sections
5555         with zero size.
5557 2000-12-12  Kazu Hirata  <kazu@hxi.com>
5559         * m68klinux.c: Fix formatting.
5560         * m68knetbsd.c: Likewise.
5561         * mipsbsd.c: Likewise.
5562         * netbsd-core.c: Likewise.
5563         * netbsd.h: Likewise.
5564         * newsos3.c: Likewise.
5565         * nlm32-alpha.c: Likewise.
5566         * nlm32-i386.c: Likewise.
5567         * nlm32-ppc.c: Likewise.
5568         * nlm32-sparc.c: Likewise.
5569         * nlmcode.h: Likewise.
5570         * nlmswap.h: Likewise.
5571         * nlm-target.h: Likewise.
5572         * ns32knetbsd.c: Likewise.
5574 2000-12-10  Fred Fish  <fnf@be.com>
5576         * elflink.h (elf_link_output_extsym): Don't complain about undefined
5577         symbols in shared objects if allow_shlib_undefined is true.
5579 2000-12-12  Nick Clifton  <nickc@redhat.com>
5581         * cpu-sh.c: Fix formattng.
5582         * elf.c: Fix formattng.
5583         * elf32-mips.c: Fix formattng.
5584         * elf32-sh.c: Fix formattng.
5585         * elf64-alpha.c: Fix formattng.
5587 2000-12-09  Nick Clifton  <nickc@redhat.com>
5589         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5590         dwarf2_find_line_info as last parameter to invocation of
5591         _bfd_dwarf2_find_nearest_line.
5592         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5593         dwarf2_find_line_info as last parameter to invocation of
5594         _bfd_dwarf2_find_nearest_line.
5596 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
5598         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5599         (BFD_LIBS): ...to here.
5600         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5601         (BFD_LIBS_CFILES): ...to here.
5602         * Makefile.in: Regenerate.
5603         * configure.in: Remove dwarf.lo from the elf shell variable.
5604         * configure: Regenerate.
5605         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5606         * libcoff.h: Regenerate.
5607         * coffgen.c (coff_find_nearest_line): Call
5608         _bfd_dwarf2_find_nearest_line.
5609         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5610         accordingly.
5611         (read_abbrevs): Likewise
5612         (decode_line_info): Likewise.
5613         (parse_comp_unit): Likewise.
5614         (comp_unit_find_nearest_line): Likewise.
5615         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5616         * libbfd.h: Regenerate.
5617         * elf.c (_bfd_elf_find_nearest_line): Update call.
5618         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5619         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5620         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5621         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5622         (styp_to_sec_flags): Handle DWARF2 sections.
5623         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5624         to _bfd_find_nearest_line.
5625         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5626         call to _bfd_find_nearest_line.
5628 2000-12-08  Kazu Hirata  <kazu@hxi.com>
5630         * coffgen.c: Fix formatting.
5631         * elf-m10300.c: Likewise.
5632         * elf32-i386.c: Likewise.
5633         * elf32-i960.c: Likewise.
5634         * elf32-m68k.c: Likewise.
5635         * elf32-mcore.c: Likewise.
5636         * elf32-ppc.c: Likewise.
5637         * elf32-sh.c: Likewise.
5638         * elf32-sparc.c: Likewise.
5639         * elf32-v850.c: Likewise.
5640         * elf64-alpha.c: Likewise.
5641         * elf64-hppa.c: Likewise.
5642         * elf64-mips.c: Likewise.
5643         * elf64-sparc.c: Likewise.
5645 2000-12-07  Kazu Hirata  <kazu@hxi.com>
5647         * elf32-ppc.c: Fix formatting.
5648         * elf64-x86-64.c: Likewise.
5650 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
5652         From  Ralf Baechle  <ralf@gnu.org>
5654         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5655         BFDs containing no sections or empty .text, .data or .bss sections
5656         to be merged, regardless of their flags.
5658 2000-12-06  Kazu Hirata  <kazu@hxi.com>
5660         * elf32-m32r.c: Fix formatting.
5661         * elf32-m68hc11.c: Likewise.
5662         * elf32-m68hc12.c: Likewise.
5663         * elf32-m68k.c: Likewise.
5664         * elf32-mcore.c: Likewise.
5665         * elf32-pj.c: Likewise.
5666         * elf32-ppc.c: Likewise.
5668 2000-12-05  Kazu Hirata  <kazu@hxi.com>
5670         * elf32-fr30.c: Fix formatting.
5671         * elf32-hppa.c: Likewise.
5672         * elf32-i370.c: Likewise.
5673         * elf32-i386.c: Likewise.
5674         * elf32-i860.c: Likewise.
5675         * elf32-i960.c: Likewise.
5677 2000-12-03  Kazu Hirata  <kazu@hxi.com>
5679         * elf32-arm.h: Fix formatting.
5680         * elf32-avr.c: Likewise.
5681         * elf32-cris.c: Likewise.
5682         * elf32-d10v.c: Likewise.
5683         * elf32-d30v.c: Likewise.
5684         * elf-hppa.h: Likewise.
5685         * elf-m10200.c: Likewise.
5686         * elf-m10300.c: Likewise.
5688 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
5690         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5691         bfd_mach_mips32_4k.  Update FIXME comment.
5692         * archures.c (bfd_mach_mips32): New constant.
5693         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5694         the latter, renumber it.
5695         * bfd-in2.h (bfd_mach_mips32): New constant.
5696         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5697         the latter, renumber it.
5698         * cpu-mips.c (I_mips32): New constant.
5699         (I_mips4K, I_mips32_4k): Rename the former to the latter.
5700         (arch_info_struct): Add bfd_mach_mips32 entry, replace
5701         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5702         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5703         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
5704         with E_MIPS_MACH_MIPS32_4K.
5705         (_bfd_mips_elf_final_write_processing): Replace
5706         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5707         bfd_mach_mips32 case.
5708         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5709         comparison with support for MIPS32.
5710         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5711         MIPS32.
5713         * aoutx.h (NAME(aout,machine_type)): Add cases for
5714         bfd_mach_mips5 and bfd_mach_mips64.
5715         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5716         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5717         * cpu_mips.c (I_mips5, I_mips64): New definitions.
5718         (arch_info_struct): Add entries for bfd_mach_mips5 and
5719         bfd_mach_mips64.
5720         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5721         _bfd_mips_elf_print_private_bfd_data): Add cases for
5722         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5723         (_bfd_mips_elf_final_write_processing): Add cases for
5724         bfd_mach_mips5 and bfd_mach_mips64.
5726         * aoutx.h (NAME(aout,machine_type)): Add a
5727         bfd_mach_mips_sb1 case.
5728         * archures.c (bfd_mach_mips_sb1): New constant.
5729         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5730         * cpu-mips.c (I_sb1): New constant.
5731         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5732         * elf32-mips.c (elf_mips_mach): Add case for
5733         E_MIPS_MACH_SB1.
5734         (_bfd_mips_elf_final_write_processing): Add case for
5735         bfd_mach_mips_sb1.
5737 2000-12-01  Joel Sherrill <joel@OARcorp.com>
5739         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5740         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5741         (sparc*-*-rtems*): Switched from a.out to ELF.
5743 2000-11-30  Jan Hubicka  <jh@suse.cz>
5745         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5746         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5747         (elf64-x86-64.lo): Add dependencies.
5748         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5749         bfd_mach_x86_64_intel_syntax.
5750         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5751         * config.bfd (x86_64): Add.
5752         * configure.in: Add support for bfd_elf64_x86_64_vec.
5753         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5754         (bfd_i386_arch, i8086_ar): Link in.
5755         * elf64-x86-64.c: New file.
5756         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5757         * targets.c (bfd_elf64_x86_64_vec): Add.
5758         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5760 2000-11-30  Kazu Hirata  <kazu@hxi.com>
5762         * xcofflink.c: Fix formatting.
5764 2000-11-28  Kazu Hirata  <kazu@hxi.com>
5766         * aoutx.h: Fix formatting.
5767         * bfd-in.h: Likewise.
5768         * bfd-in2.h: Likewise.
5769         * cache.c: Likewise.
5770         * cisco-core.c: Likewise.
5771         * coff64-rs6000.c: Likewise.
5772         * coffcode.h: Likewise.
5773         * coffswap.h: Likewise.
5774         * corefile.c: Likewise.
5775         * elf32-mips.c: Likewise.
5777 2000-11-27  Kazu Hirata  <kazu@hxi.com>
5779         * aout-adobe.c: Fix formatting.
5780         * coff64-rs6000.c: Likewise.
5781         * coffgen.c: Likewise.
5782         * cofflink.c: Likewise.
5784 2000-11-27  Philip Blundell  <pb@futuretv.com>
5786         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5787         (obj_coff_strings_written): New accessor macro for above.
5788         * libcoff.h: Regenerate.
5789         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5790         strings.
5791         * coffcode.h (coff_write_object_contents): No need to write out
5792         the string table if it's already been done.
5794 2000-11-22  Philip Blundell  <pb@futuretv.com>
5796         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5797         weak undefined symbols.
5799 2000-11-24  Nick Clifton  <nickc@redhat.com>
5801         * archures.c (bfd_mach_arm_5TE): Define.
5802         (bfd_mach_arm+XScale): Define.
5803         * bfd-in2.h: Regenerate.
5805         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5806         BFD_RELOC_ARM_PCREL_BLX.
5808         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5809         XScale machine numbers.
5811         * config.bfd (xscale-elf): Add target.
5812         (xscale-coff): Add target.
5814         * cpu-arm.c: Add xscale machine name.
5815         Add v5t, v5te and XScale machine numbers.
5817 2000-11-23  Kazu Hirata  <kazu@hxi.com>
5819         * aix386-core.c: Fix formatting.
5821 2000-11-22  Jim Wilson  <wilson@redhat.com>
5823         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5824         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5825         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5826         (ins_imms_scaled): Initialize sign_bit at function entry.
5827         (elf64_ia64_operands): Add missing initializers.
5828         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5829         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5830         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5831         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5832         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5833         parameters.
5834         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5835         and free_extsyms at function entry.
5836         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5837         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5838         (get_got): Delete unused local srel.
5839         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5840         (elfNN_ia64_relocate_section): Delete unused local dynindx.
5842 2000-11-21  Kazu Hirata  <kazu@hxi.com>
5844         * coff-a29k.c: Fix formatting.
5845         * coff-h8500.c: Likewise.
5846         * coff-i960.c: Likewise.
5847         * coff-ppc.c: Likewise.
5848         * coff-rs6000.c: Likewise.
5849         * coff-stgo32.c: Likewise.
5850         * coff-tic54x.c: Likewise.
5851         * coff-w65.c: Likewise.
5852         * cpu-h8500.c: Likewise.
5853         * cpu-hppa.c: Likewise.
5854         * cpu-ns32k.c: Likewise.
5855         * ecoff.c: Likewise.
5856         * ecofflink.c: Likewise.
5858 2000-11-21  Nick Clifton  <nickc@redhat.com>
5860         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5861         remove possibility of infinite loop.
5863 2000-11-20  Kazu Hirata  <kazu@hxi.com>
5865         * aix386-core.c: Fix formatting.
5866         * aout-adobe.c: Likewise.
5867         * aout-arm.c: Likewise.
5868         * aout-encap.c: Likewise.
5869         * aout-ns32k.c: Likewise.
5870         * aout-target.h: Likewise.
5871         * aout-tic30.c: Likewise.
5872         * aoutf1.h: Likewise.
5873         * aoutx.h: Likewise.
5874         * archive.c: Likewise.
5875         * bfd-in.h: Likewise.
5876         * bfd-in2.h: Likewise.
5877         * bfd.c: Likewise.
5878         * bout.c: Likewise.
5880 2000-11-17  H.J. Lu  <hjl@gnu.org>
5882         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5883         pltoff entries for DT_INIT and DT_FINI.
5884         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5885         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5886         entries.
5888 2000-11-16  Richard Henderson  <rth@redhat.com>
5890         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5891         (allocate_dynrel_entries): Likewise.
5892         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
5893         (set_pltoff_entry): Likewise.
5894         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5895         (elfNN_ia64_reloc_type_lookup): Likewise.
5896         (elfNN_ia64_install_value): Likewise.
5897         (elfNN_ia64_relocate_section): Likewise.
5898         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5899         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5901 2000-11-16  Kazu Hirata  <kazu@hxi.com>
5903         * cpu-a29k.c: Fix formatting.
5904         * cpu-alpha.c: Likewise.
5905         * cpu-arm.c: Likewise.
5906         * cpu-avr.c: Likewise.
5907         * cpu-d10v.c: Likewise.
5908         * cpu-h8500.c: Likewise.
5909         * cpu-hppa.c: Likewise.
5910         * cpu-i370.c: Likewise.
5911         * cpu-i386.c: Likewise.
5912         * cpu-i960.c: Likewise.
5913         * cpu-ia64-opc.c: Likewise.
5914         * cpu-ia64.c: Likewise.
5915         * cpu-m32r.c: Likewise.
5916         * cpu-m68hc11.c: Likewise.
5917         * cpu-m68hc12.c: Likewise.
5918         * cpu-m68k.c: Likewise.
5919         * cpu-m88k.c: Likewise.
5920         * cpu-mips.c: Likewise.
5921         * cpu-ns32k.c: Likewise.
5922         * cpu-pj.c: Likewise.
5923         * cpu-powerpc.c: Likewise.
5924         * cpu-sh.c: Likewise.
5925         * cpu-sparc.c: Likewise.
5926         * cpu-tic54x.c: Likewise.
5927         * cpu-v850.c: Likewise.
5928         * cpu-vax.c: Likewise.
5929         * cpu-w65.c: Likewise.
5930         * cpu-we32k.c: Likewise.
5931         * cpu-z8k.c: Likewise.
5932         * dwarf1.c: Likewise.
5933         * dwarf2.c: Likewise.
5935 2000-11-15  Kazu Hirata  <kazu@hxi.com>
5937         * coff-arm.c: Fix formatting.
5938         * coff-ppc.c: Likewise.
5939         * coff-rs6000.c: Likewise.
5940         * coff-sh.c: Likewise.
5941         * coff-sparc.c: Likewise.
5942         * coff-tic30.c: Likewise.
5943         * coff-tic54x.c: Likewise.
5944         * coff-tic80.c: Likewise.
5945         * coff-w65.c: Likewise.
5946         * coff-we32k.c: Likewise.
5947         * coff-z8k.c: Likewise.
5949 2000-11-15  Richard Henderson  <rth@redhat.com>
5951         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5952         section with the same ALLOC|LOAD flags as the source section.
5954 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
5956         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5957         by STO_ALPHA constants.
5959 2000-11-14  Kazu Hirata  <kazu@hxi.com>
5961         * coff-pmac.c: Fix formatting.
5962         * coff-ppc.c: Likewise.
5964 2000-11-13  H.J. Lu  <hjl@gnu.org>
5966         * elflink.h (elf_link_add_object_symbols): Also add indirect
5967         symbols for common symbols with the default version.
5969 2000-11-09  Philip Blundell  <pb@futuretv.com>
5971         * section.c (STD_SECTION): Set gc_mark flag.
5973 2000-11-11  Kazu Hirata  <kazu@hxi.com>
5975         * coff-i960.c: Likewise.
5976         * coff-m68k.c: Likewise.
5977         * coff-m88k.c: Likewise.
5978         * coff-mcore.c: Likewise.
5979         * coff-mips.c: Likewise.
5981 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
5983         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5985 2000-11-10  Kazu Hirata  <kazu@hxi.com>
5987         * coff-h8300.c: Fix formatting.
5988         * coff-h8500.c: Likewise.
5989         * coff-i386.c: Likewise.
5990         * coff-i860.c: Likewise.
5991         * coff-i960.c: Likewise.
5992         * coff-ia64.c: Likewise.
5994 2000-11-09  Kazu Hirata  <kazu@hxi.com>
5996         * archive.c: Fix formatting.
5997         * archures.c: Likewise.
5999 2000-11-07  Richard Henderson  <rth@redhat.com>
6001         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
6002         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
6003         * section.c (bfd_set_section_contents): Call memcpy if
6004         section->contents set and location not equal to contents plus offset.
6006 2000-11-08  Kazu Hirata  <kazu@hxi.com>
6008         * bfd-in.h: Fix formatting.
6009         * bfd-in2.h: Likewise.
6010         * bfd.c: Likewise.
6011         * binary.c: Likewise.
6012         * bout.c: Likewise.
6013         * coff-a29k.c: Likewise.
6014         * coff-alpha.c: Likewise.
6015         * coff-apollo.c: Likewise.
6016         * coff-aux.c: Likewise.
6018 2000-11-07  Kazu Hirata  <kazu@hxi.com>
6020         * aix386-core.c: Fix formatting.
6021         * aoutf1.h: Likewise.
6022         * aoutx.h: Likewise.
6023         * archures.c: Likewise.
6024         * armnetbsd.c: Likewise.
6026 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
6028         * coff-h8300.c (special): Adjust reloc address.
6030 2000-11-06  Steve Ellcey <sje@cup.hp.com>
6032         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
6033         to differentiate elf32 and elf64 on ia64.
6034         * bfd-in2.h: Regenerate.
6035         * config.bfd: Add target for "ia64*-*-hpux*".
6036         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
6037         * configure: Regenerate.
6038         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
6039         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
6041         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6042         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
6043         * Makefile.in: Regnerate.
6044         * elf64-ia64.c: Deleted.
6045         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6047 2000-11-06  Kazu Hirata  <kazu@hxi.com>
6049         * aout-adobe.c: Fix formatting.
6050         * aout-arm.c: Likewise.
6051         * aout-cris.c: Likewise.
6052         * aout-encap.c: Likewise.
6053         * aout-ns32k.c: Likewise.
6054         * aout-target.h: Likewise.
6055         * aout-tic30.c: Likewise.
6057 2000-11-05  Philip Blundell  <philb@gnu.org>
6059         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6060         BFDs containing no sections to be merged, regardless of their flags.
6062 2000-11-04  Philip Blundell  <philb@gnu.org>
6064         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6065         if a relocation for an undefined symbol also results in an
6066         overflow.
6068 2000-11-06  Christopher Faylor <cgf@cygnus.com>
6070         * config.bfd: Add support for Sun Chorus.
6072 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
6074         * configure.in: Recognize alpha-*-freebsd*.
6075         * configure: Regenerate.
6077 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
6079         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6080         (Chunk): New global variable set by a parameter in objcopy.c.
6081         (S3Forced): New global variable set by a parameter in
6082         objcopy.c.
6083         (srec_set_section_contents): If S3Forced is true, always generate
6084         S3 records.
6085         (srec_write_section): Use 'Chunk' to limit maximum length of S
6086         records.
6088 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
6090         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6091         * Makefile.in: Regenerate.
6092         * bfd-in2.h: Regenerate.
6093         * po/bfd.pot: Regenerate.
6095 2000-10-31  Philip Blundell  <philb@gnu.org>
6097         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6098         EF_SOFT_FLOAT if it is defined.
6100 2000-10-27  Philip Blundell  <philb@gnu.org>
6102         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6103         attempts to mix PIC code with non-PIC, just mark the output as
6104         being position dependent.
6105         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
6106         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
6107         all mismatches, not just the first one.
6109 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
6111         * ieee.c (ieee_archive_p): Plug one of many possible
6112         memory leaks in error handling.
6114 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
6116         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6117         elf32_sparc_object_p, elf32_sparc_final_write_processing):
6118         Support v8plusb.
6119         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6120         sparc64_elf_object_p): Support v9b.
6121         * archures.c: Declare v8plusb and v9b machines.
6122         * bfd-in2.h: Ditto.
6123         * cpu-sparc.c: Ditto.
6125 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
6127         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6128         of a GOT reloc.
6130         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6131         (SYMBOL_CALLS_LOCAL): New macro.
6132         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6133         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6134         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6135         (ppc_elf_relocate_section): Use flag variable to determine
6136         whether the relocation refers to a local symbol.
6137         Test whether a PLTREL24 reloc will produce a reloc by looking
6138         to see whether a PLT entry was made.
6140 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
6142         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6143         entries that could serve as a definition for a weak symbol.
6145 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
6147         From  Ralf Baechle  <ralf@gnu.org>
6149         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6150         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
6151         against local symbols.
6152         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6154 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
6156         * section.c (struct sec): Add kept_section.
6157         (struct bfd_comdat_info): Remove sec, we can use above.
6158         (STD_SECTION): Add initializer.
6159         (bfd_make_section_anyway): Init here too.
6161         * bfd-in2.h: Regenerate.
6163         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6164         zeroing of `flags'.
6165         (elf_link_input_bfd): Set all asection->symbol->value's here, and
6166         fudge values for discarded link-once section symbols.
6168         * elf64-hppa.c: Include alloca-conf.h
6170 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
6172         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6174         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6176 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
6178         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6180 2000-10-10  Tom Rix <trix@redhat.com>
6182         * section.c (bfd_make_section_anyway): Release newsect ptr when
6183         newsect->symbol fails to alloc.  Use bfd_release instead of free.
6185 2000-10-09  Richard Henderson  <rth@cygnus.com
6187         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6188         (elf64_ia64_unwind_entry_compare): New.
6189         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6191 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
6193         * elflink.h (size_dynamic_sections): Don't create various tags if
6194         .dynstr is excluded from the link.  Don't set first dynsym entry
6195         if dynsymcount is zero.
6196         (elf_bfd_final_link): Don't try to swap out dynamic syms if
6197         .dynsym excluded from the link.  Don't try to write any dynamic
6198         sections excluded from the link.
6200         * elf.c (swap_out_syms): Handle global section symbols.
6202 2000-10-05  DJ Delorie  <dj@redhat.com>
6204         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6205         * coffcode.h (coff_set_alignment_hook): read extended reloc count
6206         (coff_write_relocs): write extended reloc count
6207         (coff_write_object_contents): account for extended relocs
6209 2000-10-05  Jim Wilson  <wilson@cygnus.com>
6211         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6212         field.
6213         * elf.c (_bfd_elf_make_section_from_shdr): Call the
6214         elf_backend_section_flags function.
6215         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6216         code.
6217         (elf64_ia64_section_flags): New function containing flag conversion
6218         code.
6219         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6220         * elfxx-target.h (elf_backend_section_flags): Define.
6221         (elfNN_bed): Initialize elf_backend_section_flags field.
6223 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
6225         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6226         _bfd_elf32_gc_record_vtable.  Correct a comment.
6228 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
6230         From  Ralf Baechle  <ralf@gnu.org>
6232         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6233         produces binaries with got[1] = 0x80000001 to differenciate them
6234         for the dynamic linker from the broken binaries produced by old
6235         versions.
6237 2000-09-30  Petr Sorfa <petrs@sco.com>
6239         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6240         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6241         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6242         * configure: Regenerate.
6244 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
6246         Define two bfd_targets for absence and presence of leading
6247         underscore on symbols.  Make sure to only link same kind.
6248         * elf32-cris.c (cris_elf_object_p,
6249         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6250         cris_elf_merge_private_bfd_data): New.
6251         (elf_backend_object_p, elf_backend_final_write_processing,
6252         bfd_elf32_bfd_print_private_bfd_data,
6253         bfd_elf32_bfd_merge_private_bfd_data): Define.
6254         <Target vector definition>: Include elf32-target.h twice with
6255         different macro settings:
6256         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6257         bfd_elf32_us_cris_vec.
6258         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6259         (elf_symbol_leading_char): First as 0, then '_'.
6260         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6261         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6262         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6263         * configure: Regenerate.
6264         * targets.c: Declare bfd_elf32_us_cris_vec.
6265         * po/bfd.pot: Regenerate.
6267 2000-09-29  Momchil Velikov  <velco@fadata.bg>
6269         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6270         R_ARM_THM_PC22 relocations.
6272 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
6274         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6276 2000-09-29  Momchil Velikov <velco@fadata.bg>
6278         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6279         is has the SEC_HAS_CONTENTS flag set.
6281 2000-09-28  ï¿½Ã–rjan Friberg  <orjanf@axis.com>
6282             Hans-Peter Nilsson  <hp@axis.com>
6284         * aout-cris.c (N_TXTADDR): Define.
6286 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
6288         * som.c: Include alloca-conf.h.
6289         * Makefile.am: "make dep-am"
6290         * Makefile.in: Regenerate.
6292 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
6294         * elf32-hppa.c (plt_stub): New.
6295         (PLT_STUB_ENTRY): Define.
6296         (elf32_hppa_link_hash_table): Change multi_subspace to packed
6297         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
6298         (elf32_hppa_link_hash_table_create): Init to suit.
6299         (elf32_hppa_check_relocs): Set has_12bit_branch and
6300         has_17bit_branch as appropriate.
6301         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
6302         non-local functions.
6303         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
6304         Add space for plt_stub as needed.
6305         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6306         functions at plt_stub.
6307         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6308         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6310         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6311         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
6312         of fixed size, and if negative, disable handling of input sections
6313         before stub section.  Set up default stub group size depending
6314         on detected branch relocs.
6315         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6316         ensure different offsets from sym_value aren't rounded to
6317         different 2k blocks.  Use lrsel and rrsel for other stubs too for
6318         consistency rather than necessity.
6319         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6320         (final_link_relocate): Likewise.
6321         (elf32_hppa_relocate_section): Likewise.
6323         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6324         (_bfd_elf_hppa_gen_reloc_type): Generate them.
6325         (elf_hppa_final_link_relocate): Handle them.
6326         (elf_hppa_relocate_insn): Likewise.
6327         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6329 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
6331         * elfcode.h (elf_object_p): Preserve and clear abfd section
6332         information.  Restore at error.
6334 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
6336         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6337         is empty, make sure that its rva also 0. NT loader dislikes
6338         having otherwise.
6340 2000-09-26  Steve Ellcey <sje@cup.hp.com>
6342         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6343         global by default.
6345 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
6347         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6348         currently unused RELATIVE_DYNAMIC_RELOCS code.
6349         (hppa_discard_copies): Likewise.
6350         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
6351         comments.  Don't check non-code output sections for stub grouping.
6353 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
6355         * section.c (bfd_get_unique_section_name): Return NULL if
6356         bfd_malloc fails.
6358 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6360         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6361         instruction sequence to actually work.
6362         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6363         accordingly.
6365 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
6367         * elf32-sh.c (sh_elf_relocate_section): Use
6368         _bfd_final_link_relocate to apply the relocation against a section
6369         symbol, when doing relocatable links.
6371 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
6373         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6374         to id_sec.
6375         (stub_hash_newfunc): Here too.
6376         (hppa_add_stub): And here.
6377         (elf32_hppa_link_hash_table): Remove stub_section_created,
6378         reloc_section_created, first_init_sec and first_fini_sec.  Add
6379         stub_group.
6380         (elf32_hppa_link_hash_table_create): Init to suit.
6381         (hppa_get_stub_entry): Add support for grouping stub sections.
6382         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
6383         section code.  Index stub vars by section->id.
6384         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
6385         exit paths.  Zap allocation of above removed vars.  Refine
6386         link-once test.
6388         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6389         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6390         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6391         rather than pointer to bfd_link_info.
6392         (hppa_add_stub): Likewise.
6393         (final_link_relocate): Likewise.
6395 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
6397         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6398         link-once sections.
6400 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
6402         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6403         ld/emulparams/shelf.sh.
6405 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6407         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6408         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6409         * bfd-in2.h: Regenerate.
6411 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
6413         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6414         LITUSE relocations incorrectly if -relax is specified on the ld
6415         command line and the displacement field of the load or store
6416         instruction is non-zero. (Patch by paul.winalski@compaq.com)
6418 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
6420         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6421         first_fini_sec here.
6422         (elf32_hppa_size_stubs): Instead correctly find the first .init
6423         and .fini section here.
6425 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
6427         * elf32-hppa.c (clobber_millicode_symbols): New function.
6428         (elf32_hppa_size_dynamic_sections): Call it.
6430 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
6432         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6433         packed.  Add plabel, plt_abs packed booleans.
6434         (hppa_link_hash_newfunc): Init new fields.
6435         (PLABEL_PLT_ENTRY_SIZE): Define.
6436         (hppa_stub_name): Use size_t len vars.
6437         (hppa_add_stub): Likewise.
6438         (elf32_hppa_build_stubs): Likewise.
6439         (hppa_build_one_stub): Kill some compiler warnings.
6440         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6441         if dynamic linking.  Munge the local plt offsets into
6442         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
6443         size_t len vars.  Add assert for plabel addend.
6444         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6445         (elf32_hppa_hide_symbol): New function.
6446         (elf_backend_hide_symbol): Define.
6447         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6448         with h->plabel set.  Don't make plt entries to have dynamic syms
6449         when they have been forced local.  If plt entry is used by a
6450         plabel, make it PLABEL_PLT_ENTRY_SIZE.
6451         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6452         Set up .plt offsets for local syms.
6453         (elf32_hppa_relocate_section): Initialise plt entries for local
6454         syms.  Leave weak undefined plabels zero.  Make global plabel
6455         relocs against function symbol, and leave the addend zero.
6456         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6457         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6458         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
6459         relocs instead of SEGREL32 for dynamic got relocs.
6460         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6461         (elf_backend_got_header_size): Adjust.
6462         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6464         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6465         (hppa_type_of_stub): Use it instead of #if 0
6466         (hppa_discard_copies): Use it here too.
6467         (elf32_hppa_size_dynamic_sections): And here.
6469         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6470         (elf32_hppa_link_hash_table_create): And here.
6471         (hppa_build_one_stub): And here.  Instead keep track of stub
6472         offset using _raw_size.
6473         (elf32_hppa_size_stubs): Likewise.
6474         (elf32_hppa_build_stubs): Likewise.
6475         (hppa_size_one_stub): Likewise.  Resize reloc section too.
6477         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6478         first_fini_sec handling.  Don't search for reloc section or set
6479         hplink->reloc_section_created here.
6480         (elf32_hppa_size_stubs): Instead search for reloc sections, and
6481         set reloc_section_created here.
6482         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6483         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6484         and DT_FINI.
6485         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6487         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6488         with `hplink->root.'.
6489         (elf32_hppa_check_relocs): Likewise.
6490         (elf32_hppa_gc_sweep_hook): Likewise.
6491         (elf32_hppa_adjust_dynamic_symbol): Likewise.
6492         (hppa_handle_PIC_calls): Likewise.
6493         (elf32_hppa_size_dynamic_sections): Likewise.
6494         (elf32_hppa_set_gp): Likewise.
6495         (elf32_hppa_relocate_section): Likewise.
6496         (elf32_hppa_finish_dynamic_symbol): Likewise.
6497         (elf32_hppa_finish_dynamic_sections): Likewise.
6499         From  David Huggins-Daines  <dhd@linuxcare.com>
6500         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6501         defined weak symbols in shared links.
6502         (final_link_relocate): Calls to defined weak symbols in shared
6503         objects must go via import stubs, as the target might not be known
6504         at link time.
6506 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
6508         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6509         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6510         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
6511         the original entries with EMPTY_HOWTOs, and added new ones to fill
6512         in the gap.
6513         (sh_elf_info_to_howto): Make sure the new gap isn't used.
6514         (sh_elf_relocate_section): Likewise.
6516 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
6518         * cpu-mips.c (arch_info_struct): Add mips:4K
6519         * bfd-in2.h (bfd_mach_mips4K): New define.
6520         * archures.c: Add bfd_mach_mips4K to comment.
6521         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6522         E_MIPS_ARCH_2 for bfd_mach_mips4K.
6524 2000-09-13  Marco Franzen <marcof@thyron.com>
6526         * som.c (som_write_symbol_strings): Do not used fixed buffers,
6527         use size_t as a counter.
6528         (som_write_space_strings): Similarly.
6530 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
6532         * elf32-i860.c (elf32_i860_relocate_pc26): New function
6533         and prototype.
6534         (elf32_i860_relocate_section): Invoke new function from here.
6536 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6538         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6539         static.
6541 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6543         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6544         target section name instead of dumping core when the target symbol is
6545         undefined.
6547 2000-09-09  Kazu Hirata  <kazu@hxi.com>
6549         * riscix.c: Remove DEFUN.
6551 2000-09-08  Nick Clifton  <nickc@redhat.com>
6553         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6554         initialise flags in output bfd if the input bfd is the default
6555         architecture with the default flags.
6557 2000-09-08  Kazu Hirata  <kazu@hxi.com>
6559         * archive.c: Fix formatting.
6560         * coff-arm.c: Likewise.
6561         * doc/chew.c: Likewise.
6563 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
6565         * section.c (bfd_get_unique_section_name): Put a dot before the
6566         numeric suffix.
6568 2000-09-07  Kazu Hirata  <kazu@hxi.com>
6570         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6571         * elf.c: Fix formatting.
6573 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
6575         * config.bfd (sh-*-linux*): Added.
6576         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6577         * targets.c: Declare them.
6578         * elf32-sh-lin.c: New file.
6579         * Makefile.am: Compile it.
6580         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6581         * configure, Makefile.in: Rebuilt.
6583 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
6585         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6586         pseduo-section when determining where the TOC ends.
6588         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6589         output x_tvndx as it is only two bytes wide.
6591         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6592         reloc is 26 or 32 bits wide.
6594         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6595         for relocs that don't change anything.  Also look at the full
6596         6 bits of bitsize.
6598 2000-09-06  Philip Blundell  <philb@gnu.org>
6600         * config.bfd (arm*-*-uclinux*): New target.
6602 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
6604         * configure: Rebuilt with new libtool.m4.
6606 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
6608         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6609         word for variable name.
6610         * bfd-in2.h: Regenerate.
6612 2000-09-05  Nick Clifton  <nickc@redhat.com>
6614         * config.in: Regenerate.
6615         * libbfd.h: Regenerate.
6616         * po/bfd.pot: Regenerate.
6617         * doc/bfdint.texi: Remove CVS date string - it foils compares with
6618         local versions.
6620 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
6622         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
6624 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
6626         Shared library and PIC support.
6627         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6628         (GOT_ENTRY_SIZE): New.
6629         (ELF_DYNAMIC_INTERPRETER): New.
6630         (STUB_SUFFIX): Define.
6631         (LONG_BRANCH_PIC_IN_SHLIB): Define.
6632         (RELATIVE_DYNAMIC_RELOCS): Define.
6633         (enum elf32_hppa_stub_type): New.
6634         (struct elf32_hppa_stub_hash_entry): Rename offset to
6635         stub_offset.  Add a number of new fields.
6636         (struct elf32_hppa_link_hash_entry): New.
6637         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
6638         global_value.
6639         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6640         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6641         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
6642         new fields.
6643         (hppa_link_hash_newfunc): New function.
6644         (elf32_hppa_link_hash_table_create): Use above function. Init new
6645         fields.
6646         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
6647         instead of addend, and remove sym_name from args.  Don't use
6648         symbol name for local syms, instead use sym index.
6649         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6650         stub type rather than size.  Pass in hash and handle import stub
6651         case.  Also pass in reloc instead of offset so we can calculate
6652         PCREL22F and PCREL12F branches properly.
6653         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
6654         import and export stubs too.
6655         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
6656         import and export stub sizing.
6657         (elf32_hppa_check_relocs): New function.
6658         (elf32_hppa_adjust_dynamic_symbol): New function.
6659         (hppa_discard_copies): New function.
6660         (elf32_hppa_size_dynamic_sections): New function.
6661         (elf_backend_size_dynamic_sections): Define.
6662         (elf32_hppa_finish_dynamic_symbol): New function.
6663         (elf_backend_finish_dynamic_symbol): Define.
6664         (elf32_hppa_size_stubs): Stash params in link hash table, and move
6665         some local vars into the link hash table too.  For shared links,
6666         trundle over function syms, generating export stubs.  Handle
6667         PCREL22F branches.  Break out stub creation code from here..
6668         (hppa_add_stub): .. to here.  New function.
6669         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6670         call the bfd linker.  Use elf_gp to record global pointer.
6671         Calculate a value from sections if $global$ is missing.
6672         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6673         (elf32_hppa_gc_mark_hook): New function.
6674         (elf_backend_gc_mark_hook): Define.
6675         (elf32_hppa_gc_sweep_hook): New function.
6676         (elf_backend_gc_sweep_hook): Define.
6677         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6678         Add rel to args, and remove howto, input_bfd, offset, addend,
6679         sym_name as we can recalculate these locally.  Handle calls to
6680         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
6681         handling of undefined weak syms.  Check that stubs are in range.
6682         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
6683         message on hitting a DPREL21L reloc that needs fixing.  Subtract
6684         off PC for PCREL14F.  Break out code that does a stub lookup from
6685         here..
6686         (hppa_get_stub_entry): ..to here.  New function.
6687         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6688         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6689         relocs, etc. etc.
6690         (elf32_hppa_finish_dynamic_sections): New function.
6691         (elf_backend_finish_dynamic_sections): Define.
6692         (elf_backend_final_write_processing) Define.
6693         (hppa_handle_PIC_calls): New function.
6694         (elf32_hppa_build_stubs): Call it.  Pass link_info to
6695         hppa_build_one_stub.
6696         (elf32_hppa_create_dynamic_sections): New function
6697         to create .plt and .got then set .plt flags correctly.
6698         (elf_backend_create_dynamic_sections): Define.
6699         (elf32_hppa_object_p): New function.
6700         (elf_backend_object_p): Define.
6701         (elf32_hppa_elf_get_symbol_type): New function.
6702         (elf_backend_get_symbol_type): Define.
6703         (elf_backend_can_gc_sections): Define.
6704         (elf_backend_want_got_plt): Define.
6705         (elf_backend_plt_alignment): Set to 2.
6706         (elf_backend_plt_readonly): Define.
6707         (elf_backend_want_plt_sym): Define.
6708         (elf_backend_got_header_size): Reserve one entry.
6710         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6711         (elf32_hppa_size_stubs): Pass in multi_subspace.
6712         (elf32_hppa_set_gp): Declare.
6714         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6715         (bfd_get_unique_section_name): New function.
6716         * bfd-in2.h: Regenerate.
6718         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6719         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6720         comment.
6722         From  David Huggins-Daines  <dhd@linuxcare.com>
6723         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6724         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6725         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6726         been updated in finish_dynamic_symbol before modifying function
6727         symbol.
6729         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6730         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
6731         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6732         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
6733         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
6734         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6735         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
6736         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6738         From David Huggins-Daines  <dhd@linuxcare.com>
6739         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6740         style of local labels as well.
6742 2000-09-03  Philip Blundell  <philb@gnu.org>
6744         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6745         references to undefined symbols in debugging sections.
6747 2000-09-02  H.J. Lu  <hjl@gnu.org>
6749         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6750         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6751         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6752         section.
6754 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
6756         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6757         (elf32_i860_is_local_label_name): New function and prototype.
6759 2000-09-02  Nick Clifton  <nickc@redhat.com>
6761         * configure.in: Increase version number to 2.10.91.
6762         * configure: Regenerate.
6763         * aclocal.m4: Regenerate.
6764         * config.in: Regenerate.
6765         * po/bfd.pot: Regenerate.
6767 2000-09-02  Daniel Berlin <dberlin@redhat.com>
6769         * elf.c (_bfd_elf_make_section_from_shdr): Add
6770         .gnu.linkobce.wi. to the list of debug section names.
6772 2000-09-02  Nick Clifton  <nickc@redhat.com>
6774         * dwarf2.c (find_debug_info): New function: Locate a section
6775         containing dwarf2 debug information.
6776         (bfd_dwarf2_find_nearest_line): Find all sections containing
6777         debug information and include them in the stash.
6779 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
6781         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6782         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6783         (sh_reloc_map): Add new relocs.
6784         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6785         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6786         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6787         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6788         functions.
6789         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6790         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6791         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6792         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6793         New array constants.
6794         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6795         New variables.
6796         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6797         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6798         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6799         elf_sh_plt_reloc_offset): Define.
6800         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6801         elf_sh_link_hash_table): New structs.
6802         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6803         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6804         relocation types.
6805         (elf_backend_create_dynamic_sections,
6806         bfd_elf32_bfd_link_hash_table_create,
6807         elf_backend_adjust_dynamic_symbol,
6808         elf_backend_size_dynamic_sections,
6809         elf_backend_finish_dynamic_symbol,
6810         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6811         elf_backend_plt_readonly, elf_backend_want_plt_sym,
6812         elf_backend_got_header_size, elf_backend_plt_header_size):
6813         Define.
6814         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6815         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6816         New relocs.
6817         * bfd-in2.h, libbfd.h: Rebuilt.
6819 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
6821         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6822         change.
6824 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
6826         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6827         not initialized, set them to indicate the SH1 instruction set.
6829 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
6831         * acinclude.m4: Include libtool and gettext macros from the
6832         top level.
6833         * aclocal.m4, configure: Rebuilt.
6835 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
6837         * elf.c: Eliminate references to __sparcv9 macro; replace with
6838         autoconf variables HAVE_PSINFO32_T etc.
6839         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6840         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6841         * config.in: Ditto.
6842         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6843         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6844         * aclocal.m4: Ditto.
6845         * configure: Regenerate.
6847 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
6849         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6850         for any shared link, not just shared -Bsymbolic.
6851         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6852         any shared link, and pass link info to it.
6853         (elf_i386_size_dynamic_sections): Update comment.
6854         (elf_i386_discard_copies): Modify to discard relocs for symbols
6855         that have been forced local.
6856         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6857         that have been forced local.
6859 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
6861         * elflink.h (elf_link_add_object_symbols): Allow common
6862         symbols to have an alignment of 1 if explicitly requested, and
6863         not overridden by other definitions.
6865 2000-08-22  Doug Kwan <dkwan@transmeta.com>
6867         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6868         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6870 2000-08-22  H.J. Lu  <hjl@gnu.org>
6872         * elf-bfd.h (elf_link_hash_table): Add runpath.
6874         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6875         * bfd-in2.h: Rebuilt.
6877         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6878         "runpath" field to NULL.
6879         (bfd_elf_get_runpath_list): New function.
6881         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6882         DT_RUNPATH entries.
6884 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
6886         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6887         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6888         explicitly.  Improve validation of r_type.
6890 2000-08-21  H.J. Lu  <hjl@gnu.org>
6892         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6893         dynamic allocated content space.  Add a comment to remind us that
6894         one day this ought to be fixed.
6895         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6896         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6897         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6899 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
6901         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6902         field with the newly relocated value instead of adding it to the
6903         existing immediate field.
6904         (elf32_i860_relocate_splitn): Likewise.
6905         (elf32_i860_relocate_highadj): Likewise.
6907 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
6909         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6910         was previously just a stub).
6912 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
6914         * elflink.c (_bfd_elf_create_got_section): Don't abort().
6915         Formatting fixes.
6916         (_bfd_elf_create_dynamic_sections): Likewise.
6918 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
6920         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6921         for undefined symbols to be the beginning of the section.
6923         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6924         four extra entries at the beginning of the .rela.plt section.
6925         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6926         section to account for the four reserved entries in the .plt section.
6928 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
6930         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6931         to the list of NOPs we recognize after a branch-and-link.
6932         Use the ori NOP when one is needed.
6934         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6935         for large archives.
6937 2000-08-14  Jim Wilson  <wilson@cygnus.com>
6939         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6940         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6941         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
6942         EF_IA_64_ABSOLUTE.
6944 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
6946         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6948 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
6950         * elf32-i860.c (elf32_i860_relocate_section): New function.
6951         (i860_final_link_relocate): New function.
6952         (elf32_i860_relocate_splitn): New function.
6953         (elf32_i860_relocate_pc16): New function.
6954         (elf32_i860_relocate_highadj): New function.
6955         (elf32_i860_howto): Minor adjustments to some relocations.
6956         (elf_info_to_howto_rel): Define.
6957         (elf_backend_relocate_section): Define.
6959 2000-08-10  Nick Clifton  <nickc@cygnus.com>
6961         * elf32-arm.h: Fix formatting.
6963 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
6965         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6967 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
6969         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6971 2000-08-07  Kazu Hirata  <kazu@hxi.com>
6973         * ieee.c (ieee_write_debug_part): Rewrite a comment.
6974         * elf64-ia64.c: Fix a typo.
6976 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
6978         * elf32-i860.c (elf32_i860_howto_table): New structure.
6979         (lookup_howto): New function.
6980         (elf32_i860_reloc_type_lookup): New function.
6981         (elf32_i860_info_to_howto_rela): New function.
6982         (elf_code_to_howto_index): New structure.
6983         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6984         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6985         elf32_i860_reloc_type_lookup.
6987 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
6989         * som.c (struct fixup_format): Constify `format'.
6990         (som_hppa_howto_table): Use SOM_HOWTO macro.
6991         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6992         (som_bfd_reloc_type_lookup): Likewise.
6993         (compare_subspaces): Remove unused `count1', `count2'.
6994         (som_begin_writing): Remove unused `total_reloc_size'.
6995         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6996         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6997         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6998         (som_find_nearest_line): Decorate unused parameter(s).
6999         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
7000         (som_bfd_link_split_section): Likewise.
7002 2000-08-03  Nick Clifton  <nickc@cygnus.com>
7004         * section.c: Restore backed out code.
7005         * elf.c: Restore backed out code.
7006         (copy_private_bfd_data): Fix bug preventing stipped dynamic
7007         binaries from working.
7008         * bfd-in2.h: Regenerate.
7010 2000-08-03  H.J. Lu  <hjl@gnu.org>
7012         * section.c: Back out the change made by Nick Clifton
7013         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
7014         binaries.
7015         * bfd-in2.h: Likewise.
7016         * elf.c: Likewise.
7018 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
7020         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
7022 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
7024         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
7025         * bfd-in2.h, libbfd.h: Regenerate.
7027 2000-07-31  Nick Clifton  <nickc@cygnus.com>
7029         * section.c (struct sec): Add new boolean field 'segment_mark'.
7030         (STD_SECTION): Initialise new field to zero.
7032         * bfd-in2.h: Regenerate.
7034         * elf.c (copy_private_bfd_data): Reorganise section to segment
7035         mapping to cope with moved sections requiring new segments,
7036         and overlapping segments.
7037         (SEGMENT_END): New macro: Return the end address of a segment.
7038         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
7039         contains a section by comparing their VMA addresses.
7040         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
7041         contains a section by comparing their LMA addresses.
7042         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
7043         section should be included in a segment.
7044         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
7045         follows another in memory.
7046         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
7047         segments overlap.
7049 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
7051         * cpu-i860.c: Added comments.
7053         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
7054         bfd_elf32_i860_little_vec.
7055         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
7056         (ELF_MAXPAGESIZE): Changed to 4096.
7058         * targets.c (bfd_elf32_i860_little_vec): Declaration of
7059         new target.
7060         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
7062         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
7063         config for little endian elf32 i860.
7064         (targ_defvec): Define for the new config above
7065         as "bfd_elf32_i860_little_vec".
7066         (targ_selvecs): Define for the new config above
7067         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
7069         * configure.in (bfd_elf32_i860_little_vec): Added recognition
7070         of new target vec.
7072         * configure: Regenerated.
7074 2000-07-27  H.J. Lu  <hjl@gnu.org>
7076         * elflink.h (elf_merge_symbol): Take one more argument,
7077         dt_needed, to indicate if the symbol comes from a DT_NEEDED
7078         entry. Don't overide the existing weak definition if dt_needed
7079         is true.
7080         (elf_link_add_object_symbols): Pass dt_needed to
7081         elf_merge_symbol ().
7083 2000-07-27  Nick Clifton  <nickc@cygnus.com>
7085         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
7086         allocated contents.
7088 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
7090         * configure.host (*-*-aix*): AIX has 'long long' always.
7092         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
7093         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
7094         (xcoff_write_archive_contents_big): Don't update the offset
7095         of the symbol table, xcoff_write_armap will do it.
7097 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
7099         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
7100         of dynobj for SGI_COMPAT checks.
7102 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
7104         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
7105         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
7106         * bfd-in2.h: Regenerate.
7108 2000-07-21  Nick Clifton  <nickc@cygnus.com>
7110         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
7111         range symbol indices in relocs and issue an error message.
7113 2000-07-20  H.J. Lu  <hjl@gnu.org>
7115         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
7116         info->new_dtags when setting DT_FLAGS_1. It will only be set
7117         by the new linker options. It shouldn't break anything.
7119 2000-07-20  H.J. Lu  <hjl@gnu.org>
7121         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
7122         only if info->new_dtags is true.
7124 2000-07-20  H.J. Lu  <hjl@gnu.org>
7126         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
7127         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
7129 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
7131         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
7132         (ALL_MACHINES_CFILES): Add cpu-cris.c.
7133         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
7134         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
7135         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
7136         * Makefile.in: Rebuild.
7137         * aclocal.m4: Rebuild.
7138         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
7139         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
7140         (bfd_cris_arch): Declare.
7141         (bfd_archures_list): Add bfd_cris_arch.
7142         * bfd-in2.h: Rebuild.
7143         * config.bfd: (cris-*-*): New target.
7144         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
7145         * configure: Rebuild.
7146         * elf.c (prep_headers): Add bfd_arch_cris.
7147         * libbfd.h: Rebuild.
7148         * libaout.h (enum machine_type): Add M_CRIS.
7149         * reloc.c: Add CRIS relocations.
7150         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
7151         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
7152         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
7153         * po/POTFILES.in, po/bfd.pot: Regenerate.
7155 2000-07-19  H.J. Lu  <hjl@gnu.org>
7157         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
7158         DF_TEXTREL if DT_TEXTREL is set.
7159         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7160         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7161         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7162         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
7163         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
7164         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7165         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
7166         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7167         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
7168         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
7170         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
7171         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
7172         DT_RPATH is set.
7173         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
7175 2000-07-19  H.J. Lu  <hjl@gnu.org>
7177         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
7178         * bfd-in2.h: Rebuild.
7180         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
7181         (elf_dt_soname): New.
7183         * elf.c (bfd_elf_set_dt_needed_soname): New.
7185         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
7186         entry if the shared object loaded by DT_NEEDED is used to
7187         resolve the reference in a regular object.
7189 2000-07-19  H.J. Lu  <hjl@gnu.org>
7191         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
7192         DT_DEPAUDIT and DT_AUDIT as strings.
7194 2000-07-19  Nick Clifton  <nickc@cygnus.com>
7196         * format.c: Fix formatting.
7198 2000-07-19  H.J. Lu  <hjl@gnu.org>
7200         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
7202 2000-07-19  H.J. Lu  <hjl@gnu.org>
7204         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
7205         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
7206         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
7207         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
7208         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
7209         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
7210         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
7212 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
7214         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
7215         renamed functions from here...
7216         (assign_section_numbers): Use renamed functions.
7217         (prep_headers): Use renamed functions.
7219         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
7220         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
7221         * bfd-in2.h: Regenerate.
7223 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7225         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
7226         parenthesis in if statement.
7228 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
7230         Enable the support for Traditional MIPS.
7231         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
7232         return ict_none appropriately for traditional mips targets.
7233         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
7234         (STUB_MOVE): Conditionalize for traditonal mips.
7235         (STUB_LI16): Likewise.
7236         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
7237         room for RTPROC header.
7238         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
7239         the permission for the PT_DYNAMIC as read, write and execute.
7240         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
7241         for traditonal mips.
7242         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
7243         _DYNAMIC_LINKING for traditonal mips.
7244         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
7245         in case of traditonal mips.
7246         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
7247         entry is required. For a function if PLT is not required then set the
7248         corresponding hash table entry to 0.
7249         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
7250         traditonal mips.
7251         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
7252         shared object set the value to 0.
7253         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
7254         _DYNAMIC_LINKING for traditonal mips.
7255         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
7256         for traditonal mips.
7258 2000-07-15  H.J. Lu  <hjl@gnu.org>
7260         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
7262 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
7264         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
7265         out a structure that is BFD_IN_MEMORY.
7267 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
7269         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
7270         bfd pointer.  Print section id instead of bfd pointer for local
7271         syms.  Prefix addend with `+' for global syms as well as local.
7272         Correct calculation of name component lengths.
7273         (elf64_hppa_check_relocs): Update call to get_dyn_name.
7275         From David Huggins-Daines  <dhd@linuxcare.com>
7276         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
7277         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
7278         (elf64_hppa_modify_segment_map): Likewise.
7280 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7282         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
7283         addresses to be "naturally" sign extended.  Return -1 if unknown.
7284         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
7285         * bfd-in2.h: Regenerate.
7287 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7289         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
7290         and ECOF_SIGNED_64 to list ways to extract an offset.
7291         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
7292         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
7293         Update.
7294         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
7295         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
7297 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7299         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
7300         bfd_get_start_address.
7301         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
7302         (elf_swap_ehdr_out): Ditto.
7304 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
7306         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7307         compatibility with older binutils.
7309 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
7311         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7312         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7314         From Ryan Bradetich  <rbradetich@uswest.net>
7315         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7316         (parse_line_table): Ditto.
7317         (_bfd_dwarf1_find_nearest_line): Ditto.
7318         * syms.c (cmpindexentry): Remove extra `*' from params.
7320 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
7322         * elf32-mips.c (sort_dynamic_relocs): New Function.
7323         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7324         via qsort to sort the dynamic relocations in increasing r_symndx
7325         value.
7327 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
7329         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7330         ATTRIBUTE_UNUSED to unused args.
7331         (get_opd): Likewise.
7332         (get_plt): Likewise.
7333         (get_dlt): Likewise.
7334         (get_stub): Likewise.
7335         (elf64_hppa_adjust_dynamic_symbol): Likewise.
7336         (elf64_hppa_link_output_symbol_hook): Likewise.
7337         (elf64_hppa_check_relocs): Delete unused var.
7338         (elf64_hppa_size_dynamic_sections): Likewise.
7339         (elf64_hppa_finalize_opd): Likewise.
7340         (elf64_hppa_finalize_dynreloc): Likewise.
7341         (elf64_hppa_modify_segment_map): Likewise.
7342         (elf64_hppa_finish_dynamic_sections): Likewise.
7344         * elf-hppa.h (elf_hppa_final_write_processing): Add
7345         ATTRIBUTE_UNUSED to unused args.
7346         (elf_hppa_final_link_relocate): Likewise.
7347         (elf_hppa_record_segment_addrs): Add paretheses.
7348         (elf_hppa_relocate_section): Constify dyn_name.
7350         From  David Huggins-Daines  <dhd@linuxcare.com>
7351         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7352         rearrange case statement so that it gets preferred to 32-bit ones.
7354         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7355         asection->id instead of address of asection structure.
7356         (elf32_hppa_size_stubs): Likewise.
7358         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7359         for .init* and .fini*.
7361         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7362         and addends used in stub names to 32 bits.
7363         (elf32_hppa_size_stubs): Likewise.
7365         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7366         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
7367         not bfd_put_64.  Fix minor comment typo and formatting.
7369         Changes to create multiple linker stubs, positioned immediately
7370         before the section where they are required.
7371         * elf32-hppa.c: Don't include hppa_stubs.h.
7372         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7373         (elf32_hppa_stub_hash_table): Delete.
7374         (elf32_hppa_link_hash_entry): Delete.
7375         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7376         stub_hash_table, and store the struct here rather than a pointer.
7377         Delete output_symbol_count.  Add offset array.  Change
7378         global_value to a bfd_vma.
7379         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7380         (elf32_hppa_stub_hash_traverse): Delete.
7381         (elf32_hppa_name_of_stub): Delete.
7382         (elf32_hppa_link_hash_lookup): Delete.
7383         (elf32_hppa_link_hash_traverse): Delete.
7384         (elf32_hppa_stub_hash_table_init): Delete.
7385         (elf32_hppa_size_of_stub): Pass input section and offset rather
7386         than location and calculate location here.  Don't pass name as all
7387         stubs are now the same size.
7388         (elf32_hppa_stub_hash_newfunc): Init new fields.
7389         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7390         too.
7391         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7392         comparing against ints.  Rewrite stub handling code.
7393         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7394         Case enums to int before comparing against ints.  Remove
7395         bfd_reloc_dangerous case.
7396         (elf32_hppa_build_one_stub): Rewrite.
7397         (elf32_hppa_size_one_stub): New function.
7398         (elf32_hppa_build_stubs): Rewrite.
7399         (elf32_hppa_size_stubs): Pass in linker call-back functions.
7400         Rewrite stub-handling specific code.
7402         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7404         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7406         * hppa_stubs.h: Delete.
7407         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7408         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7409         * Makefile.in: Regenerate.
7411         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7412         e_nlrsel.
7414         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7416         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7417         and section name for bfd_reloc_notsupported error message.
7418         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7419         bfd_reloc_notsupported.
7420         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7422         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7423         undefined weak symbols for all relocs.
7424         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7425         offsets are relative to one past the delay slot.
7426         (elf32_hppa_size_stubs): Account for reloc addend when calculating
7427         branch destination.  Put addend into stub name too.
7428         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7429         adjust by 8 when deciding whether a linker stub is needed.  Put
7430         addend into stub name as for above.
7432         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7433         various args and vars.
7434         (elf32_hppa_bfd_final_link_relocate): Here too.
7435         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
7436         inner block var to avoid shadowing.
7438         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
7439         unsigned.
7440         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7441         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7442         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7444         * libhppa.h: Change practically all unsigned ints to plain ints.
7445         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
7446         prototypes.
7448         From Ryan Bradetich  <rbradetich@uswest.net>
7449         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7450         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7451         suit above.
7452         From  David Huggins-Daines  <dhd@linuxcare.com>
7453         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7454         to the new OP_* ones.
7456         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7457         error exit.  Bail out earlier on plabel relocs that we aren't
7458         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
7459         string, and then don't free our copy.
7460         (elf32_hppa_build_one_stub): Make insn unsigned int.
7462         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7463         available with BL, not BE and BLE.
7465         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7466         code for elf arg relocs.
7467         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7468         argument with elf_link_hash_entry h.  Handle undefined weak
7469         symbols.  Move $global$ lookup from here...
7470         (elf32_hppa_relocate_section): ...to here.  Return correct error
7471         message for non-handled relocs.
7472         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
7473         wrong test was -0x3ffff to +0x40000.
7475         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7476         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7477         Handle them as such.
7478         (elf_hppa_relocate_insn): Fix a typo.
7480         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7481         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7482         assemble_17, assemble_21): Delete.
7483         Supply defines for all 64 possible opcodes.
7484         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7485         formats.  Handle COMICLR.
7486         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
7487         -10, -16, 16, 22.
7489         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7490         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7491         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7492         to suit.
7493         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
7494         the local syms - did this code get deleted accidentally?  Ignore
7495         undefined and undefweak syms.
7497         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7498         block.  Use it instead of elf64_hppa_hash_table (info).
7499         (elf_hppa_final_link_relocate): Use hppa_info instead of
7500         elf64_hppa_hash_table (info).
7502         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7503         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7504         (hppa_rebuild_insn): Mask immediate bits here instead.
7505         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7507 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
7509         * section.c (struct sec): Add id field.  Tidy comment formatting.
7510         (bfd_make_section_anyway): Set id.
7511         (STD_SECTION): Init id too.
7512         Change CONST to const throughout.
7513         * archures.c (bfd_arch_info): Tidy comment.
7514         (bfd_arch_list): Change a CONST to const.
7515         * libbfd-in.h: Tidy comments and replace CONST with const.
7516         * elf-bfd.h: Likewise.
7517         * libbfd.h: Regenerate.
7518         * bfd-in2.h: Regenerate.
7519         * libcoff.h: Regenerate.
7521 2000-07-07  DJ Delorie  <dj@redhat.com>
7523         * archive.c (_bfd_write_archive_contents): Add an informative
7524         comment.
7526 2000-07-06  Kazu Hirata  <kazu@hxi.com>
7528         * srec.c: Fix formatting.
7530 2000-06-05  DJ Delorie  <dj@redhat.com>
7532         * MAINTAINERS: new
7534 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
7536         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7537         value of PC-relative offsets.
7539 2000-07-03  Jim Wilson  <wilson@cygnus.com>
7541         * elf64-alpha.c (alpha_elf_size_info): New.
7542         (elf_backend_size_info): Define to alpha_elf_size_info.
7543         * elfcode.h (elf_size_info): Change hash bucket size to 4.
7545 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
7547         * elf32-mips.c: Include elf32-target.h again for the traditional
7548         MIPS targets.
7550 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
7552         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7553         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7554         (avr_info_to_howto_rela): Likewise.
7555         (elf32_avr_gc_mark_hook): Likewise.
7556         (elf32_avr_gc_sweep_hook): Likewise.
7557         (elf32_avr_relocate_section): Likewise.
7559 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
7561         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7562         an external symbol for a non-shared, non-relocatable link.
7564 2000-07-03  Nick Clifton  <nickc@redhat.com>
7566         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7567         is an external symbol.
7568         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7569         external symbol.
7571 2000-07-03  Kazu Hirata  <kazu@hxi.com>
7573         * reloc16.c: Fix formatting.
7575 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
7577         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7578         to add a new target for traditional mips i.e
7579         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7580         * configure.in: Likewise.
7581         * configure: Rebuild.
7582         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7583         bfd_target_vector.
7584         (bfd_elf32_tradlittlemips_vec): Likewise.
7585         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7586         to see that elfNN_bed does not get redefined even if the target file
7587         is included twice for a chip. See elf32-mips.c.
7589 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
7591         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
7592         (CLEANFILES): Add DEPA.
7593         * Makefile.in: Regenerate.
7595 2000-06-30  DJ Delorie  <dj@cygnus.com>
7597         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7598         can't assume the PE header is at 0x80.
7600 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
7602         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7604 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
7606         * go32stub.h: Update stub.
7608 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
7610         * archures.c (bfd_mach_avr5): Define.
7611         * bfd-in2.h (bfd_mach_avr5): Define.
7612         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7613         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
7614         (compatible): Update comment.  Add missing test.
7615         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7616         for avr2 and avr4.  Simplify 8K wrap code.
7617         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7618         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7620 2000-06-26  Kazu Hirata  <kazu@hxi.com>
7622         * coff-h8300.c: Fix formatting.
7623         * cpu-h8300.c: Likewise.
7625 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
7627         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7628         for local symbols whose names are unknown.
7630 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
7632         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7633         find one.
7634         * Makefile.in: Regenerate.
7635         * doc/Makefile.in: Regenerate.
7637 2000-06-20  H.J. Lu  <hjl@gnu.org>
7639         * Makefile.am: Rebuild dependency.
7640         * Makefile.in: Rebuild.
7642 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7644         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7645         (elf_backend_copy_indirect_symbol): Map to the new function.
7647 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
7649         * archive.c (normalize): Correct pointer comparison when checking
7650         for backslashes.
7651         (bfd_bsd_truncate_arname): Likewise.
7652         (bfd_gnu_truncate_arname): Likewise.
7654 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
7656         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7657         sections elf_{text,data}_{section,symbol}.
7658         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7659         (_bfd_mips_elf_hide_symbol): New function.
7660         (elf_backend_hide_symbol): Map to the new function.
7661         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7662         definitions of mips_elf_{text,data}_{section,symbol}.
7663         (mips_elf_local_relocation_p): Try to find the direct symbol
7664         based on new check_forced argument.
7665         (mips_elf_calculate_relocation): Use new version of
7666         mips_elf_local_relocation_p.
7667         (mips_elf_relocate_section): Likewise.
7668         (_bfd_mips_elf_relocate_section): Likewise.
7669         (mips_elf_sort_hash_table): Only assert that have enough GOT
7670         space.
7671         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7672         entry if the relocation based on the new external argument.
7673         (mips_elf_create_dynamic_relocation): Assert that we have a
7674         section contents allocated where we can swap out the dynamic
7675         relocations.
7676         (mips_elf_calculate_relocation): Find the real hash-table entry
7677         correctly by using h->root.root.type.  Only create a dynamic
7678         relocation entry if the symbol is defined in a shared library.
7679         Create an external GOT entry for the GOT16 relocation if the
7680         symbol was forced local.
7681         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7682         dynamic index if the symbol was forced local.
7684 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7686         * elf32-mips.c: Fix typos in comments.
7688 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
7690         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7691         CORE_VERSION_1.
7693 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
7695         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7696         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7697         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7698         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7699         (bfd_elf32_m68hc11_vec): Likewise.
7700         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7701         Supports 68hc11 & 68hc12  at the same time.
7702         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7703         bfd_target_vector.
7704         (bfd_elf32_m68hc11_vec): Likewise.
7705         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7706         * archures.c (bfd_m68hc12_arch): Define and register in global list
7707         (bfd_m68hc11_arch): Likewise.
7708         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7709         BFD_RELOC_M68HC11_3B): Define.
7710         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7711         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7713 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7715         * elf_bfd.h (struct elf_backend_data): Add info argument to
7716         elf_backend_hide_symbol.
7717         (_bfd_elf_link_hash_hide_symbol): Likewise.
7718         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7719         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7720         * elflink.h (elf_link_add_object_symbols): Likewise.
7721         (elf_link_assign_sym_version): Likewise.
7723 2000-06-18  H.J. Lu  <hjl@gnu.org>
7725         * coff-i386.c (coff_i386_reloc): Don't return in case of
7726         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7727         Compensate PE relocations when linking with non-PE object
7728         files to generate a non-PE executable.
7730 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
7732         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7733         GOT entries if we're doing a static link or -Bsymbolic link.
7735 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
7737         * elflink.h (elf_link_adjust_relocs): Check for and call backend
7738         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7739         available.
7740         (elf_link_output_relocs): Likewise.
7741         (elf_reloc_link_order): Likewise.
7743 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7745         * archures.c (enum bfd_architecture): #define constants for
7746         PowerPc and RS6000 machine numbers.
7747         * bfd-in2.h: Regenerate.
7748         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7749         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
7750         and RS6000 machine numbers using #defined constants from
7751         archures.c.
7752         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7753         machine numbers using #defined constants from archures.c.  Add
7754         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
7755         64-bit words in 620 entry.
7756         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7757         RSC, and RS2.
7758         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7760 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
7762         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7763         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7764         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7766 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7768         * bfd-in.h (bfd_family_coff): Define.
7769         * bfd-in2.h: Regenerate.
7770         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7771         coff_find_nearest_line): Check COFFness using bfd_family_coff()
7772         instead of bfd_target_coff_flavour.
7773         * cofflink.c (_bfd_coff_final_link): Likewise.
7774         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7775         exclude XCOFF files.
7776         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7777         Likewise.
7778         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7779         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7780         * xcofflink.c (XCOFF_XVECP): Delete.
7781         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7782         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7783         bfd_xcoff_record_link_assignment,
7784         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7785         check for bfd_target_xcoff_flavour.
7787 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7789         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7790         files on AIX 4.3.
7791         (read_hdr): New function.
7792         (rs6000coff_core_p): Store mstsave or __context64 struct instead
7793         of trying to extract individual registers.  Set abfd->arch_info
7794         to match the architecture that created the core file.
7795         (rs6000coff_get_section_contents): Delete.
7796         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7798 2000-06-14  H.J. Lu  <hjl@gnu.org>
7800         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7801         is NULL.
7803 2000-06-13  H.J. Lu  <hjl@gnu.org>
7805         * configure: Regenerate.
7807 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
7809         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7810         armpei_little_vec.
7812 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
7814         * configure.in (VERSION): Update to show this is the CVS mainline.
7816 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
7818         * elf32-d10v.c: Include elf/d10v.h
7819         (enum reloc_type): Delete.
7820         * elf32-d30v.c: Include elf/d30v.h
7821         (enum reloc_type): Delete.
7823         * Makefile.am: Run "make dep-am" to regenerate dependencies.
7824         * Makefile.in: Regenerate.
7826         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7827         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7828         move HOWTOs into elf_howto_table.
7829         (R_386_standard, R_386_ext_offset): Define.
7830         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7831         (elf_i386_reloc_type_lookup): Modify calculation of index into
7832         elf_howto_table since we've removed the padding.
7833         (elf_i386_info_to_howto_rel): Likewise.
7834         (elf_i386_relocate_section): Likewise.
7836 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
7838         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7840 2000-06-05  H.J. Lu  <hjl@gnu.org>
7842         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7843         an error when seeing an undefined symbol with hidden/internal
7844         attribute. It is handled in *_relocate_section ().
7846 2000-06-05  H.J. Lu  <hjl@gnu.org>
7848         * elflink.h (elf_fix_symbol_flags): Follow the link for the
7849         indirect symbol for the ELF_LINK_NON_ELF bit.
7850         (elf_link_output_extsym): Don't output the indirect symbol even
7851         if the ELF_LINK_NON_ELF bit is set.
7853 2000-06-01  J.T. Conklin  <jtc@redback.com>
7855         * config.bfd (i[3456]86-*-netbsdelf*): New target.
7856         (i[3456]86-*-netbsdaout*): New target.
7857         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7858         (i[3456]86-*-openbsd*): Likewise.
7860 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
7862         * trad-core.c: From hpux-core.c, include <dirent.h> or
7863         <sys/ndir.h> when possible.
7865 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
7867         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7868         definitions.  We must not assume they are sorted in the file
7869         according to their index numbers.
7871 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
7873         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7874         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
7875         R_PARISC_DIR17F are for absolute branches; Handle them as such.
7877 2000-05-30  Nick Clifton  <nickc@cygnus.com>
7879         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7880         80960CA, 80960MC as valid machine names.
7882 2000-05-30  H.J. Lu  <hjl@gnu.org>
7884         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7885         visibility bits if the symbol is undefined. Correctly handle
7886         weak undefined symbols with hidden and internal attributes.
7888         * elflink.h (elf_link_add_object_symbols): Always turn the
7889         symbol into local if it has the hidden or internal attribute.
7891 2000-05-29  Philip Blundell  <philb@gnu.org>
7893         * ppcboot.c:  Add packed attribute if compiling with GCC.
7895 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
7897         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7899 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
7901         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7902         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7903         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
7904         a few old comments.
7906 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7908         * Makefile.am: Update dependencies with "make dep-am"
7909         * Makefile.in: Regenerate.
7911         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7912         bindtextdomain): Replace defines with those from intl/libgettext.h
7913         to quieten gcc warnings.
7915 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
7917         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7919         * archive.c (normalize, bfd_bsd_truncate_arname,
7920         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7921         file names with backslashes.
7923         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7924         before opening it.
7926         * sysdep.h: Include filenames.h.
7928 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7930         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7932 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7934         * elf64-sparc.c (sparc64_elf_relax_section): New.
7935         (sparc64_elf_relocate_section): Optimize tail call into branch always
7936         if possible.
7937         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7938         (elf32_sparc_relax_section): New.
7940 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7942         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7943         Remove unusued variables.
7944         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7945         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7946         previous fix, so that shared libs really don't influence targets
7947         extension mask and memory model.
7949 2000-05-23  H.J. Lu  <hjl@gnu.org>
7951         * elf64-alpha.c (elf64_alpha_relocate_section): Check
7952         h->root.other not h->other.
7953         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7955         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7957 2000-05-23  H.J. Lu  <hjl@gnu.org>
7959         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7960         undefined symbol with the non-default visibility attributes.
7961         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7962         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7963         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7964         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7965         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7966         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7967         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7968         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7969         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7970         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7971         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7973 2000-05-22  Richard Henderson  <rth@cygnus.com>
7975         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7976         PCREL22, PCREL64I.  Zero size of special relocs.
7977         (elf64_ia64_reloc_type_lookup): Likewise.
7978         (USE_BRL, oor_brl, oor_ip): New.
7979         (elf64_ia64_relax_section): New.
7980         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7981         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7982         (elf64_ia64_relocate_section): Likewise.
7983         (bfd_elf64_bfd_relax_section): New.
7984         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7985         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7986         * bfd-in2.h, libbfd.h: Regenerate.
7988 2000-05-22  Nick Clifton  <nickc@cygnus.com>
7990         * configure.in : Add peigen.lo to MIPS PE targets.
7991         * configure: Regenerate.
7993 2000-05-22  Momchil Velikov  <velco@fadata.bg>
7995         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7996         only if it is known for both input and output bfds. Separate
7997         error message strings as in some languages, it may be necessary
7998         to change more than one place in the string to change between
7999         'big' and 'little'.
8001         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
8002         endianess checks, call _bfd_generic_verify_endian_match() instead.
8004         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
8006         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
8008         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
8009         endianess before checking bfd flavours.
8011 2000-05-22  H.J. Lu  <hjl@gnu.org>
8013         * elflink.h (elf_link_output_extsym): Clear the visibility
8014         field for symbols not defined locally.
8016 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
8018         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
8019         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
8020         (hppa_rebuild_insn): Mask immediate bits here instead.
8021         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
8023 2000-05-18  Momchil Velikov <velco@fadata.bg>
8025         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
8026         relocs for an executable, ensure that they are virtual addresses.
8028 2000-05-18  Jeffrey A Law  (law@cygnus.com)
8030         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
8032 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
8033             Rick Gorton             <gorton@scrugs.lkg.dec.com>
8035         * elflink.h: Add emitrelocations support: when enabled, relocation
8036         information and relocation sections are put into final output
8037         executables.  If the emitrelocations flag is set, do the following:
8038         (elf_bfd_final_link): Emit relocation sections.
8039         (elf_link_input_bfd): Compute relocation section contents.
8040         (elf_gc_sections): Don't clean relocation sections.
8042 2000-05-16  Catherine Moore  <clm@cygnus.com>
8044         * som.c (som_decode_symclass):  Recognize weak symbols.
8046 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
8048         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
8049         read idata section only from dataoff.
8050         (pe_print_edata): Correctly check for valid eat_member.
8052 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
8054         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
8056 2000-05-14  Philip Blundell  <philb@gnu.org>
8058         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
8060 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
8062         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
8064         * peigen.c (pe_print_idata): Look for .idata section and print
8065         info even if data directory has zero entries.  Read idata section
8066         starting from dataoff, and adjust all data offsets to suit.  Cast
8067         all bfd_vma vars to unsigned long before passing to fprintf.
8068         * peigen.c (pe_print_edata): Similarly, look for .edata section
8069         and print info even if data directory has zero entries.  Cast
8070         all bfd_vma vars to unsigned long before passing to fprintf.
8072         From Szabolcs Szakacsits <szaka@F-Secure.com>
8073         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
8074         directory size which may be bogus.
8075         * peigen.c (pe_print_edata): Similarly.
8077 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
8079         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
8080         section is empty.
8081         (copy_private_bfd_data): Allow for space possibly taken up by elf
8082         headers when calculating segment physical address from lma.
8084 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
8086         * versados.c (versados_scan): Init stringlen and pass_2_done.
8088         * trad-core.c (trad_unix_core_file_p): Return
8089         bfd_error_wrong_format rather than bfd_error_file_truncated.
8091         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
8092         add_data_entry.  DataDirectory virtual address is relative.
8093         (pe_print_idata): Account for relative DataDirectory virtual
8094         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
8095         (pe_print_edata): Similarly.
8097         From Szabolcs Szakacsits <szaka@F-Secure.com>
8098         * peigen.c (dir_names): Add Delay Import Directory.
8099         (pe_print_idata):  Always search for bfd section containing
8100         idata address rather than looking up section name.  Print this
8101         section name rather than .idata.
8102         (pe_print_edata): Similarly.  Also print some fields as %08lx.
8103         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
8104         Win32Version.
8106 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
8108         * xcoff.h: Rename to xcoff-target.h
8109         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
8110         * coff-rs6000.c: Ditto.
8111         * coff64-rs6000.c: Ditto.
8112         * coff-pmac.c: Ditto.
8113         * Makefile.in: Regenerate.
8115 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
8117         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
8118         Change U802TOC64MAGIC to U803XTOCMAGIC.
8120 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
8122         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
8123         * bfd-in.h: Prototype bfd_elf_get_arch_size.
8124         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
8126 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
8128         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
8130 2000-05-03  Martin v. L�öwis  <loewis@informatik.hu-berlin.de>
8132         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
8133         hidden and internal symbols.
8134         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
8135         visibility.
8136         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
8137         assign a PLT or GOT entry to symbols with hidden and
8138         internal visibility.
8140 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
8142         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
8143         the .bss section.
8144         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8146 2000-05-02  H.J. Lu  <hjl@gnu.org>
8148         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
8149         ELFOSABI_SYSV.
8151 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
8153         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
8154         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
8155         dependencies.
8156         * Makefile.in: Regenerate.
8158 2000-05-01  Jim Wilson  <wilson@cygnus.com>
8160         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
8161         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
8162         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
8163         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
8164         * Makefile.in: Rebuild.
8166 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
8168         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
8169         doesn't work very well.
8171         * elf-hppa.h (elf_hppa_internal_shdr): Define.
8172         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
8173         Set hdr->s_type to 1 if ARCH_SIZE == 32.
8174         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
8175         (elf_hppa_info_to_howto): Likewise.
8176         (elf_hppa_info_to_howto_rel): Likewise.
8177         (elf_hppa_reloc_type_lookup): Likewise.
8178         (elf_hppa_is_local_label_name): Likewise.
8179         (elf_hppa_fake_sections): Likewise.
8180         (elf_hppa_final_write_processing): Likewise.
8181         (elf_hppa_howto_table): Fully initialise all entries.
8182         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
8183         (elf_hppa_info_to_howto): Likewise.
8184         (elf_hppa_info_to_howto_rel): Likewise.
8185         (elf_hppa_reloc_type_lookup): Likewise.
8186         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
8187         elf_hppa_unmark_useless_dynamic_symbols,
8188         elf_hppa_remark_useless_dynamic_symbols,
8189         elf_hppa_record_segment_addrs, elf_hppa_final_link,
8190         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
8191         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
8192         elf32-hppa.c mess is cleaned up.
8193         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
8194         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
8195         r_field then call hppa_field_adjust inline func with variable
8196         r_field arg, instead call hppa_field_adjust with fixed arg.
8197         In case R_PARISC_PCREL22F, don't set r_field.
8198         (elf_hppa_relocate_insn): Change args and return type to unsigned
8199         int.  Call re_assemble_* funcs to do the work.
8201         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
8202         sign extending.
8204         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
8205         extending.
8206         (sign_extend): Mask first before sign extending.
8207         (low_sign_extend): Rewrite without condition expression.
8208         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
8209         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
8210         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
8211         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
8212         result as function return value rather than through pointer arg.
8213         Accept unsigned int args, and return unsigned int.
8214         (re_assemble_3): New.  Combines function of dis_assemble_3 with
8215         re-assembly of opcode and immediate.
8216         (re_assemble_12): Likewise.
8217         (re_assemble_16): Likewise.
8218         (re_assemble_17): Likewise.
8219         (re_assemble_21): Likewise.
8220         (re_assemble_22): Likewise.
8221         (hppa_field_adjust): Rewrite and document, paying attention to
8222         size of types and signed/unsigned issues.
8223         (get_opcode): Shift before masking.
8224         (FDLW): Rename to FLDW.
8225         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
8226         (hppa_rebuild_insn): Change args and return value to unsigned
8227         int.  Make use of re_assemble_*.  Correct case 11.
8229         * dep-in.sed: Handle ../opcodes/.
8230         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
8231         elf64-hppa.h, hppa_stubs.h, xcoff.h.
8232         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
8233         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
8234         elfarm-nabi.lo dependencies outside of auto-dependency area.
8235         Regenerate dependencies.
8236         * Makefile.in: Regenerate.
8238         * configure.in (TRAD_HEADER): Test non-null before
8239         AC_DEFINE_UNQUOTED.
8240         * configure: Regenerate.
8242         * reloc.c: Fix mis-spelling in comment.
8244 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
8246         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
8247         * vms.c (vms_openr_next_archived_file): Return NULL.
8249 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8251         * coffcode.h Copy changes mistakenly done to libcoff.h in
8252         4/24/2000 patch.
8254 2000-04-29  Andreas Jaeger  <aj@suse.de>
8256         * libbfd-in.h: Correctly check GCC version.
8257         * bfd-in.h: Likewise.
8258         * libhppa.h: Likewise.
8259         * libbfd.h: Regenerate.
8260         * bfd-in2.h: Regenerate.
8262 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8264         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
8265         coffdu-rs6000.{lo,c}.
8266         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
8267         on xcoff.h
8268         * Makefile.in: Regenerate.
8269         * xcoff.h: New file.
8270         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
8271         * coff-rs6000.c: Move all declarations and defines that are
8272         common to the xcoff backends into xcoff.h
8273         * coff64-rs6000.c: Ditto,
8275 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8277         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
8278         _bfd_coff_force_symnames in strings and
8279         _bfd_coff_debug_string_prefix_length to their default values.
8280         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
8282 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8284         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
8285         _bfd_coff_force_symnames in strings and
8286         _bfd_coff_debug_string_prefix_length to their default values.
8288 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
8290         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
8291         Check local_got_refcounts before dereferencing.
8293         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
8294         before deciding we don't need R_PPC_PLT32 relocation.
8295         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
8296         dereferencing.
8298         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
8300         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
8301         .plt entries.
8302         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
8303         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
8304         (elf_i386_relocate_section): Allow for .plt to go missing.
8305         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8306         can use a relative reloc for got as elf_i386_relocate_section.
8307         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8309 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
8311         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8313 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
8315         * Makefile.am (coff64-rs6000.lo): New rule.
8316         * Makefile.in: Regenerate.
8317         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8318         xcoff_is_local_label_name, xcoff_rtype2howto,
8319         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8320         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8321         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8322         (NO_COFF_SYMBOLS): Define.
8323         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8324         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8325         internally.
8326         (MINUS_ONE): New macro.
8327         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8328         relocation.
8329         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8330         coff_SWAP_aux_out): Map to the new functions.
8331         * coff64-rs6000.c: New file.
8332         * libcoff.h (bfd_coff_backend_data): Add new fields
8333         _bfd_coff_force_symnames_in_strings and
8334         _bfd_coff_debug_string_prefix_length.
8335         (bfd_coff_force_symnames_in_strings,
8336         bfd_coff_debug_string_prefix_length): New macros for above fields.
8337         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8338         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
8339         of using coff_swap_sym_in directly.
8340         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8341         (coff_set_flags) Set magic for XCOFF64.
8342         (coff_compute_section_file_positions): Add symbol name length to
8343         string section length if bfd_coff_debug_string_prefix_length is
8344         true.
8345         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8346         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8347         using coff_swap_lineno_in directly.
8348         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8349         and _bfd_coff_debug_string_prefix_length fields.
8350         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8351         symbol names into strings table when
8352         bfd_coff_force_symnames_in_strings is true.
8353         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8354         SET_RELOC_VADDR): New macros.
8355         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8356         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8357         code.
8358         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8359         changes within RS6000COFF_C specific code.
8360         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8361         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8362         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8363         Extend existing hack on target name.
8364         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8365         target name.
8366         * coff-tic54x.c (ticof): Keep up to date with new fields
8367         in bfd_coff_backend_data.
8368         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8369         targ_selvecs to include rs6000coff64_vec for rs6000.
8370         * configure.in: Add rs6000coff64_vec case.
8371         * cpu-powerpc.c: New bfd_arch_info_type.
8373 2000-04-24  Jeffrey A Law  (law@cygnus.com)
8375         * config.bfd: Only disable elf32-hppa vectors, not all of the
8376         BSD and OSF configuration support.  Provide (disabled) clauses
8377         for PA64 support.
8378         * configure.in: Add clause for PA64 support.
8379         * configure: Rebuilt.
8381         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8382         (bfd_elf64_hppa_vec): Declare.
8384         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8385         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8386         (elf64-hppa.lo): Add dependencies.
8387         * Makefile.in: Rebuilt.
8389         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8391 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
8393         * libhppa.h (dis_assemble_16): New function.
8394         (pa_arch): Added pa20w element.
8396 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
8398         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8399         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8400         bfd_elf64_slurp_reloc_table.
8402         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8403         definitions to get external names.
8404         (elf_write_relocs): Renamed from write_relocs and make global.
8405         (elf_slurp_reloc_table): Make global.
8406         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8408         * archive.c (hpux_uid_gid_encode): New function.
8409         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8410         defined and the ID is greater than 99999.
8411         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8412         special uid/gid fields into 32 bit values.
8414 2000-04-21  Matthew Green  <mrg@cygnus.com>
8416         * config.bfd: Add NetBSD/sparc64 support.
8418 2000-04-21  Richard Henderson  <rth@cygnus.com>
8419             David Mosberger  <davidm@hpl.hp.com>
8420             Timothy Wall <twall@cygnus.com>
8421             Jim Wilson  <wilson@cygnus.com>
8423         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8424         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8425         (BFD64_BACKENDS): Add elf64-ia64.lo.
8426         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8427         (cpu-ia64.lo, elf64-ia64.lo): New rules.
8428         * Makefile.in: Rebuild.
8429         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8430         (bfd_ia64_arch): Declare.
8431         (bfd_archures_list): Add bfd_ia64_arch.
8432         * bfd-in2.h: Rebuild.
8433         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8434         * configure: Rebuild.
8435         * configure.host: (ia64-*-linux*): New host.
8436         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8437         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8438         * elf.c (prep_headers): Add bfd_arch_ia64.
8439         * libbfd.h: Rebuild.
8440         * reloc.c: Add IA-64 relocations.
8441         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8442         Declare.
8443         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8444         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8446 2000-04-21  Richard Henderson  <rth@cygnus.com>
8448         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8449         contents when performing a partial link.
8450         (bfd_elf_d30v_reloc_21): Likewise.
8452 2000-04-20  H.J. Lu  <hjl@gnu.org>
8454         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8455         patch to symbols defined by a shared object.
8456         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8458 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
8460         K&R compiler fixes.
8461         * dwarf2.c (concat_filename): Avoid string literal concatenation.
8462         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8464 2000-04-11  David Mosberger  <davidm@hpl.hp.com>
8466         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8467         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8468         (coff-ia64.lo): Add dependency.
8469         * Makefile.in: Regenerate.
8470         * coff-ia64.c: New file.
8471         * efi-app-ia32.c: Ditto.
8472         * efi-app-ia64.c: Ditto.
8473         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8474         (coff_set_flags): Ditto.
8475         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8476         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8477         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8478         * configure: Regenerate.
8479         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8480         (PUT_OPTHDR_IMAGE_BASE): Ditto.
8481         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8482         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8483         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8484         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8485         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8486         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8487         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8488         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8489         (GET_PDATA_ENTRY): Ditto.
8490         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8491         data_start.  Use above macros to read fields that are 64 bit wide for
8492         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
8493         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8494         FileAlignment and SectionAlignment to minimum alignment if they
8495         are zero.
8496         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8497         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8498         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8499         Use above macros to write fields that are 64 bit wide for
8500         COFF_WITH_PEP64.
8501         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8502         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
8503         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
8504         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
8505         begin address, end address, and unwind info address only.  Use
8506         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
8507         print addresses.
8508         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8509         HIGH3ADJ relocation names.
8510         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8511         * targets.c: Declare bfd_efi_app_ia32_vec and
8512         bfd_efi_app_ia64_vec.
8513         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8514         bfd_efi_app_ia64_vec.
8516 2000-04-17  Timothy Wall  <twall@cygnus.com>
8518         * bfd-in2.h: Add prototypes for tic54x load page access.
8519         * bfd-in.h: Regenerate.
8520         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8521         in customized _set_arch_mach function.
8522         * coffcode.h (coff_set_alignment_hook): Set section load page if
8523         the appropriate macro is defined.
8524         (write_object_contents): Read section load page.
8526 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
8528         * elf32-hppa.h: Update copyright date.
8530         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8531         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8533         * elf32-d30v.c (MAX32): Don't use LL suffix.
8534         (MIN32): Define in terms of MAX32.
8535         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8537         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8538         expression.
8540         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8542 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
8544         * dep-in.sed: Match space before file name, not after.
8545         * Makefile.am: Regenerate dependencies.
8546         * Makefile.in: Regenerate.
8548         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8549         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
8550         extend without an if statement.
8552 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
8554         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8555         signed quantites.
8556         * elf32-mips.c (gprel16_with_gp): Likewise.
8557         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8558         here using -0x40000, not (int)0xfffc0000.
8559         (elf32_hppa_size_of_stub): Likewise.
8561 2000-04-11  Timothy Wall  <twall@cygnus.com>
8563         * coff-tic54x.c: Now builds with all targets.
8564         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8565         * Makefile.in: Regenerate.
8566         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8567         unitialized variable.
8569 2000-04-07  Andrew Cagney  <cagney@b1.cygnus.com>
8571         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
8572         --enable-build-warnings option.
8573         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8574         * Makefile.in, configure: Re-generate.
8576 2000-04-07  Nick Clifton  <nickc@cygnus.com>
8578         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8579         BFD_RELOC_THUMB_PCREL_BLX.
8581         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8582         R_ARM_XPC25 and R_ARM_THM_PC22.
8584         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8585         R_ARM_XPC25 and R_ARM_THM_XPC22.
8586         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8587         R_ARM_[XPC25|THM_XPC22].
8589         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8590         elf/arm-oabi.h to elf/arm.h
8592         * Makefile.am: Fix dependency for elfarm-oabi.c
8593         * Makefile.in: Regenerate.
8595         * bfd-in2.h: Regenerate.
8596         * libbfd.h: Regenerate.
8598 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8600         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8601         and restore it on failure.  Release newly allocated tdata on
8602         failure.
8604 2000-04-07  Jim Wilson  <wilson@cygnus.com>
8606         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8607         (decode_line_info): Set it.  Report error if unit->line_offset is
8608         equal to or larger than it.
8610 2000-04-07  Timothy Wall  <twall@cygnus.com>
8612         * targets.c: Added vecs for tic54x.
8613         * reloc.c: Added relocs for tic54x.
8614         * libbfd.h: Regenerated.
8615         * configure: Add TI COFF vecs for tic54x.
8616         * configure.in: Ditto.
8617         * config.bfd (targ_cpu): Recognize new tic54x target.
8618         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8619         * bfd-in2.h: Add tic54x target and relocations.
8620         * Makefile.am, Makefile.in: Add tic54x target.
8621         * archures.c (bfd_archures_list): Add tic54x target.
8622         * coff-tic54x.c: New.
8623         * cpu-tic54x.c: New.
8625 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8627         * elfcore.h (elf_core_file_p): call backend_object_p which
8628         thereby gets an opportunity to update the arch/machine type.
8630 2000-04-06  Timothy Wall  <twall@cygnus.com>
8632         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8633         class.  Handle SEC_CLINK and SEC_BLOCK flags.
8634         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8635         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8637 2000-04-06  Nick Clifton  <nickc@cygnus.com>
8639         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8640         EF_INTERWORK if this is an unknown EABI.
8641         (elf32_arm_merge_private_bfd_data): Check EABI version
8642         numbers.  Only check EF_xxx flags if the EABI version number
8643         is unknown.
8644         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8645         if the EABI version number is unknown.
8646         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8647         if the EABI version number is unknown.
8649 2000-04-05  J"orn Rennecke <amylaar@cygnus.co.uk>
8651         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8652         BFD_RELOC_SH_LOOP_END.
8653         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8654         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8655         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8656         (sh_elf_reloc_loop): New function.
8657         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8658         any more.
8659         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8660         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8661         * bfd-in2.h, libbfd.h: Regenerate.
8663 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
8665         * po/bfd.pot: Regenerate.
8667         * Makefile.am: Remove extraneous mkdep comment.
8668         (MKDEP): Use gcc -MM rather than mkdep.
8669         (DEP): Quote when passing vars to sub-make.  Add warning
8670         message to end.
8671         (DEP1): Rewrite for "gcc -MM".
8672         (CLEANFILES): Add DEP2.
8673         Update dependencies.
8674         * Makefile.in: Regenerate.
8676 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
8678         * configure.in: Added corefile support for AIX 4.3.  In particular,
8679         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8680         compiling rs6000-core.c.
8681         * configure: Regenerated.
8683 2000-04-03  H.J. Lu  <hjl@gnu.org>
8685         * cache.c (bfd_open_file): Unlink the output file only if
8686         it has non-zero size.
8688 2000-04-01  Ken Block USG  <block@zk3.dec.com>
8690         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8691         relative relocations for non-loaded sections in shared objects.
8692         (elf64_alpha_check_relocs): Similarly.
8694 2000-04-03  Hans-Peter Nilsson  <hp@axis.com>
8696         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8697         BFD_RELOC_16 to switch for extended relocs.
8698         (MY_swap_ext_reloc_in): New.
8699         (MY_swap_ext_reloc_out): New.
8700         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8701         than NAME(aout,swap_ext_reloc_in) for extended relocs.
8702         (NAME(aout,squirt_out_relocs)): Similarly use
8703         MY_swap_ext_reloc_out.
8704         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8706 2000-04-03  Kazu Hirata  <kazu@hxi.com>
8708         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8709         the R_PCRWORD_B case.
8711 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
8713         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8714         on some targets.
8715         * ihex.c : Ditto.
8717 2000-03-30  Donald Lindsay  <dlindsay@cygnus.com>
8719         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
8720         HOWTO references to bfd_elf_generic_reloc, that have
8721         partial_inplace == true, now use the new function.  The function
8722         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8723         extends its fixes to the R_M32R_{16,24,32} relocs.
8724         The new logic in m32r_elf_lo16_reloc() has been removed, and
8725         it instead calls the new routine to obtain that functionality.
8727 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
8729         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8730         elf32_avr_check_relocs, avr_final_link_relocate,
8731         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8732         elf32_avr_object_p): Add prototypes.
8733         (elf32_avr_gc_mark_hook): Add default for h->root.type.
8734         (bfd_elf_avr_final_write_processing): Make static.
8736 2000-03-27  Denis Chertykov  <denisc@overta.ru>
8738         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
8739         * archures.c (bfd_architecture): Add AVR architecture.
8740         (bfd_archures_list): Add reference to AVR architecture info.
8741         * elf.c (prep_headers): Handle bfd_arch_avr.
8742         * reloc.c: Add various AVR relocation enums.
8743         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8744         list.
8745         * Makefile.am: Add support for AVR elf.
8746         * configure.in: Likewise.
8747         * config.bfd: Likewise.
8748         * Makefile.in: Regenerate.
8749         * configure: This too.
8750         * bfd-in2.h: And this.
8751         * libbfd.h: And this.
8753 2000-03-24  H.J. Lu  <hjl@gnu.org>
8755         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8756         (elf64_alpha_find_reloc_at_ofs): Likewise.
8758 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
8760         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8761         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
8762         allowable range used to be -2**(n-1) to 2**n-1.
8763         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
8764         "boolean overflow" with "bfd_reloc_status_type flag".
8766 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
8768         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8770 2000-03-14  Kazu Hirata  <kazu@hxi.com>
8772         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8773         of shrinks properly, including the last reloc.
8775 2000-03-13  Kazu Hirata  <kazu@hxi.com>
8777         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8778         check for R_MOVL2.
8780 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
8782         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8783         a format mismatch rather than an "error" from bfd_read such as
8784         bfd_error_file_truncated.
8786 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
8788         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8789         sign-extension and big-endian compensation for
8790         R_MIPS_64 even in ld -r.
8792 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
8794         * elf32-mips.c (mips_elf_next_relocation): Rename from
8795         mips_elf_next_lo16_relocation, and generalize to look
8796         for any relocation type.
8797         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8798         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8799         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8800         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8801         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8802         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8803         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8804         (mips_rtype_to_howto): Likewise.
8805         (mips_elf_calculate_relocation): Handle new relocs.
8806         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8807         are paired.  The addend for R_MIPS_GNU_REL16_S2
8808         is shifted right two bits.
8810 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
8812         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8813         comment, and ensure it doesn't happen again.
8814         (bfd_install_relocation): Same here.
8815         (_bfd_relocate_contents): Don't bother assigning unused signmask
8816         shift result.  Fix typos in comments.
8817         Remove trailing whitespace throughout file.
8819 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
8821         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8822         * bfd-in2.h: Rebuild.
8824 2000-03-06  Nick Clifton  <nickc@cygnus.com>
8826         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8827         sym_ptr_ptr fields.
8828         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8829         (SIZEOF_ILF_STRINGS): Redefine.
8830         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
8831         relative reloc, as opposed to a section relative reloc.
8832         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8833         not C_LABEL.
8834         Add length of symbol's prefix to string pointer.
8835         Store a pointer to the symbol in the symbol pointer table.
8836         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8837         Initialise the symbol pointer table.
8838         Store the hint in the Hint/Name table.
8839         Make the jump reloc be symbol realtive, not section relative.
8840         Create an import symbol for imported code.
8842 2000-03-06  Catherine Moore  <clm@cygnus.com>
8844         * elf.c (swap_out_syms):  Check for null type_ptr.
8846 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
8848         * aout-target.h (MY(write_object_contents)): Remove unused
8849         and unusable "#if CHOOSE_RELOC_SIZE".
8850         * pc532-mach.c (MY(write_object_contents)): Ditto.
8851         * netbsd.h (MY(write_object_contents)): Ditto.
8852         * hp300hpux.c (MY(write_object_contents)): Ditto.
8853         * freebsd.h (MY(write_object_contents)): Ditto.
8854         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8856 2000-02-29  H.J. Lu  <hjl@gnu.org>
8858         * peicode.h (jtab): Make it static.
8860         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8861         defined and COFF_IMAGE_WITH_PE is not defined.
8862         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8863         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8865 2000-03-01  Nick Clifton  <nickc@cygnus.com>
8867         * coff-arm.c (bfd_arm_process_before_allocation): Make
8868         'symndx' signed to prevent compile time warning.
8870         * coff-mcore.c: Remove unused prototype for pe_object_p.
8872         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8873         functions that are not used when COFF_IMAGE_WITH_PE is
8874         defined.
8875         (struct sh_opcode): Change type of 'flags' field to unsigned
8876         long so that it can hold the USESAS flag.
8878         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8880         * elf-m10300.c (mn10300_elf_relax_section): Initialise
8881         'sym_sec'.
8883         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8884         parameters.
8885         Remove unusued variables and code.
8886         (elf_backend_add_symbol_hook): Fix prototype.
8888         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8889         'srelgot'.
8891         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8892         'oldinst'.
8894         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8895         parameters.
8896         Remove unusued variables and code.
8897         (elf_backend_add_symbol_hook): Fix prototype.
8899         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8901         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8902         to unused function parameter.
8904         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8905         parameters.
8906         Use EMPTY_HOWTO to initialise empty howto slots.
8907         Remove unused variables.
8909         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8911 2000-03-01  H.J. Lu  <hjl@gnu.org>
8913         * aoutx.h (aout_link_input_section_std): Pass "true" to
8914         the undefined_symbol callback.
8915         (aout_link_input_section_ext): Likewise.
8916         * bout.c (get_value): Likewise.
8917         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8918         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8919         Likewise.
8920         (alpha_relocate_section): Likewise.
8921         * coff-arm.c (coff_arm_relocate_section): Likewise.
8922         * coff-i960.c (coff_i960_relocate_section): Likewise.
8923         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8924         * coff-mips.c (mips_relocate_section): Likewise.
8925         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8926         * coff-sh.c (sh_relocate_section): Likewise.
8927         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8928         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8929         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8930         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8931         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8932         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8933         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8934         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8935         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8936         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8937         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8938         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8939         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8940         * elflink.h (elf_link_output_extsym): Likewise.
8941         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8942         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8943         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8945         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8946         undefined_symbol callback when building shared library with
8947         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8948         "true".
8949         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8950         * elf32-i386.c (elf_i386_relocate_section): Likewise.
8951         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8952         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8953         (elf32_mips_get_relocated_section_content): Likewise.
8954         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8955         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8956         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8957         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8959 2000-02-28  Nick Clifton  <nickc@cygnus.com>
8961         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8962         * Makefile.in: Regenerate.
8964         * configure.in: Add support for mips and sh pe vectors.
8965         * configure: regenerate.
8967         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8968         targets.
8970         * targets.c: Add mips and sh pe vectors.
8972         * libpei.h (coff_final_link_postscript): Only define if not
8973         already defined.
8975         * coffcode.h: Add support for WinCE magic numbers.
8977         * peigen.c (pe_print_reloc): Update comment and rearrange
8978         appending of newline character.
8980         * peicode.h: Add support for Image Library Format.
8981         (pe_ILF_vars): Structure containing data used by ILF code.
8982         (pe_ILF_make_a_section): New function.  Create a section based
8983         on ILF data.
8984         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
8985         ILF data.
8986         (pe_ILF_make_a_symbol): New function.  Create a symbol based
8987         on ILF data.
8988         (pe_ILF_save_relocs): New function.  Store the relocs created
8989         by pe_ILF_make_a_reloc in a section.
8990         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
8991         an ILF object.
8992         (pe_ILF_object_p): New function.  Return a bfd_target pointer
8993         for an ILF object.
8994         (pe_bfd_object_p): If an ILF object is detected call
8995         pe_ILF_object_p on it.
8997         * coff-arm.c: Add support for WinCE relocs which are different
8998         from normal ARM COFF relocs.
8999         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
9001         * coff-sh.c: Add support for sh-pe target.
9002         * pe-sh.c: New file.  Support code for sh-pe target.
9003         * pei-sh.c: New file.  Support code for sh-pe target.
9005         * pe-mips.c: New file.  Support code for mips-pe target.
9006         * pei-mips.c: New file.  Support code for mips-pe target.
9008 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
9010         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
9011         architecture if the object causing the bump is dynamic.
9012         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
9013         and also don't it for memory ordering.
9014         (sparc64_elf_write_relocs): Take src_rela out of the loop.
9016 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
9018         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
9019         calling bfd_get_section_size_before_reloc.
9020         (decode_line_info): Likewise.
9021         (_bfd_dwarf2_find_nearest_line): Likewise.
9023 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
9025         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
9026         name of the libtool directory.
9027         * Makefile.in: Rebuild.
9029 2000-02-25  Rodney Brown (RodneyBrown@pmsc.com)
9031         * som.c (SOM_HOWTO): Define.
9032         (som_hppa_howto_table): Use it.
9034 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
9036         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
9038         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
9040 2000-02-24  Catherine Moore  <clm@cygnus.com>
9042         * som.c (som_misc_symbol_info):  Add field
9043         secondary_def.
9044         (som_bfd_derive_misc_symbol_info):  Initialize
9045         secondary_def.
9046         (som_build_and_write_symbol_table): Keep track
9047         of secondary_def field.
9048         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
9049         if secondary_def field is set.
9050         (som_bfd_ar_write_symbol_stuff): Initialize
9051         secondary_def.
9053 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
9055         * dwarf2.c (read_address): Read 16-bits addresses.
9056         (parse_comp_unit): Accept addr_size == 2.
9058 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
9060         * bfd-in.h: Update copyright date.
9062 2000-02-23  Linas Vepstas <linas@linas.org>
9064         * cpu-i370.c: New file.
9065         * elf32-i370.c:  New file.
9066         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
9067         (bfd_i370_arch): New.
9068         (bfd_archures_list): Add bfd_i370_arch.
9069         * elf.c (prep_headers): Add bfd_arch_i370.
9070         * Makefile.am: Add support for IBM 370 elf.
9071         * config.bfd: Likewise.
9072         * configure.in: Likewise.
9073         * libbfd.h (bfd_reloc_code_real_names): Likewise.
9074         * reloc.c (bfd_reloc_code_type): Likewise.
9075         * targets.c: Likewise.
9077         * Makefile.in: Regenerate.
9078         * configure: Regenerate.
9079         * bfd-in2.h: Regenerate.
9081 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
9083         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
9084         invalid relocation types, and change them to R_386_NONE.
9086 2000-02-22  H.J. Lu  <hjl@gnu.org>
9088         * elflink.h (elf_link_add_object_symbols): If a version symbol is
9089         not defined, don't add a second ELF_VER_CHR.
9091         * elflink.h (elf_bfd_final_link): Call output_extsym for global
9092         symbols converted to local symbols even when stripping all
9093         symbols.
9094         (elf_link_output_extsym): Process global symbols converted to
9095         local symbols even if they are being stripped.
9097 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
9099         * archures.c (bfd_octets_per_byte): Return unsigned int.
9100         (bfd_arch_mach_octets_per_byte): Ditto.
9101         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
9102         comparison warning.
9103         * section.c (bfd_get_section_size_before_reloc): Quell signed
9104         vs. unsigned comparison warning.
9105         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
9106         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
9107         change.  What was I thinking?
9108         * bfd-in2.h: Regenerate.
9110         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
9111         (elf_gc_sections): Same here.
9112         (elf_gc_common_finalize_got_offsets): And here.
9114 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
9116         ELF HPPA doesn't work at present; remove it until it does.
9117         * config.bfd: Comment out setting targ_defvec to
9118         bfd_elf32_hppa_vec.
9119         * Makefile.am: Rebuild dependencies.
9120         (BFD32_BACKENDS): Remove elf32-hppa.lo.
9121         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
9122         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
9123         * Makefile.in: Rebuild.
9124         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
9126 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
9128         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
9129         is no bfd_free().  Revert bfd_free part of previous change.
9131 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
9133         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
9134         arrays.
9135         (coff_compute_section_file_positions): Use bfd_free to pair
9136         bfd_malloc.
9137         (coff_write_object_contents): Likewise.
9139         * coff-rs6000.c (xcoff_howto_table_16): New variable.
9140         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
9142 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
9144         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
9145         (xcoff_ar_file_hdr_big): New structure.
9146         (SIZEOF_AR_FILE_HDR_BIG): New macro.
9147         (xcoff_ar_hdr_big): New structure.
9148         (SIZEOF_AR_HDR_BIG): New macro.
9149         (xcoff_big_format_p): New macro.
9150         (xcoff_ardata_big): New macro.
9151         (arch_xhdr_big): New macro.
9152         (xcoff_slurp_armap): Handle large archives.
9153         (xcoff_archive_p): Detect large archives.
9154         (xcoff_read_ar_hdr): Handle large archives.
9155         (xcoff_openr_next_archived_file): Handle large archives.
9156         (xcoff_generic_stat_arch_elt): Handle large archives.
9157         (xcoff_write_armap_old): Rename from xcoff_write_armap.
9158         (xcoff_write_armap_big): New function.
9159         (xcoff_write_armap): New function, dispatch to _old or _big.
9160         (xcoff_write_archive_contents_old): Rename from
9161         xcoff_write_archive_contents.
9162         (xcoff_write_archive_contents_big): New function.
9163         (xcoff_write_archive_contents): New function, dispatch to _old or
9164         _big.
9166 2000-02-18  Richard Henderson  <rth@cygnus.com>
9168         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
9169         and hide_symbol members.
9170         (elf_link_hash_copy_indirect): Remove.
9171         (elf_link_hash_hide_symbol): Remove.
9172         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
9173         and elf_backend_hide_symbol.
9174         (_bfd_elf_link_hash_copy_indirect): Declare.
9175         (_bfd_elf_link_hash_hide_symbol): Declare.
9176         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
9177         (_bfd_elf_link_hash_hide_symbol): Likewise.
9178         (_bfd_elf_link_hash_table_init): Don't init killed members.
9179         * elflink.h (elf_link_add_object_symbols): Use the bed function
9180         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
9181         (elf_link_assign_sym_version): Likewise.
9182         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
9183         (elf_backend_hide_symbol): Likewise.
9184         (elfNN_bed): Update for new members.
9186 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
9188         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
9189         STACK_END_ADDR): Define for new core file format.
9190         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
9191         for handling the vagaries of the various core file structures used
9192         by AIX over the years.
9193         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
9194         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
9195         core_dumpx structure.
9197 2000-02-17  J"orn Rennecke <amylaar@cygnus.co.uk>
9199         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
9200         (bfd_mach_sh3_dsp): Likewise.
9201         (bfd_mach_sh4): Reinstate.
9202         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
9203         * bfd-in2.h: Regenerate.
9204         * coff-sh.c (struct sh_opcode): flags is no longer short.
9205         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
9206         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
9207         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
9208         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
9209         (sh_opcodes): No longer const.
9210         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
9211         (sh_insn_uses_reg): Check for USESAS and USESR8.
9212         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
9213         (_bfd_sh_align_load_span): Return early for SH4.
9214         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
9215         Take into account that field b of a parallel processing insn
9216         could be mistaken for a separate insn.
9217         * cpu-sh.c (arch_info_struct): New array elements for
9218         sh2, sh-dsp and sh3-dsp.
9219         Reinstate element for sh4.
9220         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
9221         (SH4_NEXT): Reinstate.
9222         (SH3_NEXT, SH3E_NEXT): Adjust.
9223         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
9224         * elf32-sh.c (sh_elf_set_private_flags): New function.
9225         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
9226         (sh_elf_merge_private_data): New function.
9227         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
9228         (bfd_elf32_bfd_copy_private_bfd_data): Define.
9229         (bfd_elf32_bfd_merge_private_bfd_data): Change to
9230         sh_elf_merge_private_data.
9232 2000-02-13  Richard Henderson  <rth@cygnus.com>
9234         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
9235         hide_symbol members.
9236         (elf_link_hash_copy_indirect): New.
9237         (elf_link_hash_hide_symbol): New.
9238         * elflink.h (elf_link_add_object_symbols): Break out copy from
9239         indirect new new symbol to elf.c.
9240         (elf_link_assign_sym_version): Break out privatization of
9241         non-exported symbol to elf.c.
9242         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
9243         (_bfd_elf_link_hash_hide_symbol): New.
9244         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
9246 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
9248         * section.c (_bfd_strip_section_from_output): Add info parameter.
9249         If it passed as non-NULL, use it to check whether any input BFD
9250         has an input section which uses this output section.  Change all
9251         callers.
9252         * bfd-in2.h: Rebuild.
9254         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
9255         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
9256         1999-11-29.
9257         * bfd-in2.h: Rebuild.
9259 2000-02-10  Timothy Wall  <twall@cygnus.com>
9261         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
9262         allow final modifications of swapped-in symbol.
9263         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
9264         * coffcode.h (coff_write_relocs): Use macro
9265         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
9266         symbol index should be set to -1.
9268 2000-02-10  Toshiyasu Morita (toshi.morita@sega.com)
9270         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
9271         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
9272         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
9273         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
9274         sh_insns_uses_or_sets_freg): New functions.
9275         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
9276         * (sh_insns_conflict): Use new functions and new macros to
9277         detect conflicts when two instructions both set same integer registers,
9278         both set same fp register, and both set special register.
9280 2000-02-09  Timothy Wall  <twall@cygnus.com>
9282         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
9283         swapping in sections, so that the swapping routines have access to
9284         the arch/mach info.
9286 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
9288         * coff-go32.c: Update comment. Update copyright.
9290 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
9292         * syms.c (bfd_decode_symclass)
9293         Two new class characters were added - 'V' and 'v'.  The
9294         meaning of 'W' is now restricted to just weak non-object
9295         symbols.  This allows differentiation between, for example,
9296         weak functions vs weak objects.  nm for example now dumps:
9297         'W' = weak global
9298         'w' = weak unresolved
9299         'V' = weak global object
9300         'v' = weak unresolved object
9302         (bfd_is_undefined_symclass): New function.  Return true if the
9303         given symbol class represents and undefined/unresolved symbol.
9305         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9306         unresolved symbols.
9308         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9310         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9311         STT_ARM_16BIT flag set, but it is not attached to a data object
9312         return STT_ARM_16BIT so that it will be treated as code by the
9313         disassembler.
9315 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
9317         * coff-i386.c (i3coff_object_p): Remove prototype.
9318         Update copyright.
9320         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9321         to name.  Update copyright.
9323         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9324         assignment to avoid warning.  Update copyright.
9326 2000-01-24  Robert Lipe  (robertl@sco.com)
9328         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9329         instead of using GNU C extension.
9331 2000-01-21  Nick Clifton  <nickc@cygnus.com>
9333         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9334         amount from a bfd_in_memory structure.
9335         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9336         structure.
9338 2000-01-14  Nick Clifton  <nickc@cygnus.com>
9340         * linker.c (default_indirect_link_order): oops - fix incorrectly
9341         applied patch from Tim Wall.
9343 2000-01-13  Timothy Wall (twall@tiac.net>
9345         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9346         = scnhsz, filhsz, relsz, aoutsz, etc)
9348         * coffswap.h: Ditto.
9350 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9352         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9353         interwork thumb to arm stub.
9355 2000-01-13  Timothy Wall (twall@tiac.net>
9357         * archures.c (bfd_octets_per_byte): New function: Return
9358         target byte size.
9359         (bfd_arch_mach_octets_per_byte): New function: Return target
9360         byte size.
9362         * section.c: Distinguish between octets and bytes for usage of
9363         _cooked_size,  _raw_size, and output_offset.  Clarify
9364         description of bfd_set_section_contents.
9366         * bfd-in2.h: Regenerate.
9368         * coffgen.c: Indicate that the offset parameter is in bytes, not
9369         octets.
9371         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9372         where appropriate to get the octet offset when calling
9373         bfd_set_section_contents.
9374         (bfd_coff_reloc_link_order): Ditto.
9376         * linker.c (bfd_generic_reloc_link_order): Ditto.
9377         (_bfd_default_link_order): Ditto.
9379         * reloc.c (bfd_perform_relocation):  Distinguish between octets
9380         and bytes.  Use octets when indexing into octet data; use bytes
9381         when calculating target addresses.
9382         (bfd_install_relocation): Ditto.
9384         * srec.c (srec_write_section): Ditto.
9386 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9388         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9389         3 to 2.  This allows 4 byte sized sections, which is necessary for
9390         dlltool to build functioning DLLs.
9392 2000-01-10  Philip Blundell  <pb@futuretv.com>
9394         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9395         (arm*-*-conix*): New target.
9397 2000-01-10  Egor Duda  <deo@logos-m.ru>
9399         * config.bfd: Include elf32_i386 vector to target list for cygwin
9400         and mingw.
9402         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9403         * configure.in: Test for structure win32_pstatus_t in
9404         <sys/procfs.h>
9405         * configure: Regenerate.
9407         * elf.c (elfcore_grok_win32pstatus): New function: process
9408         win32_pstatus_t notes in elf core file.
9409         (elfcore_grok_note): Detect win32_pstatus notes.
9411 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9413         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9414         visibility.
9415         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9416         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9418 For older changes see ChangeLog-9899
9420 Local Variables:
9421 mode: change-log
9422 left-margin: 8
9423 fill-column: 74
9424 version-control: never
9425 End: