* elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
[binutils.git] / bfd / ChangeLog
blob447be3dbd455c9bfa3aa1eba21a380a697182d06
1 2001-12-20  Alan Modra  <amodra@bigpond.net.au>
3         * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
4         as can happen with a core file, before dereferencing.
6 2001-12-19  Jakub Jelinek  <jakub@redhat.com>
8         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
9         is 0, temporarily grow it to minimal CIE size.
10         (_bfd_elf_write_section_eh_frame): If input .eh_frame section would
11         end up empty, build a fake minimal CIE.
13 2001-12-19  Steve Ellcey  <sje@cup.hp.com>
15         * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
16         ia64*-*-hpux* target.
17         (bfd_elf64_ia64_hpux_big_vec): Likewise.
18         * targets.c: Ditto.
19         * configure.in: Ditto.
20         * configure: Regenerate
21         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
22         alloca with bfd_malloc.
23         (get_local_sym_hash): Likewise.
24         (elfNN_hpux_post_process_headers): New function.
25         #include elfNN-target.h again with values for IA64 HP-UX vector.
27 2001-12-18  Michael Snyder  <msnyder@redhat.com>
29         * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
30         sections of corefiles.  Also it makes no sense to sort if count == 1.
32 2001-12-18  H.J. Lu <hjl@gnu.org>
34         * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
36 2001-12-18  H.J. Lu <hjl@gnu.org>
38         * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
40 2001-12-18  H.J. Lu <hjl@gnu.org>
42         * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
43         (_bfd_mips_elf_copy_private_bfd_data): Removed.
45         * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
46         the ELF header.
48         * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
49         (bfd_elf??_bfd_copy_private_bfd_data): Removed.
50         * elf32-m32r.c: Likewise.
51         * elf32-m68k.c: Likewise.
52         * elf32-mcore.c: Likewise.
53         * elf32-mips.c: Likewise.
54         * elf32-ppc.c: Likewise.
55         * elf32-v850.c: Likewise.
56         * elf64-ppc.c: Likewise.
57         * elf64-sparc.c: Likewise.
58         * elfxx-ia64.c: Likewise.
60         * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
62         * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
63         to _bfd_elf_copy_private_bfd_data.
65 2001-12-18  Martin Schwidefsky  <schwidefsky@de.ibm.com>
67         * elf32-s390 (elf_s390_check_relocs): Pass addend to
68         gc_record_vtentry.
69         * elf64-s390 (elf_s390_check_relocs): Likewise.
70         Fix by Andreas Jaeger <aj@suse.de>.
72 2001-12-18  Jason Thorpe  <thorpej@wasabisystems.com>
74         * configure.host: Correctly match all NetBSD/mips
75         hosts.
77 2001-12-18  matthew green  <mrg@eterna.com.au>
79         * config.bfd (m68*-*-netbsdelf*): New target.
80         (m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
81         (m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
83 2001-12-18  Jakub Jelinek  <jakub@redhat.com>
85         * elflink.h (size_dynamic_sections): Skip anonymous version tag.
86         (elf_link_assign_sym_version): Don't count anonymous version tag.
88 2001-12-18  Jakub Jelinek  <jakub@redhat.com>
90         * elf-eh-frame.c (struct cie): Add make_lsda_relative.
91         (struct eh_cie_fde): Add lsda_encoding, lsda_offset,
92         make_lsda_relative.
93         (read_value, write_value): New.
94         (_bfd_elf_discard_section_eh_frame): Inicialize
95         lsda_encoding, lsda_offset and make_lsda_relative.
96         (_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
97         request no dynamic reloc for LSDA field of FDE.
98         (_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
99         If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
100         or pcrel.  Fix address computation for DW_EH_PE_pcrel relocs.
101         Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
102         . might have changed due to deleted FDE or CIEs.
104 2001-12-18  Jakub Jelinek  <jakub@redhat.com>
106         * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
107         (last_eq): Remove.
108         (_bfd_elf_strtab_finalize): Don't use a hash table for last
109         character chains, instead use an array.
111 2001-12-18  Jason Thorpe  <thorpej@wasabisystems.com>
113         * elf.c (elfcore_netbsd_get_lwpid): New function.
114         (elfcore_grok_netbsd_procinfo): New function.
115         (elfcore_grok_netbsd_note): New function.
116         (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
117         NetBSD ELF core file notes.
119 2001-12-18  Alan Modra  <amodra@bigpond.net.au>
121         * elfcode.h (struct bfd_preserve): New.
122         (elf_object_p): Replace preserved_* vars with instance of above.
123         Save and restore arch_info pointer rather than arch, mach so that
124         more cases can be restored.  Save and restore new section_tail,
125         section_htab structure, and init appropriately.  Move "rest of
126         section header" code so that i_shdrp needs no NULL initialisation.
127         Free old section_htab on success.
128         * elfcore.h (elf_core_file_p): Likewise.
130 2001-12-17  Tom Rix  <trix@redhat.com>
132         * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
133         xcoff.
135 2001-12-17  Jakub Jelinek  <jakub@redhat.com>
137         * elf-bfd.h (elf_discarded_section): Define.
138         * elflink.h (elf_link_input_bfd): Use it.
139         (elf_reloc_symbol_deleted_p): Likewise.
141         * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
142         overflows for pc relative relocs against discarded sections.
144 2001-12-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
146         * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
147         * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
148         over the last months. Add some code for mips16 handling.
149         (mips_elf64_check_mips16_stubs): New function.
150         (mips_elf64_stub_section_p): Likewise.
151         (mips_elf64_calculate_relocation): Change interface to support mips16.
152         (mips_elf64_perform_relocation): Likewise.
154 2001-12-17  Alan Modra  <amodra@bigpond.net.au>
156         Support for more than 64k ELF sections.
157         * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
158         (bfd_elf32_swap_symbol_in): Likewise.
159         (bfd_elf32_swap_symbol_out): Likewise.
160         (bfd_elf64_swap_symbol_in): Likewise.
161         (bfd_elf64_swap_symbol_out): Likewise.
162         (elf_reloc_cookie): Add locsym_shndx field.  Make locsyms a PTR.
163         (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
164         symtab_shndx_section.
165         (elf_numsections): Define.
166         (elf_symtab_shndx): Define.
167         * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
168         (bfd_elf_find_section): Likewise.
169         (bfd_section_from_elf_index): Likewise.
170         (bfd_section_from_shdr): Likewise.  Handle SHT_SYMTAB_SHNDX.
171         (bfd_section_from_r_symndx): Read symbol shndx extension, and
172         translate st_shndx for > SHN_HIRESERVE.
173         (assign_section_numbers): Skip reserved sections.  Assign
174         symtab_shndx_section and elf_numsections.  Exclude reserved
175         sections from e_shnum.  Set up symtab_shndx_hdr.
176         (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
177         (map_sections_to_segments): Don't map eh_frame_hdr unless required.
178         (assign_file_positions_except_relocs): Use elf_numsections rather
179         than header e_shnum.  Skip reserved sections and symtab_shndx_section.
180         (prep_headers): Set name for symtab_shndx_hdr.
181         (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
182         (_bfd_elf_write_object_contents): Likewise.  Skip reserved sections.
183         (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
184         first.  Use elf_section_data if available.  Use elf_numsections.
185         Start scan at index 1.
186         (copy_private_bfd_data ): Comment fixes.
187         (MAP_ONESYMTAB): Define above SHN_HIOS.
188         (MAP_DYNSYMTAB): Likewise.
189         (MAP_STRTAB): Likewise.
190         (MAP_SHSTRTAB): Likewise.
191         (MAP_SYM_SHNDX): New define.
192         (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
193         (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
194         * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
195         extension.
196         (elf_swap_symbol_out): Likewise.
197         (elf_object_p): Set elf_numsections, and use instead of e_shnum.
198         Initialialise reserved elf_elfsections to point at shdr[0].  Remove
199         redundant bfd_release calls.
200         (elf_slurp_symbol_table): Read symbol shndx extension, and use with
201         elf_swap_symbol_in.  Translate st_shndx for > SHN_HIRESERVE too.
202         * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
203         extension, and use with elf_swap_symbol_in.
204         (elf_link_record_local_dynamic_symbol): Likewise.
205         (elf_link_add_object_symbols): Likewise.  Also translate st_shndx
206         for elf sections > SHN_HIRESERVE.
207         (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
208         call.
209         (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
210         (elf_bfd_final_link): Allocate the above, and tidy code allocating
211         other buffers.  Use elf_numsections instead of e_shnum.  Adjust
212         elf_swap_symbol_out calls.
213         (elf_link_output_sym): Swap out symbol shndx extension too.
214         (elf_link_flush_output_syms): And flush them to disk.
215         (elf_link_output_extsym): Use SHN_BAD.  Adjust elf_swap_symbol_out
216         calls.
217         (elf_gc_mark): Read symbol shndx extension, and use with
218         elf_swap_symbol_in.
219         (elf_link_input_bfd): Likewise,  Translate st_shndx for elf sections
220         > SHN_HIRESERVE too.  Use SHN_BAD.
221         (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
222         elf_swap_symbol_in.  Translate st_shndx > SHN_HIRESERVE too.
223         (elf_bfd_discard_info): Read symbol shndx extension.  Don't attempt
224         to continue after a bfd error.
225         * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
226         Stash them immediately to symtab_hdr->contents rather than later
227         in multiple places.  Clean up afterwards.  Read symbol shndx
228         extension, and use with swap_symbol_in.  Translate SHN_UNDEF,
229         SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
230         sections too.  Remove dead code.
231         (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
232         when swapping in symbols.  Tidy code adjusting global syms.
233         Don't swap in global syms.
234         (mn10200_elf_symbol_address_p): Likewise.  Remove extsyms param.
235         (mn10200_elf_get_relocated_section_contents): Read symbol shndx
236         extension, and use with swap_symbol_in.  Rename "size" -> "amt"
237         to maximize code in common with other files.  Translate st_shndx
238         for > SHN_HIRESERVE too.  Remove dead code.
239         * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
240         Stash them immediately to symtab_hdr->contents rather than later
241         in multiple places.  Clean up afterwards.  Read symbol shndx
242         extension, and use with swap_symbol_in.  Remove dead code.
243         (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
244         (mn10300_elf_symbol_address_p): Likewise.
245         (mn10300_elf_get_relocated_section_contents): Likewise.
246         * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
247         (elf32_h8_relax_delete_bytes): Likewise.
248         (elf32_h8_symbol_address_p): Likewise.
249         (elf32_h8_get_relocated_section_contents): Likewise.
250         * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
251         extension, and use with swap_symbol_in.
252         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
253         * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
254         bfd_elf32_swap_symbol_out.
255         * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
256         elf sections > SHN_HIRESERVE too.
257         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
258         local syms.  Read symbol shndx extension, and use with swap_symbol_in.
259         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
260         elf_numsections rather than header e_shnum.
261         * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
262         (sh_elf_relax_delete_bytes): Likewise.
263         (sh_elf_get_relocated_section_contents): Likewise.  Only read local
264         symbols.
265         * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
266         hold section index.  Use elf_numsections rather than e_shnum.
267         Rename "index" -> "indx" to avoid shadowing warning.
268         (v850_elf_add_symbol_hook): Likewise.
269         * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
270         Read symbol shndx extension, and use with swap_symbol_in.
271         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
272         Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
273         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
274         (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
276         * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
277         before calling bfd_section_from_elf_index on local syms.
278         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
279         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
280         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
281         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
282         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
283         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
284         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
285         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
286         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
287         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
288         * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
289         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
290         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
291         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
292         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
293         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
294         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
295         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
296         * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
297         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
298         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
299         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
300         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
302 2001-12-17  Alan Modra  <amodra@bigpond.net.au>
304         Hash bfd sections for fast lookup and create.
305         * bfd.c (struct _bfd): Add section_htab, section_tail.
306         * libbfd-in.h (_bfd_delete_bfd): Declare.
307         (bfd_section_hash_newfunc): Declare.
308         * opncls.c (_bfd_new_bfd): Free memory on failure.  Init
309         section_htab and section_tail.
310         (_bfd_delete_bfd): New function.
311         (bfd_openr): Use it.
312         (bfd_fdopenr): Likewise.
313         (bfd_openstreamr): Likewise.
314         (bfd_openw): Likewise.
315         (bfd_close): Likewise.
316         (bfd_close_all_done): Likewise.
317         (bfd_release): Comment.
318         * section.c (struct section_hash_entry): New.
319         (bfd_section_hash_newfunc): New function.
320         (section_hash_lookup): Define.
321         (bfd_section_init): New function, split out from
322         bfd_make_section_anyway.
323         (bfd_get_section_by_name): Lookup via hash table.
324         (bfd_get_unique_section_name): Likewise.
325         (bfd_make_section_old_way): Rewrite to use hash table.
326         (bfd_make_section_anyway): Likewise.
327         (bfd_make_section): Likewise.  Return NULL for attempts to make
328         BFD_{ABS,COM,UND,IND}_SECTION_NAME.
329         (_bfd_strip_section_from_output): Adjust section_tail if needed.
330         * configure.in: Bump bfd version.
331         * configure: Regenerate.
332         * libbfd.h: Regenerate.
333         * bfd-in2.h: Regenerate.
335 2001-12-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
337         * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
338         (mips_elf64_high): New Function.
339         (mips_elf64_higher): Likewise.
340         (mips_elf64_highest): Likewise.
341         (mips_elf64_info_to_howto_rel): Likewise.
342         (mips_elf64_info_to_howto_rela): Likewise.
343         (mips_elf64_write_rel): Likewise.
344         (mips_elf64_write_rela): Likewise.
345         (mips_elf64_link_hash_newfunc): Likewise.
346         (mips_elf64_hi16_reloc): Likewise.
347         (mips_elf64_higher_reloc): Likewise.
348         (mips_elf64_highest_reloc): Likewise.
349         (mips_elf64_gprel16_reloc): Likewise.
350         (mips_elf64_gprel16_reloca): Likewise.
351         (mips_elf64_literal_reloc): Likewise.
352         (mips_elf64_gprel32_reloc): Likewise.
353         (mips_elf64_shift6_reloc): Likewise.
354         (mips_elf64_got16_reloc): Likewise.
355         (mips_elf64_assign_gp): Likewise.
356         (mips_elf64_final_gp): Likewise.
357         (gprel16_with_gp): Likewise.
358         (mips_elf64_additional_program_headers): Likewise.
359         (mips_elf64_link_hash_table_create): Likewise.
360         (mips_elf64_got_offset_from_index): Likewise.
361         (_mips_elf64_got_info): Likewise.
362         (mips_elf64_sign_extend): Likewise.
363         (mips_elf64_overflow_p): Likewise.
364         (mips_elf64_global_got_index): Likewise.
365         (mips_elf64_sort_hash_table_f): Likewise.
366         (mips_elf64_sort_hash_table): Likewise.
367         (mips_elf64_swap_msym_out): Likewise.
368         (mips_elf64_create_local_got_entry): Likewise.
369         (mips_elf64_local_got_index): Likewise.
370         (mips_elf64_got_page): Likewise.
371         (mips_elf64_got16_entry): Likewise.
372         (mips_elf64_local_relocation_p): Likewise.
373         (mips_elf64_next_relocation): Likewise.
374         (mips_elf64_create_dynamic_relocation): Likewise.
375         (mips_elf64_calculate_relocation): Likewise.
376         (mips_elf64_obtain_contents): Likewise.
377         (mips_elf64_perform_relocation): Likewise.
378         (mips_elf64_relocate_section): Likewise.
379         (mips_elf64_create_dynamic_sections): Likewise.
380         (mips_elf64_adjust_dynamic_symbol): Likewise.
381         (mips_elf64_always_size_sections): Likewise.
382         (mips_elf64_size_dynamic_sections): Likewise.
383         (mips_elf64_finish_dynamic_symbol): Likewise.
384         (mips_elf64_finish_dynamic_sections): Likewise.
385         (mips_elf64_gc_mark_hook): Likewise.
386         (mips_elf64_gc_sweep_hook): Likewise.
387         (mips_elf64_create_got_section): Likewise.
388         (mips_elf64_record_global_got_symbol): Likewise.
389         (mips_elf64_create_msym_section): Likewise.
390         (mips_elf64_allocate_dynamic_relocations): Likewise.
391         (mips_elf64_check_relocs): Likewise.
392         (mips_elf64_output_extsym): Likewise.
393         (mips_elf64_swap_gptab_in): Likewise.
394         (mips_elf64_swap_gptab_out): Likewise.
395         (gptab_compare): Likewise.
396         (mips_elf64_final_link): Likewise.
397         (prev_reloc_addend): Remenber addend of previous parts of a combined
398         reloc.
399         (ELF_MIPS_GP_OFFSET): New define.
400         (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
401         (MIPS_FUNCTION_STUB_SIZE): Likewise.
402         (mips_elf64_howto_rel): Fix HOWTO defines.
403         (mips_elf64_howto_rela): Likewise.
404         (mips_elf64_swap_reloca_out): Fix signedness.
405         (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
406         (mips_elf64_be_swap_reloca_in): Likewise.
407         (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
408         (mips_elf64_be_swap_reloca_out): Likewise.
410 2001-12-15  Jakub Jelinek  <jakub@redhat.com>
412         * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
413         * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
414         (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
415         sec_info here.  Free ehbuf.
416         (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
417         if hdr_info->strip.
418         (_bfd_elf_maybe_strip_eh_frame_hdr): New.
419         * elflink.h (size_dynamic_sections): Call it.
421 2001-12-14  Alan Modra  <amodra@bigpond.net.au>
423         * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
425 2001-12-13  Jakub Jelinek  <jakub@redhat.com>
427         * elf-bfd.h (enum elf_link_info_type): New.
428         (struct bfd_elf_section_data): Remove stab_info and merge_info
429         fields, add sec_info and sec_info_type.
430         (struct elf_obj_tdata): Add eh_frame_hdr field.
431         (_bfd_elf_discard_section_eh_frame): New prototype.
432         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
433         (_bfd_elf_eh_frame_section_offset): Likewise.
434         (_bfd_elf_write_section_eh_frame): Likewise.
435         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
436         * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
437         (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
438         (elf-eh-frame.lo): New.
439         * Makefile.in: Rebuilt.
440         * configure.in (elf): Add elf-eh-frame.lo.
441         * configure: Rebuilt.
442         * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
443         (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
444         (get_program_header_size): Take into account PT_GNU_EH_FRAME
445         segment.
446         (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
447         (_bfd_elf_rel_local_sym): Likewise.
448         (_bfd_elf_section_offset): Likewise.  Call
449         _bfd_elf_eh_frame_section_offset too.
450         * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
451         sec_info.
452         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
453         * elf-eh-frame.c: New file.
454         * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
455         .stab sections.  Set sec_info_type, use sec_info instead
456         of merge_info and stab_info.
457         (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
458         if --eh-frame-hdr.
459         (elf_bfd_final_link): Write .eh_frame_hdr section.
460         (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
461         (elf_link_input_bfd): Likewise.
462         Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
463         (elf_bfd_discard_info): Add output_bfd argument.
464         Call _bfd_elf_discard_section_eh_frame and
465         _bfd_elf_discard_section_eh_frame_hdr.
466         (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
467         names.
468         * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
469         prototypes.
470         * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
472 2001-12-12  Richard Henderson  <rth@redhat.com>
474         * syms.c (_bfd_generic_read_minisymbols): Early return for
475         no symbols.  Patch from FreeBSD folk; exact origin unknown.
477 2001-12-11  Alan Modra  <amodra@bigpond.net.au>
479         * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
480         and e_shstrndx if out of range.
481         (elf_object_p): Read extended values for e_shnum and e_shstrndx
482         from the first section header.  Allocate space in elf_elfsections
483         for reserved sections and set to NULLs.
484         (elf_write_shdrs_and_ehdr): Set overflow fields in first section
485         header.  Skip reserved sections in elf_elfsections.  Remove
486         duplicate size calculation.
488 2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
489             Richard Henderson  <rth@redhat.com>
490             Corinna Vinschen  <vinschen@redhat.com>
492         * Makefile.am: Add support for xstormy16.
493         * archures.c: Add support for xstormy16.
494         * config.bfd: Add support for xstormy16.
495         * configure.in: Add support for xstormy16.
496         * reloc.c: Add support for xstormy16.
497         * targets.c: Add support for xstormy16.
498         * cpu-xstormy16.c: New file.
499         * elf32-xstormy16.c: New file.
500         * Makefile.in: Regenerated.
501         * bfd-in2.h: Regenerated.
502         * configure: Regenerated.
503         * libbfd.h: Regenerated.
505 2001-12-07  Nick Clifton  <nickc@cambridge.redhat.com>
507         * elf.c (assign_file_positions_for_segments): Combine sentance
508         fragments into a single sentance in order to permit better
509         translation into foreign languages.
511 2001-12-07  Jim Blandy  <jimb@redhat.com>
513         * elf32-s390.c (elf32_s390_grok_prstatus): New function.
514         (elf_backend_grok_prstatus): Define.    
516 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
518         * elf32-sparc.c (elf32_sparc_relocate_section): Revert
519         2001-09-14 change.
521 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
523         * elf.c (_bfd_elf_rela_local_sym): Only call
524         _bfd_merged_section_offset if merge_info is non-NULL.
525         (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
526         * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
527         prototypes.
528         * elf32-arm.h (elf32_arm_final_link_relocate): Use
529         _bfd_elf_section_offset.
530         (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
531         * elf32-i386.c (elf_i386_relocate_section): Use
532         _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
533         * elf32-sh.c (sh_elf_relocate_section): Likewise.
534         * elf32-sparc.c (elf32_sparc_relocate_section): Use
535         _bfd_elf_section_offset.
536         * elf32-cris.c (cris_elf_relocate_section): Likewise.
537         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
538         * elf32-i370.c (i370_elf_relocate_section): Likewise.
539         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
540         * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
541         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
542         * elf32-s390.c (elf_s390_relocate_section): Likewise.
543         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
544         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
545         * elf64-s390.c (elf_s390_relocate_section): Likewise.
546         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
547         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
548         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
550 2001-12-07  Alan Modra  <amodra@bigpond.net.au>
552         * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
553         already forced local.
555 2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>
557         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
558         fragmented sentence parts into a whole sentence to permit
559         better translation into foreign languages.
561 2001-12-06  Hans-Peter Nilsson  <hp@bitrange.com>
563         * configure: Regenerate.
564         * Makefile.in: Regenerate.
566 2001-12-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
568         * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
569         BFD64_LIBS, make the latter depending on the availability of BFD64.
570         Add archive64.c source file.
571         * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
572         and bfd_elf64_archive_write_armap, code from elf64-mips.c
573         * archive.c (bfd_slurp_armap): Add ELF64 archive support.
574         * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
575         (mips64*el-*-linux*): Likewise.
576         (mips*el-*-linux*): Likewise. Reorder entries.
577         * configure.in (bfd_libs): Define in dependency of BFD64 and
578         AC_SUBST it.
579         * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
580         bfd_elf64_archive_slurp_armap instead.
581         (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
582         instead.
584 2001-12-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
586         * config.bfd: Remove trailing blanks.
587         * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
589 2001-12-04  Alexandre Oliva  <aoliva@redhat.com>
591         * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
592         R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
593         R_D10V_18_PCREL.  Check 10_PCREL relocations as signed.
594         Disable pointless overflow checking of NONE and 32.
596 2001-12-04  Alan Modra  <amodra@bigpond.net.au>
598         * reloc.c (bfd_install_relocation): Correct reloc address test.
599         (bfd_perform_relocation): Formatting fix.
600         * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
602 2001-12-03  Nick Clifton  <nickc@cambridge.redhat.com>
604         * configure.in (LINGUAS): Add tr.
605         * configure: Regenerate.
606         * po/tr.po: Import from translation project's web site.
608 2001-12-03  Alan Modra  <amodra@bigpond.net.au>
610         * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
611         happens to trigger on undefined symbols.
612         (final_link_relocate): Return bfd_reloc_undefined for undefined
613         stubs.
614         (elf32_hppa_relocate_section): Don't say we can't handle a reloc
615         if we have already warned about an undefined symbol.
617 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
619         * elf32-mips.c (NEWABI_P): New define.
620         (USE_REL): Remove, replaced by
621         (elf_backend_may_use_rel_p): New define.
622         (elf_backend_may_use_rela_p): Likewise.
623         (elf_backend_default_use_rela_p): Likewise.
624         (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
625         Fix some relocation definitions.
626         (elf_mips_howto_table_rela): New RELA relocation definitions for
627         NewABI support.
628         (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
629         (bfd_elf32_bfd_reloc_type_lookup): Likewise.
630         (mips_rtype_to_howto): Likewise.
631         (_bfd_mips_elf_relocate_section): Likewise.
632         (_bfd_mips_elf_object_p): Typo.
633         (elf_backend_sign_extend_vma): Reordered together with many other
634         defines nearby to resemble the order of declaration in the header
635         file.
637 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
639         * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
640         BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
641         * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
642         * elf32-mips.c (mips_reloc_map): Likewise. Replace
643         BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
644         * elf64-mips.c (mips_reloc_map): Likewise.
645         * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
646         (BFD_RELOC_MIPS_GPREL32): Remove.
648 2001-11-30  H.J. Lu <hjl@gnu.org>
650         * elflink.h (elf_add_default_symbol): New.
651         (elf_link_add_object_symbols): Call elf_add_default_symbol ()
652         to create an indirect symbol from the default for the symbol
653         with the default version if needed.
655 2001-11-29  "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
657         * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
658         if it has already been set by another thread.
660 2001-11-28  Jakub Jelinek  <jakub@redhat.com>
662         * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
663         (elf64_alpha_relocate_section): Translate local_got_entries
664         for STT_SECTION symbol to SHF_MERGE section the first time
665         we see it.
666         * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
667         sec_merge_done.
668         (get_local_sym_hash): New, extracted from get_dyn_sym_info.
669         (get_dyn_sym_info): Use it.
670         (elfNN_ia64_relocate_section): Translate local dyn entries
671         for STT_SECTION symbol to SHF_MERGE section the first time
672         we see it.
674 2001-11-27  H.J. Lu <hjl@gnu.org>
676         * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
677         ELF.
679 2001-11-26  Jeffrey A Law  (law@cygnus.com)
681         * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
682         prototypes.
684 2001-11-24  Alan Modra  <amodra@bigpond.net.au>
686         * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
687         group sizes to accommodate c++.
689 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
691         * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
692         relocations in non-alloced sections against global symbols
693         defined in shared library being built.
694         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
696 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
698         * elf.c (_bfd_elf_rela_local_sym): New.
699         * elflink.h (elf_link_input_bfd): Don't consider empty
700         merged sections as removed in relocation tests.
701         * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
702         * elf32-i386.c (elf_i386_relocate_section): Handle relocs
703         against STT_SECTION symbol of SHF_MERGE section.
704         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
705         * elf32-avr.c (elf32_avr_relocate_section): Call
706         _bfd_elf_rela_local_sym.
707         * elf32-cris.c (cris_elf_relocate_section): Likewise.
708         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
709         * elf32-fr30.c (fr30_final_link_relocate): Likewise.
710         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
711         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
712         * elf32-i370.c (i370_elf_relocate_section): Likewise.
713         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
714         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
715         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
716         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
717         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
718         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
719         * elf32-s390.c (elf_s390_relocate_section): Likewise.
720         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
721         * elf32-v850.c (v850_elf_relocate_section): Likewise.
722         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
723         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
724         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
725         * elf64-s390.c (elf_s390_relocate_section): Likewise.
726         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
727         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
728         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
729         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
730         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
731         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
732         * elf32-sh.c (sh_elf_relocate_section): Likewise for
733         !partial_inplace relocs. Handle relocs against STT_SECTION
734         symbol of SHF_MERGE for partial_inplace relocs.
736 2001-11-21  Nick Clifton  <nickc@cambridge.redhat.com>
738         * po/Make-in (distclean): Move SRC-POTFILES.in and
739         BLD-POTFILES.in to maintainer-clean target.
741 2001-11-21  Alan Modra  <amodra@bigpond.net.au>
743         * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
744         than sym_sec->output_section to detect relocs against discarded
745         sections.
747 2001-11-19  H.J. Lu  <hjl@gnu.org>
749         * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
750         discarding relocations.
752 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
754         * section.c (bfd_is_const_section): New macro.  Return true if the
755         given seciton is one of the special, constant, sections.
756         * bfd-in2.h: Regenerate.        
757         * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
758         (coff_write_native_symbol): Use bfd_is_const_section.
760 2001-11-19  Alan Modra  <amodra@bigpond.net.au>
762         * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
764         * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
765         millicode syms as candidates for import stubs.
767         * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
768         (allocate_PIC_calls): Rename to allocate_plt_static.
769         (allocate_dynrelocs): Move most of code handling .plt entries to..
770         (allocate_plt_static): ..here.  Don't drop plabel entries.
772 2001-11-19  Hans-Peter Nilsson  <hp@bitrange.com>
774         * mmo.c: Adjust documentation tags to use texinfo 4 features.
776 2001-11-16  Nick Clifton  <nickc@cambridge.redhat.com>
778         * section.c (bfd_is_const_section): New macro.  Return true if the
779         section pointer refers to one of the special, constant sections.
780         * bfd-in2.h: Regenerate.
782         * coffgen.c (coff_count_linenumbers): Only update the line number
783         count in non-special sections.
784         (coff_write_native_symbol): Only update the line number file
785         position in non-special sections.
787 2001-11-15  Daniel Jacobowitz  <drow@mvista.com>
789         * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
790         local syms from discarded sections.  Update comment.
792 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
794         * po/SRC-POTFILES.in: Regenerate.
796         * elflink.h (elf_link_input_bfd): Complain about all relocs
797         against local syms from discarded sections.  K&R fixes.
798         (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
799         K&R fixes.
801 2001-11-15  Alexandre Oliva  <aoliva@redhat.com>
803         * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
804         overflows in the .stab section.
806 2001-11-14  Daniel Jacobowitz  <drow@mvista.com>
808         * bfd-in.h (bfd_elf32_discard_info): Add prototype.
809         (bfd_elf64_discard_info): Likewise.
810         * bfd-in2.h: Regenerate.
811         * elf-bfd.h (struct elf_reloc_cookie): New.
812         (struct elf_backend_data): Add elf_backend_discard_info,
813         elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
814         (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
815         (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
816         * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
817         (_bfd_elf32_mips_ignore_discarded_relocs): New.
818         (_bfd_elf32_mips_write_section): New.
819         (elf_backend_discard_info): Define.
820         (elf_backend_ignore_discarded_relocs): Define.
821         (elf_backend_write_section): Define.
822         * elfcode.h (elf_bfd_discard_info): Define.
823         (elf_reloc_symbol_deleted_p): Define.
824         * elflink.h (elf_link_input_bfd): Check
825         elf_section_ignore_discarded_relocs.  Call
826         bed->elf_backend_write_section if available.
827         (elf_reloc_symbol_deleted_p): New.
828         (elf_bfd_discard_info): New.
829         (elf_section_ignore_discarded_relocs): New.
830         * elfxx-target.h (elf_backend_discard_info): Define.
831         (elf_backend_ignore_discarded_relocs): Define.
832         (elf_backend_write_section): Define.
833         (elfNN_bed): Add elf_backend_discard_info,
834         elf_backend_ignore_discarded_relocs, and
835         elf_backend_write_section.
836         * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
837         * libbfd.h: Regenerate.
838         * stabs.c (_bfd_discard_section_stabs): New.
840 2001-11-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
842         * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
843         scheme to get rid of an ugly complicated test.
844         * elf64-s390.c (elf_s390_relocate_section): Likewise.
846 2001-11-14  Andreas Jaeger  <aj@suse.de>
848         * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
849         x86-64 for display.
851 2001-11-14  Jakub Jelinek  <jakub@redhat.com>
853         * dwarf2.c (struct line_head) [total_length]: Change type to
854         bfd_vma.
855         (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
856         (struct comp_unit): Add stash and offset_size.
857         (read_8_bytes): Return bfd_vma.
858         (read_indirect_string): New.
859         (read_attribute): Handle DW_FORM_strp.
860         (decode_line_info): Support 64-bit DWARF format.
861         (_bfd_dwarf2_find_nearest_line): Likewise.
862         (parse_comp_unit): Set offset_size and stash.
864 2001-11-13  Keith Walker <keith.walker@arm.com>
866         * dwarf2.c (read_attribute_value): New function to handle
867         DW_FORM_indirect.
868         (read_attribute): Use it.
870 2001-11-13  Geoffrey Keating  <geoffk@redhat.com>
872         * dwarf2.c (decode_line_info): Properly deal with unknown standard
873         opcodes.
875 2001-11-13  John Marshall  <jmarshall@acm.org>
876             Alan Modra  <amodra@bigpond.net.au>
878         * section.c (bfd_make_section_anyway): Don't increment section_id
879         and the BFD's section_count if adding the section failed.
880         * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
881         change.
883 2001-11-12  Orjan Friberg  <orjanf@axis.com>
885         * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
886         core dump format.
888 2001-11-11  H.J. Lu <hjl@gnu.org>
890         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
891         _bfd_elf_strtab_size instead of _bfd_stringtab_size.
893         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
894         dynstr type to `struct elf_strtab_hash *'.
896 2001-11-11  Hans-Peter Nilsson  <hp@bitrange.com>
898         * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
899         size_t.  Rename second i to j.
901 2001-11-10  Jeffrey A Law  (law@cygnus.com)
903         * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
905 2001-11-10  Alan Modra  <amodra@bigpond.net.au>
907         * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
908         relocs into shared libs.
909         * elf32-cris.c (cris_elf_relocate_section): Likewise.
910         * elf32-i370.c (i370_elf_relocate_section): Likewise.
911         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
912         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
913         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
914         * elf32-sh.c (sh_elf_relocate_section): Likewise.
915         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
916         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
917         * elf64-s390.c (elf_s390_relocate_section): Likewise.
918         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
919         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
920         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
922         * elf.c (bfd_section_from_r_symndx): New function.
923         * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
924         (struct sym_sec_cache): New.
925         (bfd_section_from_r_symndx): Declare.
926         (struct bfd_elf_section_data): Change local_dynrel type to PTR.
927         * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
928         relocs when relocatable.  Don't zero entire reloc, just zero the
929         addend and sym.
930         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
931         (elf32_hppa_link_hash_table_create): Init it.
932         (elf32_hppa_check_relocs): Track dynamic relocs needed for local
933         syms on a per-section basis as we do for globals.
934         (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
935         (allocate_dynrelocs): Warning fix.
936         (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
937         section has been discarded.
938         (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
939         into shared libs.
940         * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
941         (elf_i386_link_hash_table_create): Init it.
942         (elf_i386_check_relocs): Track dynamic relocs needed for local
943         syms on a per-section basis as we do for globals.
944         (elf_i386_gc_sweep_hook): Update for local_dynrel change.
945         Remove dead code.
946         (allocate_dynrelocs): Warning fix.
947         (elf_i386_size_dynamic_sections): Don't allocate relocs when
948         section has been discarded.
949         (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
950         into shared libs.
951         * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
952         (elf_s390_link_hash_table_create): Init it.
953         (elf_s390_check_relocs): Track dynamic relocs needed for local
954         syms on a per-section basis as we do for globals.
955         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
956         Remove dead code.
957         (allocate_dynrelocs): Warning fix.
958         (elf_s390_size_dynamic_sections): Don't allocate relocs when
959         section has been discarded.
960         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
961         into shared libs.
962         * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
963         (ppc64_link_hash_table_create): Init it.
964         (ppc64_elf_check_relocs): Track dynamic relocs needed for local
965         syms on a per-section basis as we do for globals.
966         (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
967         (allocate_dynrelocs): Call the correct record_dynamic_dymbol
968         function.  Warning fix.
969         (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
970         section has been discarded.
971         (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
972         into shared libs.
973         * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
974         (elf_s390_link_hash_table_create): Init it.
975         (elf_s390_check_relocs): Track dynamic relocs needed for local
976         syms on a per-section basis as we do for globals.
977         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
978         Remove dead code.
979         (allocate_dynrelocs): Warning fix.
980         (elf_s390_size_dynamic_sections): Don't allocate relocs when
981         section has been discarded.
982         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
983         into shared libs.
985 2001-11-08  Martin Schwidefsky  <schwidefsky@de.ibm.com>
987         * elf32-s390: Major rework that introduces all recent changes to
988         the s390 backends.  Get a closer match to elf32-i386.
989         (elf_s390_relocate_section): Make use of dynamic section short-cuts.
990         Localise vars, and delay setting.  Better error reporting, replace
991         BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
992         symbol is not defined in the regular object file and tread the weak
993         definition as the normal one.  Don't discard relocs for undefweak or
994         undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
995         test for avoided copy relocs.  Reinstate fudge for unresolved relocs
996         in debugging sections.
997         (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
998         reloc processing for weakdefs.  Remove redundant casts and aborts.
999         Delay setting of vars until needed.  Move creation of dynamic symbols
1000         and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
1001         BFD_ASSERT with abort.  Discard .plt entries for everything with
1002         plt.refcount <= 0.
1003         (elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
1004         .got or .relgot here but do it in allocate_dynrelocs.  Reference count
1005         possible .plt and .got entries.  Don't test input section SEC_READONLY
1006         here to try to avoid copy relocs, and keep dyn_relocs regardless of
1007         ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
1008         variables until needed.  Remove separate switch stmt for creating .got
1009         section.  Initialise local_got_refcounts to 0.  Cache pointer to
1010         "sreloc" section in elf_section_data. Tweak condition under which .got
1011         created.  Report files with bad relocation section names.
1012         (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
1013         have been forced local.  Use same test to decide if we can use a
1014         relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
1015         comment.  Move expressions out of function calls.  Replace BFD_ASSERT
1016         with abort.
1017         (elf_s390_finish_dynamic_sections): Migrate common code out of switch
1018         statement.  Replace BFD_ASSERT with abort.
1019         (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
1020         to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
1021         instead of looking up section names for DT_TEXTREL.  Replace
1022         BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
1023         Add a comment to remind us that one day this ought to be fixed.
1024         (struct elf_s390_link_hash_entry): Rename "root" to "elf".
1025         (struct elf_s390_link_hash_table): Likewise.
1026         (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
1027         rid of unnecessary casts.
1028         (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
1029         Remove "section" field.
1030         (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1031         Reference count possible .plt entries.  Don't deallocate .got and
1032         .relgot space here.
1033         (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
1034         Update comment.
1035         (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
1036         dyn_relocs.
1037         (elf_s390_discard_copies):  Delete.
1038         (elf_s390_link_hash_traverse): Delete.
1039         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
1040         rather than gc variety).
1041         (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
1042         srelplt, sdynbss, srelbss fields.
1043         (elf_s390_link_hash_table_create): Init them.
1044         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1045         (allocate_dynrelocs): New function.
1046         (create_got_section): New function.
1047         (elf_backend_can_refcount): Define.
1048         (elf_backend_copy_indirect_symbol): Define.
1049         (elf_s390_copy_indirect_symbol): New function.
1050         (elf_s390_create_dynamic_sections): New function.
1051         (readonly_dynrelocs): New function.
1052         * elf64-s390.c: Likewise.
1054 2001-11-07  Jakub Jelinek  <jakub@redhat.com>
1056         * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
1057         (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
1058         (elf-strtab.lo): Add rule.
1059         * Makefile.in: Rebuilt.
1060         * configure.in (elf): Add elf-strtab.lo.
1061         * configure: Rebuilt.
1062         * elf-bfd.h (elf_strtab_hash): Forward declare.
1063         (struct elf_link_hash_table): Change dynstr type to
1064         struct elf_strtab_hash *.
1065         (struct elf_obj_tdata): Change strtab_ptr type to
1066         struct elf_strtab_hash *.
1067         (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
1068         _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
1069         _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
1070         _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
1071         _bfd_elf_strtab_finalize): New prototypes.
1072         * elf-strtab.c: New file.
1073         * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
1074         and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
1075         Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
1076         when forcing dynamic symbol to local.
1077         (elf_link_create_dynamic_sections): Call
1078         _bfd_elf_strtab_init instead of elf_stringtab_init.
1079         (elf_link_record_local_dynamic_symbol): Likewise, change
1080         dynstr type.  Use _bfd_elf_strtab functions instead of
1081         _bfd_stringtab calls.
1082         (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
1083         _bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
1084         call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
1085         (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
1086         (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
1087         dynamic symbol to local.
1088         (elf_link_assign_sym_version): Likewise.
1089         (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
1090         _bfd_stringtab_emit.
1091         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
1092         type.  Call _bfd_elf_strtab functions instead of
1093         _bfd_stringtab functions.
1094         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1095         * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
1096         (elf_fake_sections): Likewise.
1097         (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
1098         on shstrtab hash table, call _bfd_elf_strtab_addref on each section
1099         name in the output.  Call _bfd_elf_strtab_finalize and
1100         use _bfd_elf_strtab_offset to finalize sh_name section header fields.
1101         (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
1102         instead of _bfd_stringtab_size.
1103         (prep_headers): Change shstrtab type.
1104         Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
1106 2001-11-07  Alan Modra  <amodra@bigpond.net.au>
1108         * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
1109         bad symtab segfault.  Formatting and warning fixes.  Improve
1110         error message for internationalisation.
1112 2001-11-06  H.J. Lu  (hjl@gnu.org)
1114         * elflink.h (elf_link_input_bfd): Complain about relocs against
1115         discarded sections.
1117 2001-11-03  Alan Modra  <amodra@bigpond.net.au>
1119         * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
1121 2001-11-02  H.J. Lu  <hjl@gnu.org>
1123         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1124         dynamic relocation for symbols defined in regular objects when
1125         creating executables.
1127 2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
1129         * configure.in (ALL_LINGUAS): Add "fr".
1130         * configure: Regenerate.
1131         * po/fr.po: New file.
1133         * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
1135 2001-11-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1137         * som.c (setup_sections): Initialize subspace_sections.
1139 2001-11-02  H.J. Lu  (hjl@gnu.org)
1141         * coffgen.c (coff_object_p): Return 0 if the header is too big.
1143 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
1145         * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1146         information.  Save bfd arch and mach values.  Restore on error.
1148 2001-11-02  Alan Modra  <amodra@bigpond.net.au>
1150         * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1151         (allocate_PIC_calls): New function.
1152         (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1153         (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1154         (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1156 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
1158         * elf32-cris.c (cris_elf_grok_prstatus): New function.
1159         (cris_elf_grok_psinfo): New function.
1160         (elf_backend_grok_prstatus): Define.
1161         (elf_backend_grok_psinfo): Define.
1163 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
1165         * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1166         prediction bits.
1168 2001-10-31  Chris Demetriou  <cgd@demetriou.com>
1170         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1171         relocations properly.
1173 2001-10-31  H.J. Lu <hjl@gnu.org>
1175         * elflink.h (elf_link_output_extsym): Don't clear the visibility
1176         field for relocateable.
1178 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
1180         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1181         .plt relocs in DT_RELASZ.
1183 2001-10-29  NIIBE Yutaka  <gniibe@m17n.org>
1185         * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1186         targets.
1188 2001-10-31  Nick Clifton  <nickc@cambridge.redhat.com>
1190         * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1192 2001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
1194         * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1195         (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1196         (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1197         Regenerate dependencies.
1198         * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1199         * config.bfd: [BFD64] (mmix-*-*): New case.
1200         * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1201         * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1202         (bfd_mmix_arch): Declare.
1203         (bfd_archures_list): Add bfd_mmix_arch.
1204         * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1205         (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1206         (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1207         bfd_mmo_mmix_vec.
1208         * reloc.c: Add MMIX relocations.
1209         * bfd.c (struct _bfd, tdata): Add mmo_data.
1210         * Makefile.in: Regenerate.
1211         * configure: Regenerate.
1212         * libbfd.h: Regenerate.
1213         * bfd-in2.h: Regenerate.
1214         * configure: Rebuild.
1216 2001-10-30  Richard Earnshaw (rearnsha@arm.com)
1218         * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1219         p_paddr of the segment that contains it.
1220         (copy_private_bfd_data): If the LMA for a segment is known, use it
1221         for matching sections to segments.
1222         (assign_file_positions_for_segments): Use the LMA when adjusting
1223         for inter-section alignment padding.
1225 2001-10-29  Kazu Hirata  <kazu@hxi.com>
1227         * README: Fix a typo.
1229 2001-10-24  Richard Henderson  <rth@redhat.com>
1231         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1232         timestamp to time_t for ctime.
1234 2001-10-24  Hans-Peter Nilsson  <hp@axis.com>
1236         * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1237         unsigned, increasing index.
1239 2001-10-23  H.J. Lu <hjl@gnu.org>
1241         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1242         m != NULL before accessing it.
1244 2001-10-23  Alan Modra  <amodra@bigpond.net.au>
1246         * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1247         bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1248         doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1250         * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1251         (hppa_link_hash_newfunc): Likewise.
1252         (elf32_hppa_finish_dynamic_symbol): Likewise.
1253         (allocate_dynrelocs): Always allocate .got relocs if shared.
1254         (elf32_hppa_relocate_section): Output them too.  Similarly
1255         consolidate .plt reloc code, and no longer initialise .plt
1256         when a reloc is output.
1257         (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1258         when no reloc is output.
1260         From Herbert Xu <herbert@gondor.apana.org.au>
1261         * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1262         unreachable branches.
1264 2001-10-22  H.J. Lu <hjl@gnu.org>
1266         * configure.in (WIN32LIBADD): Use -L../libiberty for
1267         mips*-*-linux*.
1268         * configure: Rebuild.
1270 2001-10-21  H.J. Lu <hjl@gnu.org>
1272         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1273         if shared library is enabled only for Linux hosts.
1274         * configure: Rebuild.
1276 2001-10-21  H.J. Lu <hjl@gnu.org>
1278         * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1279         ../libiberty/Makefile instead of $enable_shared.
1280         * configure: Rebuild.
1282 2001-10-21  H.J. Lu <hjl@gnu.org>
1284         * elf32-cris.c (cris_reloc_type_lookup): Use int for index.  Cover
1285         index 0.
1287 2001-10-20  H.J. Lu <hjl@gnu.org>
1289         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1290         if shared library is enabled.
1291         * configure: Rebuild.
1293 2001-10-20  H.J. Lu <hjl@gnu.org>
1295         * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1297 2001-10-19  H.J. Lu <hjl@gnu.org>
1299         * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1300         size is empty.
1302 2001-10-18  H.J. Lu <hjl@gnu.org>
1304         * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1305         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1307 2001-10-18  Jakub Jelinek  <jakub@redhat.com>
1309         * section.c (_bfd_strip_section_from_output): Don't count
1310         SEC_EXCLUDE sections as references.  Set SEC_EXCLUDE.
1312 2001-10-17  Alan Modra  <amodra@bigpond.net.au>
1314         * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1315         Elf_Internal_Shdr.contents now that it's no longer a PTR.
1316         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1317         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1318         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1319         * elf32-sh.c (sh_elf_relax_section): Likewise.
1320         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1321         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1322         * elf.c (setup_group): Warning fixes.
1323         * elflink.h (elf_link_sort_relocs): Likewise.
1324         * pdp11.c (slurp_reloc_table): Likewise.
1326 2001-10-16  Jeff Holcomb  <jeffh@redhat.com>
1328         * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1329         casts.
1331 2001-10-15  H.J. Lu <hjl@gnu.org>
1333         * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1334         for relocations against discarded link-once section.
1336 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
1338         * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1339         bfd_reloc_outofrange and similar errors.
1341         * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1342         rather than ind->weakdef.
1343         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1344         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1345         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1346         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1347         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1349 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
1350             H.J. Lu  <hjl@gnu.org>
1352         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1353         counts for aliases instead of aborting.
1354         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1355         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1357         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1358         to -1 for non-function symbols.
1359         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1360         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1361         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1362         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1363         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1364         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1365         plt.offset instead of plt.refcount when setting to -1.
1367 2001-10-12  Nick Clifton  <nickc@cambridge.redhat.com>
1369         * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1370         like R_ARM_PC24.  Include reloc number in error message about
1371         unresolvable relocs.
1373 2001-10-10  Jakub Jelinek  <jakub@redhat.com>
1375         * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1376         relocations against the same symbol in .rel{,a}.dyn section.
1378 2001-10-10  Kazu Hirata  <kazu@hxi.com>
1380         * aout-encap.c: Fix comment typos.
1381         * aoutx.h: Likewise.
1382         * archive.c: Likewise.
1383         * bout.c: Likewise.
1384         * coff64-rs6000.c: Likewise.
1385         * coffcode.h: Likewise.
1386         * coffgen.c: Likewise.
1387         * cofflink.c: Likewise.
1388         * coff-mips.c: Likewise.
1389         * ecoff.c: Likewise.
1390         * elf32-m32r.c: Likewise.
1391         * libcoff-in.h: Likewise.
1392         * libecoff.h: Likewise.
1393         * libxcoff.h: Likewise.
1394         * nlm32-i386.c: Likewise.
1395         * pdp11.c: Likewise.
1396         * section.c: Likewise.
1397         * som.c: Likewise.
1398         * som.h: Likewise.
1399         * bfd-in2.h: Regenerate.
1400         * libcoff.h: Likewise.
1402 2001-10-10  Alan Modra  <amodra@bigpond.net.au>
1404         * elf.c (elf_map_symbols): Don't create new section symbols; Use
1405         existing section syms.  Update comments.
1406         (copy_private_bfd_data): Formatting fixes.
1407         (elfcore_grok_win32pstatus): Likewise.
1408         (swap_out_syms): Likewise.  Remove unnecessary level of braces.
1410 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1412         * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1413         "group_name".
1414         (elf_group_name): Define.
1415         (elf_next_in_group): Define.
1416         * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1417         (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1418         first member section; Instead use elf_next_in_group.
1419         (bfd_section_from_shdr): Likewise.
1420         (set_group_contents): Likewise.  Use elf_section_syms, not sec->symbol.
1422 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1424         * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1425         "next_in_group".  Fix gp and gp_size comments.
1426         * elf.c (union elf_internal_group): New.
1427         (setup_group): New function.
1428         (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1429         Call setup_group for SHF_GROUP sections.
1430         (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1431         (elf_fake_sections): Set header type for SEC_GROUP, and header
1432         flags for sections in a group.
1433         (set_group_contents): New function.
1434         (_bfd_elf_compute_section_file_positions): Call it.
1435         (assign_section_numbers): Set sh_link for SHT_GROUP.
1437         * elflink.h (gc_mark_hook): Handle section groups.
1438         * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1439         * section.c (SEC_GROUP): Define.
1440         (struct sec): Comment fixes.
1441         * bfd-in2.h: Regenerate.
1443         * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1444         out of function args.
1445         (_bfd_elf_canonicalize_reloc): Similarly.
1446         (_bfd_elf_get_symtab): Here too.
1447         (_bfd_elf_canonicalize_dynamic_symtab): And here.
1448         * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1449         bfd_bread, and remove unnecessary cast.
1451 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
1453         * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1455 2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
1457         * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1458         compilation unit.
1460 2001-10-06  Alan Modra  <amodra@bigpond.net.au>
1462         * bfd.c (bfd_assert): Report bfd version.
1463         (_bfd_abort): Likewise.
1465         * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1466         section sym values.  Instead replace any relocs against them with
1467         relocs against STN_UNDEF, which has a zero value.
1469         * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1470         relocs.
1472 2001-10-05  Jeff Law <law@redhat.com>
1474         * som.h (som_exec_data): New field "version_id".
1475         * som.c (som_object_setup): Record the version_id if it
1476         exists.
1477         (som_prep_headers): Do not initialize version_id here.
1478         (som_finish_writing): Initialize version_id here.
1480 2000-10-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1482         * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1483         according to the MIPS/SGI ELF64 ABI Draft.
1484         (mips_elf_sort_hash_table): Typo.
1486 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1488         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1490         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1491         copying flags if this is a weakdef.
1493 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1495         * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1496         packing.
1498         * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1499         to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1500         (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1502         * Makefile.am (BFD_H_DEPS): Add symcat.h.  Ensure everything
1503         depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1504         backends we configure.  Run "make dep-am".
1505         (install-data-local): Install symcat.h.
1506         * dep-in.sed: Remove symcat.h from dependencies.
1507         * Makefile.in: Regenerate.
1509 2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
1511         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1513 2001-10-03  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1515         * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1516         (elf_backend_default_use_rela_p): New define.
1518 2001-10-03  Alan Modra  <amodra@bigpond.net.au>
1520         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1521         change.
1523         * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1524         * configure: Regenerate.
1525         * Makefile.am (BFD_H_FILES): Add version.h.
1526         * Makefile.in: Regenerate.
1527         * po/SRC-POTFILES.in: Regenerate.
1529         * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1530         elf_backend_copy_indirect_symbol so that backend has a chance to
1531         copy other necessary fields.
1532         * elf-bfd.h (struct elf_backend_data): Update description of
1533         elf_backend_copy_indirect_symbol.
1534         * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1535         copying flags if this is a weakdef.
1536         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1537         (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1538         than bfd_link_hash_lookup.
1539         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1540         reloc processing for weakdefs.
1541         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1542         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1544 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1546         * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1547         result of ELF64_R_TYPE to enum before using in a switch.
1548         (ppc64_elf_gc_mark_hook): Likewise.
1549         (ppc64_elf_gc_sweep_hook): Likewise.
1550         (ppc64_elf_reloc_type_class): Likewise.
1552 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1554         * version.h: New file.
1555         * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1556         (BFD_VERSION_DATE): Define.
1557         (BFD_VERSION_STRING): Define.
1558         * configure.in: AC_SUBST bfd_version, bfd_version_date and
1559         bfd_version_string.
1560         (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1561         * bfd-in2.h: Regenerate.
1562         * configure: Regenerate.
1563         * Makefile.am: Run "make dep-am".
1564         * Makefile.in: Regenerate.
1566         * bfd-in.h: Include "symcat.h".
1567         (CONCAT4): Redefine as for old CAT4.
1568         * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1569         Add warning regarding whitespace.
1570         * aout-cris.c: Likewise.
1571         * aout-ns32k.c: Likewise.
1572         * aout-sparcle.c: Likewise.
1573         * aout-tic30.c: Likewise.
1574         * aout0.c: Likewise.
1575         * armnetbsd.c: Likewise.
1576         * demo64.c: Likewise.
1577         * elf-bfd.h: Likewise.
1578         * gen-aout.c: Likewise.
1579         * host-aout.c: Likewise.
1580         * hp300bsd.c: Likewise.
1581         * hp300hpux.c: Likewise.
1582         * i386aout.c: Likewise.
1583         * i386bsd.c: Likewise.
1584         * i386dynix.c: Likewise.
1585         * i386freebsd.c: Likewise.
1586         * i386linux.c: Likewise.
1587         * i386lynx.c: Likewise.
1588         * i386mach3.c: Likewise.
1589         * i386netbsd.c: Likewise.
1590         * libaout.h: Likewise.
1591         * m68k4knetbsd.c: Likewise.
1592         * m68klinux.c: Likewise.
1593         * m68klynx.c: Likewise.
1594         * m68knetbsd.c: Likewise.
1595         * m88kmach3.c: Likewise.
1596         * mipsbsd.c: Likewise.
1597         * newsos3.c: Likewise.
1598         * ns32knetbsd.c: Likewise.
1599         * pc532-mach.c: Likewise.
1600         * pdp11.c: Likewise.
1601         * riscix.c: Likewise.
1602         * sparclinux.c: Likewise.
1603         * sparclynx.c: Likewise.
1604         * sparcnetbsd.c: Likewise.
1605         * sunos.c: Likewise.
1606         * targets.c: Likewise.
1607         * vaxnetbsd.c: Likewise.
1608         * vms-hdr.c: Likewise.
1610 2001-10-01  Alan Modra  <amodra@bigpond.net.au>
1612         * bfd-in.h: Remove comments regarding generated files.
1613         * libbfd-in.h: Likewise.
1614         * libcoff-in.h: Likewise.
1615         * bfd-in2.h: Regenerate.
1616         * libbfd.h: Likewise.
1617         * libcoff.h: Likewise.
1619 2001-09-30  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1620             Hans-Peter Nilsson  <hp@bitrange.com>
1622         * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1623         partial_inplace, matching assembler output.  Set src_mask to
1624         all ones.
1625         (sh_elf_relocate_section): Delete misplaced comment.
1626         For relocatable linking against section symbol, call
1627         _bfd_relocate_contents for partial_inplace relocs and adjust
1628         rel->r_addend for others.
1629         <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1630         bfd_get_32, not at rel->r_addend.
1632 2001-09-30  Alan Modra  <amodra@bigpond.net.au>
1634         * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1635         the old dir refcount, so we indirectly set them to init_refcount.
1636         Short-circuit asserts when we've just verified they are true.
1638 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1640         * section.c (struct sec): Remove kept_section.
1641         (STD_SECTION): Remove kept_section initialisation.
1642         (bfd_make_section_anyway): Here too.
1643         * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1644         * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1645         * elflink.h (elf_link_input_bfd): Set discarded link-once section
1646         symbols to zero, and remove all code involved with kept_section
1647         and tracking section symbol values.
1648         * bfd-in2.h: Regenerate.
1649         * configure.in: Bump version number.
1650         * configure: Regenerate.
1652 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1654         * elf64-ppc.c (struct ppc_dyn_relocs): New.
1655         (IS_ABSOLUTE_RELOC): Define.
1656         (struct ppc_link_hash_entry): New.
1657         (struct ppc_link_hash_table): New.
1658         (ppc_hash_table): Define.
1659         (link_hash_newfunc): New function.
1660         (ppc64_elf_link_hash_table_create): New function.
1661         (create_got_section): New function.
1662         (ppc64_elf_create_dynamic_sections): Call create_got_section.  Stash
1663         pointers to our dynamic sections in hash table.
1664         (ppc64_elf_copy_indirect_symbol): New function.
1665         (ppc64_elf_check_relocs): Remove DEBUG code.  Use short-cuts to
1666         dynamic sections.  Localise vars.  Modify code for refcounts
1667         starting from zero.  Don't allocate here, or force symbols dynamic.
1668         Don't copy all relocs if shared, select ones we need.  Add code
1669         to track possible copy relocs for non-shared link.
1670         (ppc64_elf_gc_mark_hook): Update comment.
1671         (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1672         (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code.  Rewrite .plt
1673         code for reference counting garbage collection.  Don't create .plt
1674         entries for functions that don't comply with ABI naming convention,
1675         and don't allocate .plt space here.  Use short-cuts to dynamic
1676         sections.  If possible, keep dynamic relocations instead of using
1677         copy relocs.  Remove confused comments.
1678         (ppc_adjust_dynindx): Delete.
1679         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1680         (allocate_dynrelocs): New function.
1681         (readonly_dynrelocs): New function.
1682         (ppc64_elf_size_dynamic_sections): Rewrite.  Allocate local .got
1683         space here, and call allocate_dynrelocs to allocate space for
1684         global .plt, .got and reloc sections.  Use short-cuts to dynamic
1685         sections.  Call readonly_dynrelocs to determine whether we need
1686         DT_TEXTREL.  Don't generate section symbols here, the generic
1687         ELF linker code does it for us.
1688         (ppc64_elf_final_link): Call regular ELF backend linker rather than
1689         gc variety, since we do our own .got handling.
1690         (ppc64_elf_relocate_section): Remove DEBUG code.  Make use of
1691         dynamic section short-cuts.  Localise vars, and delay setting.
1692         Handle unknown relocs in main switch statement.  Replace ugly
1693         complicated tests for unresolvable relocs with a simple direct
1694         scheme using "unresolved_reloc" var.  Test ELF_ST_VISIBILITY
1695         before allowing an undefined sym in a shared lib.  Do R_*_DS tests
1696         after main switch, when we've set addend.  Do non-addend insn
1697         tweaks before main swithc.  Ignore input_section->vma when
1698         calculating reloc offsets as it's always zero.  Rewrite dynamic
1699         reloc handling.  Consolidate R_*_HA handling.  Handle more relocs.
1700         (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code.  Make use
1701         of dynamic section short-cuts.  Reorganise .plt handling code.
1702         Remove confused comments.  Take note of ELF_LINK_FORCED_LOCAL.
1703         Move expressions out of swap_reloca_out function calls.
1704         (ppc64_elf_reloc_type_class): New function.
1705         (ppc64_elf_info_to_howto): Move common expression to local var.
1706         (ppc64_elf_finish_dynamic_sections): Remove DEBUG code.  Make use
1707         of dynamic section short-cuts.  Don't fiddle with section syms
1708         here as the ELF linker does it for us.
1709         (elf_backend_can_refcount): Define.
1710         (bfd_elf64_bfd_link_hash_table_create): Define.
1711         (elf_backend_copy_indirect_symbol): Define.
1712         (elf_backend_reloc_type_class): Define.
1713         (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1715 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1717         * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1718         (struct elf_backend_data): Add can_refcount.
1719         * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts.  Set
1720         got.refcount and plt.refcount from init_refcount.
1721         (_bfd_elf_link_hash_table_init): Set up init_refcount.
1722         (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1723         rather than got/plt.offset, and test for <= 0 rather than -1.
1724         * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1725         * elfxx-target.h (elf_backend_can_refcount): Define.
1726         (elfNN_bed): Init can_refcount.
1727         * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1728         (_bfd_generic_link_hash_newfunc): Likewise.
1729         * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1730         starting from zero.
1731         (elf_backend_can_refcount): Define.
1732         * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1733         starting from zero.
1734         (elf32_hppa_copy_indirect_symbol): Make static to agree with
1735         prototype.
1736         (elf_backend_can_refcount): Define.
1737         * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1738         starting from zero.
1739         (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1740         (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1741         (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1742         (elf_backend_can_refcount): Define.
1743         (elf_i386_copy_indirect_symbol): Make static to agree with
1744         prototype.  Formatting fix.
1745         * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1746         starting from zero.
1747         (elf_backend_can_refcount): Define.
1748         * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1749         starting from zero.
1750         (elf_backend_can_refcount): Define.
1751         * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1752         starting from zero.
1753         (elf_backend_can_refcount): Define.
1754         * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1755         starting from zero.
1756         (elf_backend_can_refcount): Define.
1757         * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1758         starting from zero.
1759         (elf_backend_can_refcount): Define.
1761         * som.c (som_write_symbol_strings): Cast current_offset in
1762         bfd_seek call to match param type.
1764 2001-09-28  J. Brobecker <brobecker@gnat.com>
1766         * som.c (som_write_symbol_strings): Fix incorrect type of
1767         current_offset to match the function definition. Fixes a build
1768         failure on HPUX-11.00.
1770 2001-09-28  Richard Henderson  <rth@redhat.com>
1772         * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1773         SEC_MERGE, SEC_STRINGS.
1775         * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1776         * bfd-in2.h: Rebuild.
1778 2001-09-28  Alan Modra  <amodra@bigpond.net.au>
1780         * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1781         reloc code using x86_64_reloc_map.
1783         * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1784         no longer allocate here.  Localise some vars to blocks where they
1785         are used.
1786         (elf32_hppa_adjust_dynamic_symbol): Correct a comment.  Delay
1787         setting of vars until needed.
1788         (allocate_dynrelocs): Don't create a .plt entry without a reloc
1789         when symbol visibilty makes a function local.
1790         (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1791         swap_reloca_out function calls.
1792         (elf32_hppa_relocate_section): Likewies.  Comment typo fix.
1793         (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1794         switch statement.
1796         * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1797         no longer allocate here.  Localise some vars to blocks where they
1798         are used.  Remove separate switch stmt for creating .got sec.
1799         (elf_i386_adjust_dynamic_symbol): Correct a comment.  Remove
1800         redundant casts and aborts.  Delay setting of vars until needed.
1801         (allocate_dynrelocs): Remove redundant casts and aborts.
1802         (elf_i386_size_dynamic_sections): Move comment.
1803         (elf_i386_finish_dynamic_symbol): Move expressions out of function
1804         calls.
1805         (elf_i386_relocate_section): Likewise.  Comment typo fix.
1806         (elf_i386_finish_dynamic_sections): Migrate common code out of
1807         switch statement.
1808         (elf_backend_* defines): Sort.
1810         * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1811         without a reloc when symbol visibilty makes a function local.
1813 2001-09-27  Nick Clifton  <nickc@cambridge.redhat.com>
1815         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1816         conflicting float flags.
1818 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1820         * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1821         (elf_backend_copy_indirect_symbol): Define.
1822         (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1823         (struct elf_i386_link_hash_table): Likewise.
1824         (link_hash_newfunc): Get rid of unnecessary casts.
1825         (elf_i386_link_hash_table_create): Likewise.
1826         (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1827         Don't test input section SEC_READONLY here to try to avoid copy
1828         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1829         (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1830         here to properly test whether we need copy relocs.  Do so for weak
1831         syms too.
1833         * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1834         (elf_backend_copy_indirect_symbol): Define.
1835         (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1836         (stub_hash_newfunc): Get rid of unnecessary casts.
1837         (hppa_link_hash_newfunc): Likewise.
1838         (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1839         Don't test input section SEC_READONLY here to try to avoid copy
1840         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1841         (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1842         here to properly test whether we need copy relocs.  Do so for weak
1843         syms too.
1845 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1847         * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1848         VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1849         (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1851 2001-09-25  Jakub Jelinek  <jakub@redhat.com>
1853         * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1854         computation.
1856 2001-09-25  H.J. Lu  <hjl@gnu.org>
1858         * bfd-in2.h: Regenerated.
1860 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1862         * elf32-i386.c: Add comment re linker function names and ordering.
1863         (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1864         (elf_i386_grok_prstatus): Move before linker functions.
1865         (elf_i386_grok_psinfo): Likewise.
1866         (elf_i386_fake_sections): Move so that functions are ordered.
1867         (elf_i386_reloc_type_class): Likewise.  Comment function purpose.
1869 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1871         * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1872         throughout file.
1874         * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete.  Remove all
1875         code handling this option.
1876         (LONG_BRANCH_VIA_PLT): Likewise.
1877         (RELATIVE_DYNRELOCS): Define as zero.
1878         (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1879         "pc_count" fields.  Remove "section" field.
1880         (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1881         (elf32_hppa_check_relocs): Don't allocate space for dynamic
1882         relocs here.  Instead, record all needed dynamic relocs via
1883         dyn_relocs and local_dynrel.  Cache pointer to "sreloc" section
1884         in elf_section_data.
1885         (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1886         (allocate_plt_and_got_and_discard_relocs): Rename to
1887         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1888         (readonly_dynrelocs): New function.
1889         (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1890         Call readonly_dynrelocs to determine need for DT_TEXTREL.
1891         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1892         (elf32_hppa_relocate_section): Make use of cached sreloc.
1893         (elf32_hppa_reloc_type_class): New function.
1894         (elf_backend_reloc_type_class): Define.
1896 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1898         * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1899         and "sreloc" fields.
1900         * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1901         "pc_count" fields.  Remove "section" field.
1902         (elf_i386_check_relocs): Don't set DF_TEXTREL here.  Don't
1903         allocate space for dynamic relocs here.  Instead, record all
1904         needed dynamic relocs via dyn_relocs and local_dynrel.  Cache
1905         pointer to "sreloc" section in elf_section_data.
1906         (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1907         (allocate_plt_and_got_and_discard_relocs): Rename to
1908         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1909         (readonly_dynrelocs): New function.
1910         (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1911         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1912         (elf_i386_relocate_section): Make use of cached sreloc.
1914 2001-09-24  Alan Modra  <amodra@bigpond.net.au>
1916         * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1917         reloc rather than just the type.
1918         (_bfd_elf_reloc_type_class): Likewise.
1919         * elf.c (_bfd_elf_reloc_type_class): Likewise.
1920         * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1921         * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1922         * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1923         * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1924         * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1925         * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1926         * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1927         * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1928         * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1929         * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1930         * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1931         * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1932         * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1933         * elflink.h: Formatting fixes.
1934         (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1935         Call bfd_zmalloc rather than calloc.  Remove unnecessary cast of
1936         o->contents to PTR.  Update call to elf_backend_reloc_type_class.
1938 2001-09-22  John Reiser  <jreiser@BitWagon.com>
1940         * elfcode.h (elf_object_p): Allow for no section header at all in
1941         non-ET_REL files.  Honor 0 for e_shnum, e_shstrndx, e_shoff.
1943 2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
1945         * elfxx-ia64.c: Fix compile time warning messages.
1946         * coff-mcore.c: Fix compile time warning messages.
1947         * coff-ppc.c: Fix compile time warning messages.
1948         * coffcode.h: Fix compile time warning messages.
1949         * elf32-mips.c: Fix compile time warning messages.
1950         * elf64-alpha.c: Fix compile time warning messages.
1951         * libbfd.c: Fix compile time warning messages.
1952         * bfd-in2.h: Regenerate.
1954 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1956         * Makefile.am: Run "make dep-am".
1957         * Makefile.in: Regenerate.
1959         * aoutx.h: Formatting fixes.
1960         * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1962         * linker.c: Replace bfd_get_filename with bfd_archive_filename
1963         in error message.
1965 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1967         * bfd.c (bfd_archive_filename): New function.
1968         * bfd-in2.h: Regenerate.
1969         * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1970         in error messages where the bfd is an input bfd.
1971         * aout-cris.c: Likewise.
1972         * coff-arm.c: Likewise.
1973         * coff-mcore.c: Likewise.
1974         * coff-ppc.c: Likewise.
1975         * coff-rs6000.c: Likewise.
1976         * coff-sh.c: Likewise.
1977         * coff-tic54x.c: Likewise.
1978         * coff-tic80.c: Likewise.
1979         * coff64-rs6000.c: Likewise.
1980         * coffcode.h: Likewise.
1981         * coffgen.c: Likewise.
1982         * cofflink.c: Likewise.
1983         * ecofflink.c: Likewise.
1984         * elf-hppa.h: Likewise.
1985         * elf.c: Likewise.
1986         * elf32-arm.h: Likewise.
1987         * elf32-cris.c: Likewise.
1988         * elf32-gen.c: Likewise.
1989         * elf32-hppa.c: Likewise.
1990         * elf32-i370.c: Likewise.
1991         * elf32-i386.c: Likewise.
1992         * elf32-m32r.c: Likewise.
1993         * elf32-mcore.c: Likewise.
1994         * elf32-mips.c: Likewise.
1995         * elf32-ppc.c: Likewise.
1996         * elf32-s390.c: Likewise.
1997         * elf32-sh.c: Likewise.
1998         * elf32-sparc.c: Likewise.
1999         * elf32-v850.c: Likewise.
2000         * elf64-alpha.c: Likewise.
2001         * elf64-gen.c: Likewise.
2002         * elf64-ppc.c: Likewise.
2003         * elf64-s390.c: Likewise.
2004         * elf64-sparc.c: Likewise.
2005         * elf64-x86-64.c: Likewise.
2006         * elflink.h: Likewise.
2007         * elfxx-ia64.c: Likewise.
2008         * ieee.c: Likewise.
2009         * ihex.c: Likewise.
2010         * libbfd.c: Likewise.
2011         * pdp11.c: Likewise.
2012         * pe-mips.c: Likewise.
2013         * peicode.h: Likewise.
2014         * srec.c: Likewise.
2015         * xcofflink.c: Likewise.
2017         * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
2019         * elflink.c (_bfd_elf_create_linker_section): Better grammar for
2020         error message.
2022         * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
2023         error message.
2025         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
2026         Consolidate error messages, and split long messages to two lines.
2028 2001-09-20  John Reiser  <jreiser@BitWagon.com>
2030         * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
2031         and info->allow_shlib_undefined.
2032         * elf32-cris.c: Likewise.
2033         * elf32-hppa.c: Likewise.
2034         * elf32-m68k.c: Likewise.
2035         * elf32-mips.c: Likewise.
2036         * elf32-ppc.c: Likewise.
2037         * elf32-s390.c: Likewise.
2038         * elf32-sh.c: Likewise.
2039         * elf32-sparc.c: Likewise.
2040         * elf64-alpha.c: Likewise.
2041         * elf64-hppa.c: Likewise.
2042         * elf64-ppc.c: Likewise.
2043         * elf64-s390.c: Likewise.
2044         * elf64-sparc.c: Likewise.
2045         * elf64-x86-64.c: Likewise.
2046         * elfxx-ia64.c: Likewise.
2048 2001-09-18  Bruno Haible  <haible@clisp.cons.org>
2050         * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
2051         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2052         * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
2053         (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
2054         * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
2055         (bfd_default_scan): Use ISDIGIT instead of isdigit.
2056         * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
2057         (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
2058         isxdigit/isdigit/islower.
2059         * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
2060         (mangle_name): Use ISALNUM instead of isalnum.
2061         * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
2062         (scan): Use ISDIGIT instead of isdigit.
2063         * hosts/alphavms.h: Don't include <ctype.h>.
2064         * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
2065         (ieee_object_p): Use TOUPPER instead of toupper.
2066         * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
2067         (ihex_bad_byte): Use ISPRINT instead of isprint.
2068         * merge.c: Don't include <ctype.h>.
2069         * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
2070         (oasys_write_sections): Use ISDIGIT instead of isdigit.
2071         * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
2072         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2073         * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
2074         (mangle_name): Use ISALNUM instead of isalnum.
2075         * som.c: Include "safe-ctype.h" instead of <ctype.h>.
2076         (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
2077         isupper/islower/isdigit.
2078         (som_decode_symclass): Use TOUPPER instead of toupper.
2079         * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
2080         (srec_bad_byte): Use ISPRINT instead of isprint.
2081         (srec_scan): Use ISSPACE instead of isspace.
2082         * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
2083         (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
2084         * syms.c: Include "safe-ctype.h"
2085         (islower, toupper): Remove macro definitions.
2086         (bfd_decode_symclass): Use TOUPPER instead of toupper.
2087         * vms-gsd.c: Don't include <ctype.h>.
2088         * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
2089         (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
2090         islower/toupper.
2091         * vms-tir.c: Don't include <ctype.h>.
2093 2001-09-18  Alan Modra  <amodra@bigpond.net.au>
2095         * libbfd.c (bfd_bread): New function replacing bfd_read without
2096         redundant params.  Allow reads up to (size_t) -2 in length.
2097         (bfd_bwrite): Similarly for bfd_write.
2098         (real_read): Return a size_t.
2099         (bfd_read): Call bfd_bread.
2100         (bfd_write): Call bfd_bwrite.
2101         (warn_deprecated): New function to annoy everybody.
2102         (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
2103         * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
2104         (bfd_read, bfd_write): Define as macro.
2105         * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
2106         likewise for bfd_write.  Ensure function args are correct size by
2107         using casts or local vars.  In some cases, remove unnecessary
2108         casts.  Formatting fixes, in some cases removing a large expression
2109         from function args by using a local var.  Replace CONST with const.
2110         Modify variable types to avoid warings.  Use casts to avoid
2111         warnings when using negative numbers in unsigned expressions.
2112         * aout-adobe.c: Likewise.
2113         * aout-arm.c: Likewise.
2114         * aout-cris.c: Likewise.
2115         * aout-encap.c: Likewise.
2116         * aout-ns32k.c: Likewise.
2117         * aout-target.h: Likewise.
2118         * aout-tic30.c: Likewise.
2119         * aoutf1.h: Likewise.
2120         * aoutx.h: Likewise.
2121         * archive.c: Likewise.
2122         * archures.c: Likewise.
2123         * bfd-in.h: Likewise.
2124         * bfd.c: Likewise.
2125         * binary.c: Likewise.
2126         * bout.c: Likewise.
2127         * cache.c: Likewise.
2128         * cisco-core.c: Likewise.
2129         * coff-a29k.c: Likewise.
2130         * coff-alpha.c: Likewise.
2131         * coff-arm.c: Likewise.
2132         * coff-h8300.c: Likewise.
2133         * coff-h8500.c: Likewise.
2134         * coff-i386.c: Likewise.
2135         * coff-i860.c: Likewise.
2136         * coff-i960.c: Likewise.
2137         * coff-ia64.c: Likewise.
2138         * coff-m68k.c: Likewise.
2139         * coff-m88k.c: Likewise.
2140         * coff-mcore.c: Likewise.
2141         * coff-mips.c: Likewise.
2142         * coff-ppc.c: Likewise.
2143         * coff-rs6000.c: Likewise.
2144         * coff-sh.c: Likewise.
2145         * coff-sparc.c: Likewise.
2146         * coff-stgo32.c: Likewise.
2147         * coff-tic30.c: Likewise.
2148         * coff-tic54x.c: Likewise.
2149         * coff-tic80.c: Likewise.
2150         * coff-w65.c: Likewise.
2151         * coff-z8k.c: Likewise.
2152         * coff64-rs6000.c: Likewise.
2153         * coffcode.h: Likewise.
2154         * coffgen.c: Likewise.
2155         * cofflink.c: Likewise.
2156         * coffswap.h: Likewise.
2157         * corefile.c: Likewise.
2158         * cpu-arc.c: Likewise.
2159         * cpu-h8300.c: Likewise.
2160         * cpu-h8500.c: Likewise.
2161         * cpu-i960.c: Likewise.
2162         * cpu-ia64-opc.c: Likewise.
2163         * cpu-ns32k.c: Likewise.
2164         * cpu-pdp11.c: Likewise.
2165         * cpu-pj.c: Likewise.
2166         * cpu-sh.c: Likewise.
2167         * cpu-w65.c: Likewise.
2168         * cpu-z8k.c: Likewise.
2169         * dwarf1.c: Likewise.
2170         * dwarf2.c: Likewise.
2171         * ecoff.c: Likewise.
2172         * ecofflink.c: Likewise.
2173         * ecoffswap.h: Likewise.
2174         * elf-bfd.h: Likewise.
2175         * elf-hppa.h: Likewise.
2176         * elf-m10200.c: Likewise.
2177         * elf-m10300.c: Likewise.
2178         * elf.c: Likewise.
2179         * elf32-arc.c: Likewise.
2180         * elf32-arm.h: Likewise.
2181         * elf32-avr.c: Likewise.
2182         * elf32-cris.c: Likewise.
2183         * elf32-fr30.c: Likewise.
2184         * elf32-gen.c: Likewise.
2185         * elf32-h8300.c: Likewise.
2186         * elf32-hppa.c: Likewise.
2187         * elf32-i370.c: Likewise.
2188         * elf32-i386.c: Likewise.
2189         * elf32-i860.c: Likewise.
2190         * elf32-m32r.c: Likewise.
2191         * elf32-m68k.c: Likewise.
2192         * elf32-mcore.c: Likewise.
2193         * elf32-mips.c: Likewise.
2194         * elf32-openrisc.c: Likewise.
2195         * elf32-pj.c: Likewise.
2196         * elf32-ppc.c: Likewise.
2197         * elf32-s390.c: Likewise.
2198         * elf32-sh-lin.c: Likewise.
2199         * elf32-sh.c: Likewise.
2200         * elf32-sparc.c: Likewise.
2201         * elf32-v850.c: Likewise.
2202         * elf64-alpha.c: Likewise.
2203         * elf64-hppa.c: Likewise.
2204         * elf64-mips.c: Likewise.
2205         * elf64-ppc.c: Likewise.
2206         * elf64-s390.c: Likewise.
2207         * elf64-sparc.c: Likewise.
2208         * elf64-x86-64.c: Likewise.
2209         * elfarm-nabi.c: Likewise.
2210         * elfcode.h: Likewise.
2211         * elfcore.h: Likewise.
2212         * elflink.c: Likewise.
2213         * elflink.h: Likewise.
2214         * elfxx-ia64.c: Likewise.
2215         * elfxx-target.h: Likewise.
2216         * format.c: Likewise.
2217         * hash.c: Likewise.
2218         * hp300hpux.c: Likewise.
2219         * hppabsd-core.c: Likewise.
2220         * hpux-core.c: Likewise.
2221         * i386aout.c: Likewise.
2222         * i386dynix.c: Likewise.
2223         * i386linux.c: Likewise.
2224         * i386lynx.c: Likewise.
2225         * i386mach3.c: Likewise.
2226         * i386msdos.c: Likewise.
2227         * i386os9k.c: Likewise.
2228         * ieee.c: Likewise.
2229         * ihex.c: Likewise.
2230         * irix-core.c: Likewise.
2231         * libaout.h: Likewise.
2232         * libbfd-in.h: Likewise.
2233         * libbfd.c: Likewise.
2234         * libcoff-in.h: Likewise.
2235         * libecoff.h: Likewise.
2236         * libieee.h: Likewise.
2237         * libnlm.h: Likewise.
2238         * libpei.h: Likewise.
2239         * libxcoff.h: Likewise.
2240         * linker.c: Likewise.
2241         * lynx-core.c: Likewise.
2242         * m68klinux.c: Likewise.
2243         * merge.c: Likewise.
2244         * mipsbsd.c: Likewise.
2245         * netbsd-core.c: Likewise.
2246         * nlm.c: Likewise.
2247         * nlm32-alpha.c: Likewise.
2248         * nlm32-i386.c: Likewise.
2249         * nlm32-ppc.c: Likewise.
2250         * nlm32-sparc.c: Likewise.
2251         * nlmcode.h: Likewise.
2252         * nlmswap.h: Likewise.
2253         * ns32k.h: Likewise.
2254         * oasys.c: Likewise.
2255         * opncls.c: Likewise.
2256         * osf-core.c: Likewise.
2257         * pc532-mach.c: Likewise.
2258         * pdp11.c: Likewise.
2259         * pe-mips.c: Likewise.
2260         * peXXigen.c: Likewise.
2261         * peicode.h: Likewise.
2262         * ppcboot.c: Likewise.
2263         * ptrace-core.c: Likewise.
2264         * reloc.c: Likewise.
2265         * reloc16.c: Likewise.
2266         * riscix.c: Likewise.
2267         * rs6000-core.c: Likewise.
2268         * sco5-core.c: Likewise.
2269         * section.c: Likewise.
2270         * som.c: Likewise.
2271         * sparclinux.c: Likewise.
2272         * sparclynx.c: Likewise.
2273         * srec.c: Likewise.
2274         * stabs.c: Likewise.
2275         * sunos.c: Likewise.
2276         * syms.c: Likewise.
2277         * targets.c: Likewise.
2278         * tekhex.c: Likewise.
2279         * trad-core.c: Likewise.
2280         * versados.c: Likewise.
2281         * vms-gsd.c: Likewise.
2282         * vms-hdr.c: Likewise.
2283         * vms-misc.c: Likewise.
2284         * vms-tir.c: Likewise.
2285         * vms.c: Likewise.
2286         * vms.h: Likewise.
2287         * xcofflink.c: Likewise.
2288         * bfd-in2.h: Regenerate.
2289         * libbfd.h: Regenerate.
2290         * libcoff.h: Regenerate.
2292         * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2293         * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2294         (ufile_ptr): Define.
2295         (bfd_tell): Return a ufile_ptr.
2296         * libbfd.c (bfd_tell): Likewise.
2297         (bfd_seek): Use bfd_size_type locals.  Don't call bfd_set_error
2298         unnecessarily.
2299         * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2300         * aoutf1.h: Likewise.
2301         * som.c: Likewise.
2302         * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2303         larger than unsigned long can represent.
2305         * libbfd.c (bfd_malloc): Take a bfd_size_type arg.  Error if
2306         size overflows size_t.
2307         (bfd_realloc): Likewise.
2308         (bfd_zmalloc): Likewise.
2309         * opncls.c (bfd_alloc): Likewise.
2310         (bfd_zalloc): Likewise.
2311         * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2312         (bfd_alloc, bfd_zalloc): Update.
2314         * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2315         8 bits.
2316         (bfd_get_signed_8): Likewise.
2317         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2318         H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2319         H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2320         H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2321         * libaout.h: Likewise define and use here.
2322         * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2323         * aout-arm.c: Likewise.
2324         * aout-encap.c: Likewise.
2325         * aout-ns32k.c: Likewise.
2326         * aout-tic30.c: Likewise.
2327         * aoutf1.h: Likewise.
2328         * aoutx.h: Likewise.
2329         * bout.c: Likewise.
2330         * coff-alpha.c: Likewise.
2331         * coff-h8300.c: Likewise.
2332         * coff-h8500.c: Likewise.
2333         * coff-i960.c: Likewise.
2334         * coff-ia64.c: Likewise.
2335         * coff-m88k.c: Likewise.
2336         * coff-mips.c: Likewise.
2337         * coff-ppc.c: Likewise.
2338         * coff-rs6000.c: Likewise.
2339         * coff-sh.c: Likewise.
2340         * coff-sparc.c: Likewise.
2341         * coff-stgo32.c: Likewise.
2342         * coff-tic30.c: Likewise.
2343         * coff-tic80.c: Likewise.
2344         * coff-w65.c: Likewise.
2345         * coff-z8k.c: Likewise.
2346         * coff64-rs6000.c: Likewise.
2347         * coffgen.c: Likewise.
2348         * cofflink.c: Likewise.
2349         * coffswap.h: Likewise.
2350         * ecoff.c: Likewise.
2351         * ecoffswap.h: Likewise.
2352         * elf.c: Likewise.
2353         * elf32-mips.c: Likewise.
2354         * elf64-mips.c: Likewise.
2355         * hp300hpux.c: Likewise.
2356         * i386dynix.c: Likewise.
2357         * i386lynx.c: Likewise.
2358         * i386msdos.c: Likewise.
2359         * i386os9k.c: Likewise.
2360         * libpei.h: Likewise.
2361         * nlm32-alpha.c: Likewise.
2362         * nlm32-i386.c: Likewise.
2363         * nlm32-ppc.c: Likewise.
2364         * nlmcode.h: Likewise.
2365         * nlmswap.h: Likewise.
2366         * oasys.c: Likewise.
2367         * pdp11.c: Likewise.
2368         * pe-mips.c: Likewise.
2369         * peXXigen.c: Likewise.
2370         * peicode.h: Likewise.
2371         * riscix.c: Likewise.
2372         * sunos.c: Likewise.
2373         * xcofflink.c: Likewise.
2374         * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2375         Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2376         * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2377         equivalent H_PUT_* macro instead.
2378         (GETWORD, GETHALF, GETBYTE): Similarly.
2379         * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2380         (GETWORD, GETHALF, GETBYTE): Likewise.
2381         * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2383         * bfd-in.h (struct orl): Change "pos" to a union.
2384         * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2385         (bsd_write_armap): Here too.
2386         (coff_write_armap): And here.
2387         * coff-rs6000.c (xcoff_write_armap_old): And here.
2388         (xcoff_write_one_armap_big): And here.
2389         (xcoff_write_armap_big): And here.
2390         * ecoff.c (_bfd_ecoff_write_armap): And here.
2391         * elf64-mips.c (mips_elf64_write_armap): And here.
2393         * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2394         * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2395         * elf32-h8300.c (elf32_h8_mach): Likewise.
2396         * elf32-mips.c (elf_mips_mach): Likewise.
2397         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2399         * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2400         calls.
2401         (aix386_core_vec): Typo fix.
2403         * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2404         etc. to avoid redefined macro warning.
2405         (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2406         (MY(fix_pcrel_26)): Likewise.
2407         * aout-ns32k.c (MY(put_reloc)): Likewise.
2408         * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2409         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2410         * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2412         * aout-encap.c: Include "file", not <file> for binutils headers.
2413         (encap_object_p): Half baked attempt to fix compile errors in
2414         code dealing with "magic".
2416         * aout-ns32k.c: Include "file", not <file> for binutils headers.
2417         (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2418         bfd_vma's rather than longs.
2419         * cpu-ns32k.c (ns32k_sign_extend): Delete.
2420         (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2421         (_bfd_ns32k_get_immediate): Likewise.  Add code for 8 byte values,
2422         remove case 3.
2423         (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2424         Use unsigned comparisons.
2425         (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2426         (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2427         (_bfd_do_ns32k_reloc_contents): Likewise.
2428         * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2429         (_bfd_ns32k_get_immediate): Likewise.
2430         (_bfd_ns32k_put_displacement): Likewise.
2431         (_bfd_ns32k_put_immediate): Likewise.
2432         (bfd_reloc_status_type): Likewise.
2434         * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2435         to avoid shadowing.
2436         * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2437         * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2438         * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2439         avoid shadowing.
2440         (record_toc): Use a bfd_signed_vma for our_toc_offset.
2441         * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2442         * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2443         shadow warning.
2444         (_bfd_elfcore_strndup): Likewise for "dup".
2445         * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2446         "name" to avoid shadowing.
2447         * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2448         definition of "off".
2449         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2450         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2451         definition of "s".
2452         (_bfd_mips_elf_final_link): Rename "i" to "j".  Remove duplicate
2453         "secpp".
2454         * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2455         to avoid shadowing.
2456         * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2457         to avoid shadowing.
2458         (elf_link_input_bfd): Likewise.
2459         (elf_bfd_final_link): Remove duplicate innermost "off" var.
2460         * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2461         * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2462         "input_section".
2463         * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2464         * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2465         (sunos_write_dynamic_symbol): Remove unused vars.
2466         * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2467         innermost "directory_name" and "file_name" vars.
2468         * tekhex.c (first_phase): Rename local var "type" to "stype".
2469         (tekhex_write_object_contents): Rename innermost "s" to "sym".
2470         * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2471         doing comparison at caller.
2472         (vms_esecflag_by_name): Likewise.
2473         * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2474         * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2475         (xcoff_write_global_symbol): Rename "p" param to "inf".
2477         * cisco-core.c: Add missing prototypes.
2478         (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2479         (cisco_core_file_failing_signal): Likewise.
2480         (cisco_core_file_matches_executable_p): Likewise.
2481         * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2482         * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2483         * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2484         * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2486         * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2487         thumb_glue_size and arm_glue_size.
2488         * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2490         * coff64-rs6000.c: Group prototypes together.
2492         * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2493         (buy_and_read): Remove "seek" param.  Change "size" to bfd_size_type.
2495         * cpu-arc.c: Add missing prototypes.
2496         * cpu-h8500.c: Likewise.
2497         * cpu-i960.c: Likewise.
2498         * cpu-pj.c: Likewise.
2499         * cpu-sh.c: Likewise.
2500         * cpu-w65.c: Likewise.
2501         * cpu-z8k.c: Likewise.
2502         * elf32-fr30.c: Likewise.
2503         * elf32-h8300.c: Likewise.
2504         * elf32-i370.c: Likewise.
2505         * hpux-core.c: Likewise.
2506         * versados.c: Likewise.
2508         * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2509         * cpu-h8500.c: Likewise.
2510         * cpu-i960.c: Likewise.
2511         * cpu-z8k.c: Likewise.
2513         * cpu-ia64-opc.c: Correct comment.
2515         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2517         * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2518         to unsigned.
2519         (bfd_elf32_write_out_phdrs): Likewise.
2520         (bfd_elf64_write_out_phdrs): Likewise.
2521         (elf_linker_section_pointers): Change addend to bfd_vma.
2522         (_bfd_elf_find_pointer_linker_section): Likewise.
2523         (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2524         filepos to unsigned file_ptr.
2525         (_bfd_elfcore_strndup): Change max param to size_t.
2526         * elf.c (_bfd_elfcore_make_pseudosection): As above.
2527         (_bfd_elfcore_strndup): Likewise.
2528         (_bfd_elf_find_pointer_linker_section): Likewise.
2530         * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2531         insn and sym_value to ints.
2533         * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2534         bfd_size_type.
2535         (elfcore_read_notes): Likewise.
2537         * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2538         param from unsigned char to int.
2539         (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2540         for info_to_howto call.
2541         (add_dynamic_entry): Define macro.
2542         (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2544         * elf32-cris.c (add_dynamic_entry): Define macro.
2545         (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2547         * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2548         (elf32_h8_object_p): Likewise.
2549         (elf32_h8_merge_private_bfd_data): Likewise.
2550         (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2552         * elf32-hppa.c (add_dynamic_entry): Define macro.
2553         (elf32_hppa_size_dynamic_sections): Use it.
2554         * elf32-i370.c (add_dynamic_entry): Define macro.
2555         (i370_elf_size_dynamic_sections): Use it.
2556         (i370_noop): Make static.
2557         * elf32-i386.c (add_dynamic_entry): Define macro.
2558         (elf_i386_size_dynamic_sections): Use it.
2559         * elf32-m68k.c (add_dynamic_entry): Define macro.
2560         (elf_m68k_size_dynamic_sections): Use it.
2561         * elf32-ppc.c (add_dynamic_entry): Define macro.
2562         (ppc_elf_size_dynamic_sections): Use it.
2563         * elf32-s390.c (add_dynamic_entry): Define macro.
2564         (elf_s390_size_dynamic_sections): Use it.
2565         * elf64-alpha.c (add_dynamic_entry): Define macro.
2566         (elf64_alpha_size_dynamic_sections): Use it.
2567         * elf64-hppa.c (add_dynamic_entry): Define macro.
2568         (elf64_hppa_size_dynamic_sections): Use it.
2569         * elf64-ppc.c (add_dynamic_entry): Define macro.
2570         (ppc64_elf_size_dynamic_sections): Use it.
2571         * elf64-s390.c (add_dynamic_entry): Define macro.
2572         (elf_s390_size_dynamic_sections): Use it.
2573         * elf64-sparc.c (add_dynamic_entry): Define macro.
2574         (sparc64_elf_size_dynamic_sections): Use it.
2575         * elf64-x86-64.c (add_dynamic_entry): Define macro.
2576         (elf64_x86_64_size_dynamic_sections): Use it.
2577         * elfxx-ia64.c (add_dynamic_entry): Define macro.
2578         (elfNN_ia64_size_dynamic_sections): Use it.
2580         * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2581         (v850_elf_perform_relocation): Make "r_type" param unsigned.
2583         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2584         false if the first malloc fails rather than going via error_return.
2586         * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2587         "index" param.
2588         (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2590         * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2592         * elfxx-ia64.c (global_sym_index): Return a long.
2594         * ieee.c (get_symbol): Use int rather than char param.
2595         (ieee_slurp_sections): Move "section" var to inner blocks.
2596         (copy_expression): Don't init "value" to zero or worry about
2597         clearing to zero after using.
2598         (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2599         shadowing.
2601         * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2602         unsigned int.
2604         * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2605         (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2607         * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2609         * pc532-mach.c (MYNSX): Delete.
2610         (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2611         (write_object_contents): Correct prototype.
2613         * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2614         than unsigned short.
2616         * section.c (bfd_set_section_contents): Remove redundant
2617         "offset < 0" test.  Check that "count" doesn't overflow size_t.
2618         (bfd_get_section_contents): Likewise.
2620         * som.c (som_fixup_formats): Add missing braces.
2621         (som_reloc_addend): Pass a bfd_vma for "addend".
2623         * srec.c (srec_write_record): Pass "type" as an unsigned int.
2624         (srec_write_symbols): Remove an unnecessary var.
2626         * targets.c (_bfd_target_vector): Sort entries.  Sort externs
2627         to match.
2628         * configure.in: Sort to match.  Bump version number.
2629         * configure: Regenerate.
2631         * tekhex.c (move_section_contents): Assert offset == 0.
2633         * versados.c (new_symbol_string): Constify arg.
2634         (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2635         (versados_get_symbol_info): Make static.
2636         (versados_print_symbol): Likewise.
2637         (versados_get_reloc_upper_bound): Likewise.
2638         (versados_canonicalize_reloc): Likewise.
2640 2001-09-18  Nick Clifton  <nickc@cambridge.redhat.com>
2642         * elflink.h (elf_link_input_bfd): Fix typo in error message.
2644 2001-09-17  H.J. Lu  <hjl@gnu.org>
2646         * dwarf1.c (parse_die): Take a new arg for the end of the
2647         section. Return false if die is beyond the section.
2648         (parse_functions_in_unit): Pass the end of the section to
2649         parse_die ().
2650         (_bfd_dwarf1_find_nearest_line): Likewise.
2652 2001-09-14  Michael Rauch <mrauch@netbsd.org>
2654         * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2655         just like R_SPARC_32.
2657 2001-09-14  Kevin Lo <kevlo@openbsd.org>
2659         * configure.bfd: Add arm-openbsd target.
2661 2001-09-14  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2663         * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2664         Add support for mips64.
2666 2001-09-13  Alexandre Oliva  <aoliva@redhat.com>
2668         * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2670 2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
2672         * elf.c (prep_headers): Get the machine code from the elf
2673         backend data.
2674         * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2675         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2676         * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2677         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2678         * elf-arc.c (arc_elf_final_write_processing): Don't override
2679         e_machine, it's now properly set in prep_headers.
2680         * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2681         EM_AVR_OLD.
2682         (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2683         * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2684         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2685         * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2686         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2687         * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2688         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2689         * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2690         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2691         * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2692         * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2693         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2695 2001-09-11  Richard Henderson  <rth@redhat.com>
2697         * elf64-alpha.c (elf64_alpha_section_flags): New.
2698         (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2700 2001-09-11  Richard Henderson  <rth@redhat.com>
2702         * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2703         apply HINT relocations against dynamic symbols.
2705 2001-09-11  H.J. Lu  <hjl@gnu.org>
2707         * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2709 2001-09-09  Richard Henderson  <rth@redhat.com>
2711         * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2713         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2714         following a call to a near function.
2716 2001-09-08  Richard Henderson  <rth@redhat.com>
2718         * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2719         relocation errors.  Fail gp-relative relocations against
2720         dynamic symbols.
2722 2001-09-08  Alan Modra  <amodra@bigpond.net.au>
2724         * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2725         as well as DEF_DYNAMIC in test for avoided copy relocs.
2726         (allocate_plt_and_got_and_discard_relocs): Likewise.
2727         * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2728         (allocate_plt_and_got_and_discard_relocs): Likewise.
2730 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2732         * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2733         of R_MIPS_PC16.
2735 2001-09-06  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2737         * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2738         definitions.
2739         (mips_elf64_howto_table_rel): Likewise.
2741 2001-09-05  Tom Rix <trix@redhat.com>
2743         * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2744         and syscall symbols.
2745         (write_global_symbol) : Same.
2746         (bfd_xcoff_export_symbol): Remove unused syscall param.
2747         * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2748         bfd_xcoff_import_symbol.
2749         * bfd-in.h: Same.
2750         * bfd-in2.h : Regenerate.
2752 2001-09-04  Richard Henderson  <rth@redhat.com>
2754         * elf64-alpha.c (SKIP_HOWTO): New.
2755         (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2756         Fix sizes of 16-bit mem format relocs.
2757         (elf64_alpha_reloc_map): Update to match.
2758         (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2759         (elf64_alpha_relax_without_lituse): Likewise.
2760         (elf64_alpha_check_relocs): Handle GPREL16.
2761         (elf64_alpha_relocate_section): Likewise.
2762         * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2763         (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2764         * bfd-in2.h, libbfd.h: Rebuild.
2766 2001-09-04  Jeff Law <law@redhat.com>
2768         * elf32-h8300.c (elf32_h8_relax_section): New function.
2769         (elf32_h8_relax_delete_bytes): Likewise.
2770         (elf32_h8_symbol_address_p): Likewise.
2771         (elf32_h8_get_relocated_section_contents): Likewise.
2772         (bfd_elf32_bfd_relax_section): Define.
2773         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2775         * elf32-h8300.c (special): New function.
2776         (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2777         all relocations.
2778         (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2779         relocations.  Fix problems with the true 24bit reloc R_H8_DIR24R8.
2780         Fix minor problems with 8bit and 16bit PC relative relocations.
2782 2001-09-01  Andreas Jaeger  <aj@suse.de>
2784         * vms-tir.c: Add missing prototypes.
2785         * vms-hdr.c: Likewise.
2786         * vms-gsd.c: Likewise.
2787         * vms-misc.c: Likewise.
2789 2001-08-31  H.J. Lu  <hjl@gnu.org>
2791         * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2792         with bad relocation.
2794 2001-08-31  Eric Christopher  <echristo@redhat.com>
2795             Jason Eckhardt  <jle@redhat.com>
2797         * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2798         mips32_4k and mips64.
2799         * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2800         bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2801         * bfd/cpu-mips.c: Ditto.
2802         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2803         * bfd/bfd-in2.h: Regenerate.
2805 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
2807         * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2808         value into R_ALPHA_RELATIVE's addend.
2809         (elf64_alpha_finish_dynamic_symbol): Likewise.
2811 2001-08-31  Nick Clifton  <nickc@cambridge.redhat.com>
2813         * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2814         recomputed addend during relocatable link if not USE_REL.
2816         * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2817         error.
2819 2001-08-30  H.J. Lu  <hjl@gnu.org>
2821         * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2822         2 changes.
2823         (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2824         relocations for weak definitions.
2826 2001-08-30  H.J. Lu  <hjl@gnu.org>
2828         * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2829         (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2830         * Makefile.in: Rebuild.
2832 2001-08-30  H.J. Lu  <hjl@gnu.org>
2834         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2835         dynamic relocation for undefined weak symbols when creating
2836         executables. Check h->root.root.type, instead of h->root.type.
2838 2001-08-29  Joel Sherrill <joel@OARcorp.com>
2840         * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2841         default from coff to elf.
2843 2001-08-29  Jeff Law <law@redhat.com>
2845         * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2846         relocations.
2847         (h8_reloc_map): Similarly.
2848         (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2849         Add support for PC relative relocations.
2851         * elf32-h8300.c: Put all prototypes together.
2852         (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2853         (elf32_h8_final_link_relocate): New function for linker.
2854         (elf32_h8_relocate_section): Similarly.
2855         (elf_backend_relocate_section): Define.
2857         * cpu-h8300.c (h8300_scan, compatible): Prototype.
2858         (h8300_scan): Handle architecture:machine encodings typically
2859         found in linker scripts.
2860         * elf.c (prep_headers): Do not try to do H8 machine recognition
2861         here.
2862         * elf32-h8300.c:  Add some missing prototypes.
2863         (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2864         (elf32_h8_object_p): Similarly.
2866 2001-08-29  Tom Rix <trix@redhat.com>
2868         * xcofflink.c (xcoff_link_add_symbols):  Fix XTY_LD symbol that
2869         does not follow a XTY_SD.
2871 2001-08-29  Alan Modra  <amodra@bigpond.net.au>
2873         * targmatch.sed: Delete case statements.
2874         * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2875         aix4.3 and above.
2877 2001-08-29  J"orn Rennecke <amylaar@redhat.com>
2879         * Makefile.am (elf32-h8300.lo): New target.
2880         * config.bfd (h8300*-*-elf): New case.
2881         * configure.in (bfd_elf32_h8300_vec): New case.
2882         * elf.c (prep_headers): Add case for bfd_arch_h8300.
2883         * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2884         (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2885         (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2886         * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2887         * elf32-h8300.c: New file.
2888         * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2890 2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>
2892         * sparclynx.c: Add missing prototypes.
2893         * coff-mcore.c: Add missing prototypes.
2894         * elf32-pj.c: Add missing prototypes.
2895         * nlm32-sparc.c: Add missing prototypes.
2896         * oasys.c: Add missing prototypes.
2897         * pdp11.c: Add missing prototypes.
2898         * pe-mips.c: Add missing prototypes.
2899         * riscix.c: Add missing prototypes.
2901 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2903         * elf32-i386.c: Add missing prototypes.
2904         * elf32-ppc.c: Likewise.
2905         * elf32-sh-lin.c: Likewise.
2906         * elfarm-nabi.c: Likewise.
2908 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2910         * elf32-i386.c (elf_i386_grok_prstatus): New function.
2911         (elf_i386_grok_psinfo): New function.
2912         (elf_backend_grok_prstatus): Define.
2913         (elf_backend_grok_psinfo): Likewise.
2914         * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2915         (ppc_elf_grok_psinfo): New function.
2916         (elf_backend_grok_prstatus): Define.
2917         (elf_backend_grok_psinfo): Likewise.
2918         * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2919         (elf32_shlin_grok_psinfo): New function.
2920         (elf_backend_grok_prstatus): Define.
2921         (elf_backend_grok_psinfo): Likewise.
2922         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2923         (elf32_arm_nabi_grok_psinfo): New function.
2924         (elf_backend_grok_prstatus): Define.
2925         (elf_backend_grok_psinfo): Likewise.
2927 2001-08-27  H.J. Lu  <hjl@gnu.org>
2929         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2930         sanity check.
2931         (mips_elf_calculate_relocation): Create dynamic relocation for
2932         symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2933         bit is not set.
2935 2001-08-27  H.J. Lu  <hjl@gnu.org>
2937         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2938         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2939         (_bfd_elf32_mips_grok_prstatus): Likewise.
2940         (_bfd_elf32_mips_grok_psinfo): Likewise.
2941         (_bfd_mips_elf_hide_symbol): Make it static and cast to
2942         `struct mips_elf_link_hash_entry *'.
2943         (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2945 2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>
2947         * mipsbsd.c: Add missing prototypes.
2948         * hp300hpux.c: Add missing prototypes.
2949         * i386aout.c: Add missing prototypes.
2950         * i386lynx.c: Add missing prototypes.
2951         * i386mach3.c: Add missing prototypes.
2952         * i386msdos.c: Add missing prototypes.
2953         * i386os9k.c: Add missing prototypes.
2955 2001-08-27  Linus Nordberg  <linus@swox.se>
2956             Torbjorn Granlund  <tege@swox.com>
2957             Staffan Ulfberg  <staffanu@swox.se>
2958             Alan Modra  <amodra@bigpond.net.au>
2960         * config.bfd: Add powerpc64 target.  Add powerpc64 vectors to
2961         targ64_selvecs for 32 bit powerpc targets.
2962         * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2963         (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2964         Run "make dep-am".
2965         * Makefile.in: Regenerate.
2966         * configure.in: Add elf64_powerpc vecs.
2967         * configure: Regenerate.
2968         * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2969         * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2970         * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2971         * elf64-ppc.c: New file.
2972         * reloc.c: Add powerpc64 relocs.
2973         * libbfd.h: Regenerate.
2974         * bfd-in2.h: Regenerate.
2976 2001-08-27  Andreas Schwab  <schwab@suse.de>
2978         * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2979         reloc is against read-only section.
2980         (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2981         looking up section names for DT_TEXTREL.
2982         (elf32_m68k_reloc_type_class): New function.
2983         (elf_backend_reloc_type_class): Define.
2985 2001-08-27  Andreas Jaeger  <aj@suse.de>
2987         * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2988         reloc is against read-only section.
2989         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2990         looking up section names for DT_TEXTREL.
2991         (elf_s390_reloc_type_class): New.
2992         (elf_backend_reloc_type_class): Define.
2994         * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2995         reloc is against read-only section.
2996         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2997         looking up section names for DT_TEXTREL.
2998         (elf_s390_reloc_type_class): New.
2999         (elf_backend_reloc_type_class): Define.
3001         * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
3002         is against read-only section.
3003         (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3004         looking up section names for DT_TEXTREL.
3005         (ppc_elf_reloc_type_class): New.
3006         (elf_backend_reloc_type_class): Define.
3008 2001-08-26  Andreas Jaeger  <aj@suse.de>
3010         * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
3011         reloc is against read-only section.
3012         (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
3013         looking up section names for DT_TEXTREL.
3014         (elf_cris_reloc_type_class): New.
3015         (elf_backend_reloc_type_class): Define.
3017         * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
3018         against read-only section.
3019         (elf_backend_reloc_type_class): Define.
3020         (sh_elf_reloc_type_class): New.
3021         (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3022         looking up section names for DT_TEXTREL.
3024         * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
3025         reloc is against read-only section.
3026         (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
3027         looking up section names for DT_TEXTREL.
3028         (elf32_arm_reloc_type_class): New.
3029         (elf_backend_reloc_type_class): Define.
3031 2001-08-25  Andreas Jaeger  <aj@suse.de>
3033         * oasys.c: Add missing prototypes.
3035         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
3036         attribute for parameter.
3037         * elf.c (_bfd_elf_reloc_type_class): Likewise.
3039         * versados.c (get_4): Make static.
3040         (get_10): Make static.
3041         Add missing prototypes.
3042         (process_esd): Fix call to versados_new_symbol.
3044 2001-08-25  Nick Clifton  <nickc@cambridge.redhat.com>
3046         * coff-a29k.c: Add missing prototypes.
3047         * coff-apollo.c: Add missing prototypes.
3048         * coff-arm.c: Add missing prototypes.
3049         * coff-i860.c: Add missing prototypes.
3050         * coff-rs6000.c: Add missing prototypes.
3051         * coff-tic80.c: Add missing prototypes.
3052         * elf-m10200.c: Add missing prototypes.
3053         * elf-m10300.c: Add missing prototypes.
3054         * elf32-arm.h: Add missing prototypes.
3055         * elf32-d10v.c: Add missing prototypes.
3056         * elf32-m32r.c: Add missing prototypes.
3057         * elf32-mcore.c: Add missing prototypes.
3058         * elf32-openrisc.c: Add missing prototypes.
3059         * elf32-sh.c: Add missing prototypes.
3060         * elf32-sparc.c: Add missing prototypes.
3061         * elf32-v850.c: Add missing prototypes.
3062         * elfarm-nabi.c: Add missing prototypes.
3063         * elfarm-oabi.c: Add missing prototypes.
3065 2001-08-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3067         * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
3068         E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
3070 2001-08-24  H.J. Lu  <hjl@gnu.org>
3072         * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
3073         hash structure.
3075 2001-08-24  Nick Clifton  <nickc@cambridge.redhat.com>
3077         * elf-bfd.h (elf_hash_table): Revert definition.
3078         (is_elf_hash_table): New macro.
3079         * elflink.h (elf_link_add_object_symbols): Test
3080         is_elf_hash_table before accessing ELF only fields in hash
3081         structure.
3082         (elf_link_create_dynamic_sections): Fail if not using an ELF
3083         hash structure.
3084         (elf_add_dynamic_entry): Fail if not using an ELF hash
3085         structure.
3086         (elf_link_record_local_dynamic_symbol): Fail if not using an
3087         ELF hash structure.
3088         (size_dynamic_sections): Fail if not using an ELF hash
3089         structure.
3090         (elf_adjust_dynamic_symbol): Fail if not using an ELF
3091         hash structure.
3092         (elf_bfd_final_link): Fail if not using an ELF hash
3093         structure.
3095 2001-08-24  H.J. Lu  <hjl@gnu.org>
3097         * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
3098         table is not an ELF linker hash table.
3100         * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
3101         table type to bfd_link_elf_hash_table.
3103         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
3104         the last change.
3106         * linker.c (_bfd_link_hash_table_init): Set the linker hash
3107         table type to bfd_link_generic_hash_table.
3109 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
3111         * bfd.c (bfd_alt_mach_code): New function.
3112         * bfd-in2.h: Rebuilt.
3114 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
3116         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
3117         `type' field in the hash entry when deciding whether to follow a
3118         link.
3120 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
3122         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
3123         last.
3124         (elf_link_sort_relocs): Adjust accordingly.
3126         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
3127         (elf64_alpha_check_relocs): Set it if section this reloc is against
3128         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
3129         read-only section.
3130         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
3131         is is against read-only section.
3132         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
3133         check section names.
3134         (elf64_alpha_reloc_type_class): New.
3135         (elf_backend_reloc_type_class): Define.
3137 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3139         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
3140         by bfd_malloc().
3142 2001-08-23  Andreas Jaeger  <aj@suse.de>
3144         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3145         the reloc is against read-only section.
3146         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3147         of looking up section names for DT_TEXTREL.
3148         (elf64_x86_64_reloc_type_class): New.
3149         (elf_backend_reloc_type_class): Define.
3151 2001-08-23  H.J. Lu  <hjl@gnu.org>
3153         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3154         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3156         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3157         bfd_print_symbol_vandf.
3158         * coffgen.c (coff_print_symbol): Likewise.
3159         * elf.c (bfd_elf_print_symbol): Likewise.
3160         * ieee.c (ieee_print_symbol): Likewise.
3161         * nlmcode.h (nlm_print_symbol): Likewise.
3162         * oasys.c (oasys_print_symbol): Likewise.
3163         * pdp11.c (NAME(aout,print_symbol)): Likewise.
3164         * som.c (som_print_symbol): Likewise.
3165         * srec.c (srec_print_symbol): Likewise.
3166         * tekhex.c (tekhex_print_symbol): Likewise.
3167         * versados.c (versados_print_symbol): Likewise.
3168         * vms.c (vms_print_symbol): Likewise.
3170         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3171         with bfd_fprintf_vma.
3172         (bfd_elf_print_symbol): Likewise.
3173         * syms.c (bfd_print_symbol_vandf): Likewise.
3175 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
3177         * aoutf1.h (sunos_write_object_contents): Silence compile time
3178         warning.
3179         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3181         * bout.c: Add missing function prototypes.  Fix formatting.
3182         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
3183         * coff-w65.c: Add missing function prototypes.  Fix formatting.
3184         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
3185         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
3186         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
3187         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
3188         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
3189         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
3190         * coff-sh.c: Add missing function prototypes.  Fix formatting.
3192 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
3194         * elf-bfd.h (enum elf_reloc_type_class): New.
3195         (struct elf_backend_data): Add elf_backend_reloc_type_class.
3196         (_bfd_elf_reloc_type_class): New.
3197         * elfxx-target.h (elf_backend_reloc_type_class): Define.
3198         (elfNN_bed): Add elf_backend_reloc_type_class.
3199         * elf.c (_bfd_elf_reloc_type_class): New.
3200         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3201         is against read-only section.
3202         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3203         looking up section names for DT_TEXTREL.
3204         (elf_i386_reloc_type_class): New.
3205         (elf_backend_reloc_type_class): Define.
3206         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3207         reloc is against read-only section.
3208         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3209         looking up section names for DT_TEXTREL.
3210         (elf32_sparc_reloc_type_class): New.
3211         (elf_backend_reloc_type_class): Define.
3212         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3213         reloc is against read-only section.
3214         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3215         looking up section names for DT_TEXTREL.
3216         (sparc64_elf_reloc_type_class): New.
3217         (elf_backend_reloc_type_class): Define.
3218         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3219         (elfNN_ia64_hash_table_create): Clear ia64_info.
3220         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3221         section.
3222         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3223         instead of looking up section names for DT_TEXTREL.
3224         (elfNN_ia64_reloc_type_class): New.
3225         (elf_backend_reloc_type_class): Define.
3226         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3227         (struct elf_link_sort_rela): New.
3228         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3229         (elf_bfd_final_link): Call elf_link_sort_relocs.
3230         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3231         necessary.
3233 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
3235         * configure.in (x86-bsdi): No corefile support.
3236         * configure: Regenerate.
3238 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
3240         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3241         comma.
3243 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
3245         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
3246         the alignment of dwarf2 linkonce sections to 0.
3247         * coff-sto32.c: Likewise.
3249 2001-08-20  Andreas Jaeger  <aj@suse.de>
3251         * coff-sparc.c: Add missing prototypes.
3252         * elf32-s390.c: Likewise.
3253         * elf32-i960.c: Likewise.
3254         * aout-target.h: Likewise.
3256 2001-08-20  H.J. Lu  <hjl@gnu.org>
3258         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3259         (elf_num_section_syms): New for num_section_syms.
3261         * elf.c (elf_map_symbols): Set num_section_syms.
3262         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3263         the section symbol index.
3265 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
3267         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3268         select the generic has table creator.  All elf backends need elf
3269         specific fields in the hash table.
3271 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
3273         * archive.c (offsetof): Remove define.
3274         * elf.c: Likewise.
3275         * oasys.c: Likewise
3276         * sysdep.h (offsetof): Define.
3278 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3280         * bfd.c (bfd_get_gp_size): Return an unsigned int.
3281         (bfd_set_gp_size): Make param unsigned.
3282         * bfd-in2.h: Regenerate.
3283         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3284         than calling bfd_get_gp_size.
3285         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3286         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3288 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3290         * linker.c (default_fill_link_order): Handle four byte fill value.
3292 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3294         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3295         prototype.
3296         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3298         * elf64-mips.c (UNUSED_RELOC): Define.
3299         (mips_elf64_howto_table_rel): Use it.
3300         (mips_elf64_howto_table_rela): Here too.
3301         (mips_elf64_write_relocs): Fix signed/unsigned warning.
3303         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3304         silence warning.
3305         * coffgen.c (coff_print_symbol): Fix warnings.
3306         (coff_find_nearest_line): Likewise.
3307         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3308         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3309         * format.c (bfd_check_format_matches): Likewise.
3310         (bfd_set_format): Likewise.
3311         * coff-ia64.c: Add missing prototypes.
3312         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3313         signed to silence warnings.
3314         (elf64_alpha_relocate_section): Likewise.
3315         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3316         (elf64_alpha_add_symbol_hook): Likewise.
3317         (elf64_alpha_final_link): Likewise.
3318         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3319         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3320         (elf64_alpha_size_got_sections): Likewise.
3321         * elfxx-ia64.c: Add missing prototypes.
3322         (elfNN_ia64_relocate_section): Fix warning.
3323         (elfNN_ia64_unwind_entry_compare): Make params const.
3325 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3327         * config.bfd (targ64_selvecs): New.
3328         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3330         * bfd-in.h (BFD_VERSION): Remove wrong comment.
3331         (BFD_DEFAULT_TARGET_SIZE): New.
3332         (BFD_ARCH_SIZE): Comment.
3333         * configure.in (target_size): New.  Set instead of target64 in
3334         selvecs case statement.  Set target64 from it.
3335         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
3336         * bfd-in2.h: Regenerate.
3337         * configure: Regenerate.
3339 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
3341         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3342         (bfd_errmsgs): Add corresponding message.
3343         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3344         finding an archive that contains different format object files.
3345         Return bfd_error_wrong_object_format for this case.
3346         * format.c: Formatting fixes.  s/CONST/const/.
3347         (bfd_check_format_matches): Accept archives that give
3348         bfd_error_wrong_object_format if no full match is found.  Tidy
3349         code handling matching_vector.  Don't return a pointer to freed
3350         memory in `matching'.  Handle ambiguous matches as for partial
3351         archive matches.
3352         * bfd-in2.h: Regenerate.
3354 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
3356         * libieee.h (common_header_type): Add last_byte field.
3358         * ieee.c: Add missing prototypes.  Some format fixes.
3359         (struct output_buffer_struct): Move for availability to prototypes.
3360         (ieee_part_after): New function.
3361         (ieee_slurp_debug): Use it here.
3362         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
3363         ieee_part_after to set last_byte to one past end of current part.
3364         Update callers.
3365         (ieee_pos): Pass in ieee_data_struct rather than bfd.
3366         Update callers.
3367         (parse_expression): Don't go beyond the end of the current part.
3368         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3369         (ieee_get_symtab_upper_bound, ieee_get_symtab,
3370         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3371         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3372         ieee_set_section_contents, ieee_write_object_contents,
3373         ieee_make_empty_symbol): Make static.
3374         (ieee_archive_p): Correct comments regarding bfd_read.
3375         (ieee_object_p): Similarly.
3376         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
3377         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3378         input_bfd, output_bfd, output_buffer.
3379         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3380         do_with_relocs, ie. as a symbol for relocatable files.
3381         (ieee_vec): Add comments showing functions referenced by macros.
3383 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
3385         * aout-tic30.c: Add missing prototypes.  Fix formatting.
3386         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
3387         * peXXigen.c: Add missining prototypes.  Fix formatting.
3388         * aout-adobe.c: Add missining prototypes.  Fix formatting.
3390 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
3392         * elf32-v850.c: Add missing function prototypes.
3393         Fix some formatting.
3395         * cpu-v850.c: Add missing function prototype.
3396         Fix some formatting.
3398 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
3400         * elf-bfd.h (struct elf_backend_data): Add new fields
3401         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3402         (bfd_elf_sprintf_vma): Rename function prototype to
3403         '_bfd_elf_sprintf_vma'.
3404         (bfd_elf_fprintf_vma): Rename function prototype to
3405         '_bfd_elf_fprintf_vma'.
3406         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3407         directly, instead indirect via the elf_backend_data structure.
3408         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3409         instead indirect via the elf_backend_data structure.
3410         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3411         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3412         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3413         already defined.
3414         (elf_backend_fprintf_vma): Initialise if not already defined.
3415         (struct elf_backend_data): Initialise the
3416         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3418 2001-08-10  Andreas Jaeger  <aj@suse.de>
3420         * elf64-sparc.c: Add missing prototypes.
3421         * elf32-cris.c: Likewise.
3422         * elf32-i370.c: Likewise.
3423         * elf64-hppa.c: Likewise.
3424         * elf64-s390.c: Likewise.
3426 2001-08-10  Andreas Jaeger  <aj@suse.de>
3428         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3429         Add prototypes where needed.
3431 2001-08-10  H.J. Lu  <hjl@gnu.org>
3433         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3434         (bfd_fprintf_vma): Likewise.
3436 2001-08-10  H.J. Lu  <hjl@gnu.org>
3438         * bfd.c (bfd_sprintf_vma): Don't return void.
3439         (bfd_fprintf_vma): Likewise.
3441 2001-08-10  Andreas Jaeger  <aj@suse.de>
3443         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3444         to build warnings.
3445         * configure: Regenerate.
3447 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
3449         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3450         warning if not BFD64.  Add braces so emacs auto format works.
3451         (bfd_elf_fprintf_vma): Likewise.
3453         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3454         of _xcoff_swap_ld*.
3455         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3456         param to agree with libxcoff.h.
3457         (xcoff_swap_ldhdr_out): Likewise.
3458         (xcoff_swap_ldsym_in): Likewise.
3459         (xcoff_swap_ldsym_out): Likewise.
3460         (xcoff_swap_ldrel_in): Likewise.
3461         (xcoff_swap_ldrel_out): Likewise.
3462         (xcoff_create_csect_from_smclas): Likewise.
3463         * coff64-rs6000.c: Add missing prototypes.
3464         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3465         with libxcoff.h.
3466         (xcoff64_swap_ldhdr_out): Likewise.
3467         (xcoff64_swap_ldsym_in): Likewise.
3468         (xcoff64_swap_ldsym_out): Likewise.
3469         (xcoff64_swap_ldrel_in): Likewise.
3470         (xcoff64_swap_ldrel_out): Likewise.
3471         (xcoff64_ppc_relocate_section): Make static.
3472         (xcoff64_slurp_armap): Likewise.
3473         (xcoff64_archive_p): Likewise.
3474         (xcoff64_openr_next_archived_file): Likewise.
3475         (xcoff64_sizeof_headers): Likewise.
3476         (xcoff64_is_lineno_count_overflow): Likewise.
3477         (xcoff64_is_reloc_count_overflow): Likewise.
3478         (xcoff64_loader_symbol_offset): Likewise.
3479         (xcoff64_loader_reloc_offset): Likewise.
3480         * elf64-gen.c: Add missing prototypes.
3482 2001-08-09  H.J. Lu  <hjl@gnu.org>
3484         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3485         (bfd_elf_fprintf_vma): Likewise.
3487 2001-08-09  H.J. Lu  <hjl@gnu.org>
3489         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3490         to ...
3491         * elf-bfd.h: Here.
3492         * bfd-in2.h: Regenerated.
3494 2001-08-09  H.J. Lu  <hjl@gnu.org>
3496         * bfd-in.h (bfd_sprintf_vma): New prototype.
3497         (bfd_fprintf_vma): Likewise.
3498         (bfd_elf_sprintf_vma): Likewise.
3499         (bfd_elf_fprintf_vma): Likewise.
3500         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3501         * bfd-in2.h: Regenerated.
3503         * bfd.c (bfd_sprintf_vma): New. Defined.
3504         (bfd_fprintf_vma): Likewise.
3506         * elf.c (bfd_elf_sprintf_vma): New. Defined.
3507         (bfd_elf_fprintf_vma): Likewise.
3509 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
3511         * coff-rs6000.c: Add missing prototypes.
3512         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3513         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3514         xcoff_loader_reloc_offset): Make static.
3515         * dwarf1.c: Add missing prototypes.
3516         * dwarf2.c: Add missing prototypes.
3517         (struct abbrev_info): Move definition.
3518         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3519         * elf.c: Add missing prototypes.
3520         * elf32-gen.c: Likewise.
3521         * elf32-i386.c: Likewise.
3522         * elf32-ppc.c: Likewise.
3523         (ppc_elf_sort_rela): Use PTR instead of "void *".
3524         * elflink.h: Add missing prototypes.  Formatting fixes.
3525         * merge.c: Add missing prototypes.
3526         (last4_eq): Use PTR instead of "void *".
3527         (last_eq): Likewise.
3528         * syms.c: Add missing prototypes.
3530 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3532         * bfd.c: Fix formatting.
3533         * bfd-in2.h: Regenerate.
3535 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3537         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3538         true (this target uses REL relocations) and 'pcrel_offset' to
3539         false (the PC is implied, not stored in the offset).
3541 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
3543         1999-10-19  Linus Nordberg  <linus@swox.se>
3544         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3545         * elfxx-target.h (elf_backend_want_got_sym): Define.
3546         (elfNN_bed): Add elf_backend_want_got_sym.
3547         * elflink.c (_bfd_elf_create_got_section): Define
3548         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3550 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
3552         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3553         (find_rela_addend): New function.
3554         (parse_comp_unit): Call it to find the abbrev offset addend.
3555         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3556         members of dwarf2_debug as debugging information is read.
3558 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
3560         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3561         targets as well as sh-pe.
3563 2001-08-03  Ben Harris <bjh21@netbsd.org>
3565         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3566         reloc from start of section when computing value for R_ARM_REL32
3567         reloc.
3569 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
3571         From  H.J. Lu  <hjl@gnu.org>
3572         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3573         keep relocs for undefined syms if there are no dynamic sections in
3574         executable.
3575         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3577 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
3579         * cofflink.c (coff_link_check_ar_symbols): also search for
3580         __imp__symbol as well as _symbol.
3581         * linker.c (_bfd_generic_link_add_archive_symbols): also
3582         search for __imp__symbol as well as _symbol.
3584 2001-08-01  Adam Nemet  <anemet@lnxw.com>
3586         * elf.c (elf_sort_sections): Return zero only as the last step.
3588 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
3590         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3591         ARM_COFF_BUGFIX.
3592         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3593         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3594         ARM_COFF_BUGFIX.
3596 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3598         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3599         to match corresponding bfd_coff_backend data member.
3601 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
3603         * Makefile.am: Update dependencies with "make dep-am".
3604         * Makefile.in: Regenerate
3606 2001-07-15  H.J. Lu  <hjl@gnu.org>
3608         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3609         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3610         * Makefile.in: Regenerate.
3612 2001-07-11  H.J. Lu  <hjl@gnu.org>
3614         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3615         flags when creating the reloc section if the ALLOC flag in the
3616         source section is set.
3618 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
3620         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3621         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3622         * bfd-in2.h: Regenerate.
3623         * libbfd.h: Regenerate.
3624         * elfxx-ia64.c (ia64_howto_table): Define how to handle
3625         new relocations.
3626         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3627         (elfNN_ia64_check_relocs): Likewise.
3628         (elfNN_ia64_install_value): Likewise.
3629         (elfNN_ia64_relocate_section): Likewise.
3631 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
3633         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3634         R_SPARC_UA64.
3635         (elf32_sparc_check_relocs): Likewise.
3636         Only create .rela section for alloced sections in shared libraries.
3637         (elf32_sparc_relocate_section): Likewise.
3638         Remove redundant check.
3639         Optimize unaligned reloc usage.
3640         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3641         check.
3643 2001-07-11  H.J. Lu  <hjl@gnu.org>
3645         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3646         ALLOC|LOAD flags as the source section for debugging sections
3647         when creating the reloc section.
3649 2001-07-05  Jim Wilson  <wilson@redhat.com>
3651         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3652         the section of the bigger symbol.
3654         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3656 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
3658         * peicode.h (coff_swap_scnhdr_in): For sections containing
3659         uninitialised data, only set their size to s_paddr if this does
3660         not reset their size to zero.  MS's latest compilers will set
3661         s_paddr to zero.
3663 2001-07-04  H.J. Lu  <hjl@gnu.org>
3665         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3666         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3667         bfd_mach_mips5000.
3669 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
3671         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3673         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3674         sections being discarded.
3676 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
3678         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3679         instead of _bfd_elfcore_section_from_phdr.
3680         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3681         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3682         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3683         (elfcore_grok_prstatus): Likewise.
3684         (elfcore_grok_lwpstatus): Likewise.
3685         (bfd_get_elf_phdr_upper_bound): Likewise.
3686         (elfcore_make_note_pseudosection): Formatting.
3687         (_bfd_elfcore_strndup): Formatting.
3688         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3689         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3691 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
3693         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3694         and _bfd_elfcore_strndup.
3695         (struct elf_backend_data): Add elf_backend_grok_prstatus
3696         and elf_backend_grok_psinfo.
3697         * elf.c (_bfd_elfcore_make_pseudosection): New function.
3698         (elfcore_grok_prstatus): Use it.
3699         (elfcore_make_note_pseudosection): Likewise.
3700         (elfcore_strndup):  Rename to...
3701         (_bfd_elfcore_strndup): Here, and make global.
3702         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3703         (elfcore_grok_note): Call elf_backend_grok_prstatus
3704         and elf_backend_grok_psinfo if available.
3705         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3706         (_bfd_elf32_mips_grok_psinfo): New function.
3707         (elf_backend_grok_prstatus): Define.
3708         (elf_backend_grok_psinfo): Define.
3709         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3710         (elf_backend_grok_psinfo): Likewise.
3711         (elfNN_bed): Include elf_backend_grok_prstatus and
3712         elf_backend_grok_psinfo.
3714 2001-06-29  H.J. Lu  <hjl@gnu.org>
3716         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3717         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
3718         is NULL before filling PLT.
3720 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
3722         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3724 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
3726         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3727         here..
3728         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3729         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3730         after gc has run.
3732         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3733         (IS_ABSOLUTE_RELOC): Define.
3734         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3735         (hppa_link_hash_newfunc): Always init it.
3736         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3737         create COPY relocs only when the reloc is in a read-only section.
3738         Instead, allocate space for a dynamic reloc to reference the
3739         library symbol directly.  Keep track of space we allocate using
3740         relocs_entries.
3741         (hppa_discard_copies): Delete, and move code to..
3742         (allocate_plt_and_got): ..here.  Rename to
3743         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3744         relocs for non-shared link.
3745         (elf32_hppa_size_dynamic_sections): Update calls to above.
3746         (elf32_hppa_relocate_section): Write out the dynamic relocs used
3747         in lieu of COPY relocs.
3749         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3750         here..
3751         (elf_i386_adjust_dynamic_symbol): ..nor here..
3752         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3753         after gc has run.
3754         (elf_i386_size_dynamic_sections): Fix a comment.
3755         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3756         involved in writing reloc out.
3758 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
3760         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3761         Ensure syms are dynamic if we might be emitting a reloc.
3762         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3763         for undefweak or undefined syms..
3764         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3766         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3767         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3768         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3769         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3771 2001-06-24  H.J. Lu  <hjl@gnu.org>
3773         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3774         strncasecmp/strcasecmp instead of strncmp/strcmp.
3776 2001-06-23  H.J. Lu  <hjl@gnu.org>
3778         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3779         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3780         in the regular object file and treat the weak definition as
3781         the normal one.
3783 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
3785         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3786         unresolved_reloc test to exclude cases where we use "relocation"
3787         before setting it to point into the .got.  Reinstate fudge for
3788         unresolved relocs in debugging sections.
3790         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3791         complicated tests for unresolvable relocs with a simple direct
3792         scheme using "unresolved_reloc" var.
3794         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3795         elf_i386_dyn_relocs.  Update comment.
3796         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3797         dyn_relocs.
3798         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3799         others to aborts.
3800         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3801         abort.
3802         (elf_i386_size_dynamic_sections): Likewise.
3803         (elf_i386_finish_dynamic_symbol): Likewise.
3804         (elf_i386_finish_dynamic_sections): Likewise.
3805         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
3806         handling code.
3808         Avoid creating COPY relocs if possible.
3809         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3810         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
3811         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3812         reloc is in a read-only section.  Instead, allocate space for a
3813         dynamic reloc to reference the library symbol directly.  Keep
3814         track of space we allocate using pcrel_relocs_copied.
3815         (discard_copies): Delete, and move code to ..
3816         (allocate_plt_and_got): ..here.  Rename to
3817         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3818         relocs for non-shared link.
3819         (elf_i386_size_dynamic_sections): Update calls to above functions.
3820         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
3821         more ugly logic to avoid "unresolvable relocation" error.  Use
3822         htab shortcut in place of elf_hash_table macro.
3823         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3824         not always be created now.
3826 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
3828         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3829         shared libraries.
3831 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3833         * configure.host (mips64-*-linux): Reformat.
3835 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
3837         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3838         allocate local .got space.  Use shortcuts from hash table for .got
3839         and .plt rather than comparing section names.
3840         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3841         adjusting index into local_got_refcounts to document what we are
3842         really doing.
3843         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3844         Tidy .got and .plt error checking.
3846 2001-06-20  Catherine Moore  <clm@redhat.com>
3848         * elf-bfd.h (struct elf_backend_data):
3849         elf_backend_emit_relocs: New field: Function for emitting
3850         relocs.
3851         elf_backend_count_relocs: New field: Function for determining
3852         the number of relocs to be emitted.
3853         * elfxx-target.h: Provide default (NULL) values for
3854         elf_backend_emit_relocs and elf_backend_count_relocs.
3855         * elflink.h (elf_link_size_reloc_section): Make the hash table
3856         big enough to hold the relocs counted by either reloc_count or
3857         o->reloc_count.
3858         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3859         should be emitted, either because of a command line option
3860         stored in the info structure or because the target provides a
3861         special reloc emitting function.
3862         If the target provides a reloc counting function use it,
3863         unless performing a relocatable link or emitting all relocs.
3864         Also set the SEC_RELOC flag on any output section which will
3865         contain relocs.
3866         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3867         should be emitted, either because of a command line option
3868         stored in the info structure or because the target provides a
3869         special reloc emitting function.
3870         If the target provides a reloc emitting function, use it,
3871         unless performing a relocatable link or emitting all relocs.
3873 2001-06-20  H.J. Lu  <hjl@gnu.org>
3875         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3876         allocate local .got space.
3878 2001-06-19  Andreas Jaeger  <aj@suse.de>
3880         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3881         dynamic symbols.
3883 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
3885         * elflink.h (struct elf_assign_sym_version_info): Remove member
3886         export_dynamic.  All users changed to use info member.
3887         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3888         export_dynamic, instead use member in parameter info.
3889         * bfd-in.h (bfd_elf32_size_dynamic_sections,
3890         bfd_elf64_size_dynamic_sections): Update prototype.
3891         * bfd-in2.h: Regenerate.
3893 2001-06-18  H.J. Lu  <hjl@gnu.org>
3895         * elflink.h (elf_info_failed): Add a new field, verdefs.
3896         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3897         elf_export_symbol.
3898         (elf_export_symbol): Check eif->verdefs to decide if a symbol
3899         should be exported.
3901 2001-06-17  H.J. Lu  <hjl@gnu.org>
3903         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3904         readonly_reloc, to record if a relocation in the .rel.dyn
3905         section is against a read-only section.
3906         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3907         field to false.
3908         (_bfd_mips_elf_check_relocs): Record if there is a relocation
3909         in the .rel.dyn section against a read-only section by setting
3910         DF_TEXTREL or readonly_reloc.
3911         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3912         it is true.
3913         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3914         there is a relocation in the .rel.dyn section against a
3915         read-only section.
3916         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3917         DF_TEXTREL is set.
3919 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
3921         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3922         function.  Move flagword result into parameter list.  Remove
3923         comment about setting bfd_error_handler to intercept failure
3924         results.
3925         * coffgen.c (make_a_section_from_file): Examine result of
3926         calling bfd_coff_styp_to_sec_flags and pass a failure back to
3927         caller.
3928         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3929         function.  Move flagword result into parameter list.
3930         * libcoff.h: Regenerate.
3931         * libecoff.h: Regenerate.
3933 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
3935         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3936         section is going to follow it.
3938 2001-06-12  Catherine Moore  <clm@redhat.com>
3940         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3941         with the file_align entry from elf_backend_data.
3942         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3943         (elf_gc_record_vtentry): Likewise.
3945 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
3947         * elflink.h: Whitespace changes.
3948         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3949         rather than "unsigned char".
3950         (elf_link_output_relocs): Likewise.
3951         (elf_link_input_bfd): Likewise.
3952         (elf_reloc_link_order): LIkewise.
3953         * elf.c: s/CONST/const/.  Whitespace changes.
3954         * elf32-mips.c: Formatting fix.
3956         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3957         * Makefile.in: Regenerate.
3958         * po/Make-in: Remove trailing tab.
3960 2001-06-09  Philip Blundell  <philb@gnu.org>
3962         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3963         change.
3964         (elf32_arm_plt_entry): Likewise.
3966 2001-06-08  H.J. Lu  <hjl@gnu.org>
3968         * elf.c (swap_out_syms): Keep names for global section symbols.
3970 2001-06-07  H.J. Lu  <hjl@gnu.org>
3972         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3973         MIPS-based machines need it.
3975 2001-06-07  H.J. Lu  <hjl@gnu.org>
3977         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3978         for SGI only.
3980         * config.bfd: Remove ecoff from Linux/mips.
3982 2001-06-07  Andreas Jaeger  <aj@suse.de>
3984         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3985         assertion.
3986         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3987         alignment of 8 for .rela sections; handle further relocations.
3989 2001-06-06  Christian Groessler <cpg@aladdin.de>
3991         * coff-z8k.c: Fix formatting.
3992         Fix howtos: howto->size was always 1.
3994 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3996         * configure.host (mips64*-*-linux*): Define.
3998 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
4000         * elf32-i386.c (elf_i386_discard_copies): Rename to
4001         discard_copies, and use elf_link_hash_entry arg rather than
4002         elf_i386_link_hash_entry.
4003         (elf_i386_link_hash_traverse): Delete.
4004         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
4005         Tidy sizing of dynamic sections.
4006         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
4007         possible .plt entries.
4008         (elf_i386_gc_sweep_hook): Likewise.
4009         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
4010         everything with plt.refcount <= 0.
4012         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
4013         .relgot space here.
4014         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
4015         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
4016         .rel.plt here..
4017         (allocate_plt_and_got): ..instead do it all here.  New function.
4018         (elf_i386_size_dynamic_sections): Allocate local .got space and
4019         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
4020         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
4021         rather than gc variety).
4022         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4023         (elf_i386_relocate_section): Use it here and correct handling of
4024         R_386_GOT32.  Provide section and offset for "unresolvable
4025         relocation" error message.
4026         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
4028         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
4029         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
4030         (elf_i386_link_hash_table_create): Init them.
4031         (create_got_section): New function.
4032         (elf_i386_create_dynamic_sections): New function.
4033         (elf_backend_create_dynamic_sections): Set to above.
4034         (elf_i386_check_relocs): Use shortcuts from hash table rather than
4035         calling bfd_get_section_by_name.
4036         (elf_i386_gc_sweep_hook): Likewise.
4037         (elf_i386_adjust_dynamic_symbol): Likewise.
4038         (elf_i386_size_dynamic_sections): Likewise.
4039         (elf_i386_relocate_section): Likewise.
4040         (elf_i386_finish_dynamic_sections): Likewise.
4042         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
4044 2001-06-02  H.J. Lu  <hjl@gnu.org>
4046         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
4047         and ELFOSABI_HPUX.
4048         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
4050 2001-06-02  H.J. Lu  <hjl@gnu.org>
4052         * aout-cris.c (MACHTYPE_OK): New. Defined.
4054 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
4056         * section.c (_bfd_strip_section_from_output): Handle NULL
4057         output_section.
4059 2001-06-02  H.J. Lu  <hjl@gnu.org>
4061         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
4062         rs6000coff64_vec only if BFD64 is defined.
4063         (powerpc64-*-aix*): Enable only if BFD64 is defined.
4065 2001-06-02  H.J. Lu  <hjl@gnu.org>
4067         * coff-ia64.c (ia64coff_object_p): Rewrite with
4068         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
4070 2001-06-01  Andreas Jaeger  <aj@suse.de>
4072         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
4073         relocation, small reformatting.
4075 2001-05-29  Andreas Jaeger  <aj@suse.de>
4077         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
4078         (elf64_x86_64_relocate_section): Likewise.
4080 2001-05-30  Alan Modra  <amodra@one.net.au>
4082         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
4083         millicode.  Don't allocate .got and .rela.got space here..
4084         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
4085         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
4086         .rela.plt here..
4087         (hppa_handle_PIC_calls): ..nor here..
4088         (allocate_plt_and_got): ..instead do it all here.  New function.
4089         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
4090         call allocate_plt_and_got.  No need to zap .got if not dynamic.
4091         (elf32_hppa_final_link): Call regular bfd_final_link instead of
4092         gc_common_final_link.
4093         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4094         (elf32_hppa_relocate_section): Use it here.
4095         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
4096         dynamic_sections_created.
4097         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
4099 2001-05-28  Andreas Jaeger  <aj@suse.de>
4101         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
4102         generic version since we want a hashsize of 4.
4103         (elf_backend_size_info): Likewise.
4105 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
4107         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
4108         a zeroing loop.
4109         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
4110         (elf_link_input_bfd): Likewise.
4111         (elf_reloc_link_order): Likewise.
4112         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
4113         relocations correctly.
4115 2001-05-28  Nicolas Pitre <nico@cam.org>
4117         * elf32-arm.h: fix PLT generation for big endian ARM
4119 2001-05-28  Alan Modra  <amodra@one.net.au>
4121         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
4122         for symbols forced local that need plabels.
4123         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
4124         .plt.rela for local syms if non-shared.
4125         (hppa_build_one_stub): Mask lsb of plt.offset.
4126         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
4127         (clobber_millicode_symbols): Correct comment.
4128         (elf32_hppa_relocate_section): Likewise.
4129         (elf32_hppa_finish_dynamic_symbol): Likewise.
4131 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
4133         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
4134         * bfd-in2.h: Regenerate.
4135         * libbfd.h: Regenerate.
4136         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
4137         and BFD_RELOC_SPARC_UA64 mapping
4138         * elf64-sparc.c: Likewise.
4140 2001-05-25  H.J. Lu  <hjl@gnu.org>
4142         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
4143         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4144         (coff-rs6000.lo): Remove the old dependency.
4145         * Makefile.in: Rebuild.
4147         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4148         coff-rs6000.lo.
4150 2001-05-25  H.J. Lu  <hjl@gnu.org>
4152         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4153         rs6000coff_core_file_matches_executable_p,
4154         rs6000coff_core_file_failing_command and
4155         rs6000coff_core_file_failing_signal only if AIX_CORE is
4156         defined.
4157         (pmac_xcoff_vec): Likewise.
4158         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4160 2001-05-25  Timothy Wall  <twall@redhat.com>
4162         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4163         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
4165 2001-05-25  H.J. Lu  <hjl@gnu.org>
4167         * bfd-in2.h: Regenerated.
4168         * libcoff.h: Likewise.
4170 2001-05-25  Alan Modra  <amodra@one.net.au>
4172         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4173         undefined millicode syms in shared libs.
4174         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4175         (elf32_hppa_check_relocs): Likewise.
4176         (elf32_hppa_adjust_dynamic_symbol): Likewise.
4177         (elf32_hppa_size_dynamic_sections): Likewise.
4178         (elf32_hppa_relocate_section): Likewise.
4179         (elf32_hppa_finish_dynamic_symbol): Likewise.
4180         (elf32_hppa_finish_dynamic_sections): Likewise.
4182 2001-05-24  Tom Rix <trix@redhat.com>
4184         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4185         xcoff-target.h not used to define rs6000 or ppc bfd.
4186         * Makefile.in same
4188         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4189         to 64 bit.
4191         * coff-rs6000.c : Many changes for 64 bit support.  Move common
4192         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
4193         and pmac_xcoff_vec
4195         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
4196         linker now supported.  Explictly define the rs6000coff64_vec.
4198         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4199         (coff_print_aux) same
4200         (coff_write_object_contents) same
4201         (coff_slurp_line_table) same
4203         * coffgen.c : (coff_fix_symbol_name) formatting
4204         (coff_mangle_symbols) xcoff 64 bit support
4205         (coff_write_symbol) same
4206         (coff_write_alien_symbol) same
4207         (coff_write_native_symbol) same
4208         (coff_write_symbols) same
4209         (coff_get_symbol_info) same
4210         (bfd_coff_get_syment) same
4211         (coff_print_symbol) same
4213         * config.bfd : add powerpc64-*-aix* target
4215         * libcoff-in.h : formatting
4217         * libcoff.h : move xcoff extern declarations to libxcoff.h
4219         * libxcoff.h : New file
4221         * xcofflink.c : Many changes for xcoff64 support.  Move common
4222         structures to include/coff/xcoff.h.  Move specific structure to
4223         backends coff-rs6000.c and coff64-rs6000.c.  Use new backend
4224         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4226         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4227         aix4.2+ -binitfini.
4229         (xcoff_build_ldsyms) : handle special __rtinit symbol.
4231 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
4233         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4234         s/ENTIRES/ENTRIES/.
4236 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4238         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4239         * libbfd.h: Regenerate.
4240         * bfd-in2.h: Regenerate.
4242         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4243         * archures.c (bfd_mach_mips12000): Define.
4244         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4245         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4246         support.
4247         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4248         * bfd-in2.h: Regenerate.
4249         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4251 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
4253         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4254         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4255         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4256         that is used by GCC.
4258 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
4260         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4261         of entries in a structured section.
4262         * elf.c: Use new macro.
4263         * elf32-i386.c: Use new macro.
4264         * elf32-mips.c: Use new macro.
4265         * elf64-alpha.c: Use new macro.
4266         * elf64-sparc.c: Use new macro.
4267         * elfcode.h: Use new macro.
4268         * elflink.h: Use new macro.
4270 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
4272         * bfdint.texi: Replace -oformat with --oformat.
4274 2001-05-21  Andreas Jaeger  <aj@suse.de>
4276         * dwarf2.c (decode_line_info): Fix error message.
4277         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4278         adjust error message.
4280 2001-05-18  H.J. Lu  <hjl@gnu.org>
4282         * elflink.h (elf_link_add_object_symbols): Revert the last
4283         change.
4285 2001-05-17  Alan Modra  <amodra@one.net.au>
4287         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4288         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4289         (hppa_build_one_stub): Add an assert to check plt.offset.
4291 2001-05-17  H.J. Lu  <hjl@gnu.org>
4293         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4294         version definition to basename of the output filename.
4296 2001-05-17  H.J. Lu  <hjl@gnu.org>
4298         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4299         basename of the bfd filename.
4301 2001-05-16  Alan Modra  <amodra@one.net.au>
4303         * section.c (asection): Add linker_has_input field.
4304         (STD_SECTION): Adjust initialization to suit.
4305         * ecoff.c (bfd_debug_section): Likewise.
4306         * bfd-in2.h: Regenerate.
4308 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
4310         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4311         negative 32-bit operands to 16 operands when the operand is
4312         going to be zero-extended by the modified opcode.
4314 2001-05-12  Peter Targett  <peter.targett@arccores.com>
4316         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4317         name for 'arc5' core versions.
4318         (bfd_arc_arch): Make bfd_mach_arc_6 default.
4320         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4321         architecture.
4322         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4324 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
4326         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4327         sections as well.
4328         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4329         to .gnu.linkonce.t.FOO text section.
4331 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
4333         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4334         fields, change sec into secinfo.
4335         (struct sec_merge_info): Add chain, remove last fields.
4336         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4337         (sec_merge_hash_lookup): If lookup could not use a string only
4338         because it has bad alignment, mark the old string for deletion.
4339         (sec_merge_add): Add secinfo argument. Don't compute entry's
4340         position, instead record the section.
4341         (sec_merge_emit): Update for the sec into secinfo change in
4342         struct sec_merge_hash_entry.
4343         (_bfd_merge_section): Only record the section for merging, defer
4344         putting strings into the hash table.
4345         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4346         _bfd_merge_sections): New functions.
4347         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4348         changes.
4349         * libbfd-in.h (_bfd_merge_sections): Add prototype.
4350         (_bfd_nolink_bfd_merge_sections): Define.
4351         * libbfd.h: Likewise.
4352         (bfd_generic_merge_sections): Add prototype.
4353         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4354         (struct bfd_target): Likewise.
4355         * bfd.c (bfd_merge_sections): Define.
4356         * bfd-in2.h: Rebuilt.
4357         * elf.c (_bfd_elf_merge_sections): New function.
4358         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4359         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4360         * reloc.c (bfd_generic_merge_sections): New function.
4361         * vms.c (vms_bfd_merge_sections): New function.
4362         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4363         * aout-target.h (MY_bfd_merge_sections): Define.
4364         * aout-tic30.c (MY_bfd_merge_sections): Define.
4365         * binary.c (binary_bfd_merge_sections): Define.
4366         * bout.c (b_out_bfd_merge_sections): Define.
4367         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4368         * coffcode.c (coff_bfd_merge_sections): Define.
4369         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4370         * i386msdos.c (msdos_bfd_merge_sections): Define.
4371         * i386os9k.c (os9k_bfd_merge_sections): Define.
4372         * ieee.c (ieee_bfd_merge_sections): Define.
4373         * ihex.c (ihex_bfd_merge_sections): Define.
4374         * nlm-target.h (nlm_bfd_merge_sections): Define.
4375         * oasys.c (oasys_bfd_merge_sections): Define.
4376         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4377         * som.c (som_bfd_merge_sections): Define.
4378         * srec.c (srec_bfd_merge_sections): Define.
4379         * tekhex.c (tekhex_bfd_merge_sections): Define.
4380         * versados.c (versados_bfd_merge_sections): Define.
4381         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4383 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
4385         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4386         to be unsigned long, in order to match its use.
4388 2001-05-10  H.J. Lu  <hjl@gnu.org>
4390         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4391         indirect symbols.
4393 2001-05-09  H.J. Lu  <hjl@gnu.org>
4395         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4396         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4397         Remove the unused veriable `dynver'.
4399 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
4401         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4402         NULL or is not COFF.
4403         (coff_i386_rtype_to_howto): Don't dump core if output section
4404         owner is not COFF.
4406 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4408         * ecoff.c (bfd_debug_section): Fix initialization.
4409         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4410         is always a positive integer. Cast away sign mismatch.
4411         * elf32-mips.c: Fix misleading comment and typo.
4412         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4413         correct data type.
4414         * elflink.c: Fix typo.
4415         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4416         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4418 2001-05-04  Richard Henderson  <rth@redhat.com>
4420         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4422 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
4424         * elf32-arm.h (elf32_arm_final_link_relocate): Set
4425         EF_ARM_HASENTRY if the start address is set.
4427 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
4429         * targets.c (_bfd_target_vector_entries): Compute value based on
4430         the size of the _bfd_target_vector and not bfd_target_vector.
4432 2001-05-03  H.J. Lu  <hjl@gnu.org>
4434         * elfcode.h: Include "libiberty.h".
4436         * elflink.h (elf_link_add_object_symbols): Set
4437         elf_dt_name (abfd) to basename of the bfd filename.
4438         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4439         of the bfd filename.
4441 2001-05-03  Andreas Jaeger  <aj@suse.de>
4443         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4444         (elf_generic_info_to_howto_rel): Likewise.
4445         * coff-alpha.c (reloc_nil): Likewise.
4446         (alpha_ecoff_bad_format_hook): Likewise.
4447         (alpha_adjust_reloc_out): Likewise.
4448         (alpha_bfd_reloc_type_lookup): Likewise.
4449         (alpha_convert_external_reloc): Likewise.
4450         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4451         (elf64_alpha_reloc_bad): Likewise.
4452         (elf64_alpha_reloc_gpdisp): Likewise.
4453         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4454         (elf64_alpha_info_to_howto): Likewise.
4455         (elf64_alpha_add_symbol_hook): Likewise.
4456         (elf64_alpha_create_got_section): Likewise.
4457         (elf64_alpha_is_local_label_name): Likewise.
4458         (elf64_alpha_merge_ind_symbols): Likewise.
4459         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4460         (mips_elf64_get_reloc_upper_bound): Likewise.
4461         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4462         (nlm_alpha_get_public_offset): Likewise.
4464 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
4466         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4467         about overflow in R_OPENRISC_LO_16_IN_INSN and
4468         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4470 2001-04-30  H.J. Lu  <hjl@gnu.org>
4472         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4473         only for ELF_LINK_FORCED_LOCAL.
4474         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4475         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4476         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4478         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4479         if the symbol has hidden or internal visibility.
4481 2001-04-30  Alan Modra  <amodra@one.net.au>
4483         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4484         calls to undefined weak symbols.
4486 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4488         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4489         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4491 2001-04-27  Andreas Jaeger  <aj@suse.de>
4493         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4494         out handled entries.
4495         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4496         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4497         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4498         GOT32.
4500 2001-04-27  Sean McNeil <sean@mcneil.com>
4502         * config.bfd: Add arm-vxworks target.
4503         * coff-arm (coff_arm_relocate_section): Add in symbol value to
4504         addend (fro VXworks targets).
4506 2001-04-26  H.J. Lu  <hjl@gnu.org>
4508         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4509         valid.
4511 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
4513         * bfd-in.h (bfd_cache_close): Declare newly exported function.
4514         * bfd-in2.h: Regenerated.
4516 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
4518         * merge.c (struct sec_merge_hash_entry): Add alignment field.
4519         (struct sec_merge_hash): Remove alignment_power.
4520         (sec_merge_hash_newfunc): Clear alignment.
4521         (sec_merge_hash_lookup): Pass alignment as argument.
4522         Use hashp->root.next, not hashp->next to walk the hash chain.
4523         If a string already in the hashtable does not have required
4524         alignment, create a new hashtable entry.
4525         (sec_merge_init): Remove alignment_power argument.
4526         (sec_merge_add): Add alignment argument.
4527         (sec_merge_emit): Alignment is now a per-entity thing, not per
4528         section.
4529         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4530         for proper alignment.
4531         Pass alignment information to sec_merge_add.
4533 2001-04-24  Christian Groessler  <cpg@aladdin.de>
4535         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4536         and R_REL16 reloc types; accept odd values for R_REL16 type
4538 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
4540         * cpu-openrisc.c: New file.
4541         * elf32-openrisc.c: Likewise.
4543         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4544         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4545         (BFD32_BACKENDS): Add elf32-openrisc.lo.
4546         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4547         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4548         * Makefile.in: Regenerated.
4549         * config.bfd: (openrisc-*-elf): New target.
4550         * configure.in (bfd_elf32_openrisc_vec): New vector.
4551         * configure: Regenerated.
4552         * libbfd.h: Regenerated.
4553         * bfd-in2.h: Regenerated.
4554         * reloc.c: Add OpenRISC relocations.
4555         * targets.c (bfd_elf32_openrisc_vec): Declare.
4556         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4557         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4558         (bfd_openrisc_arch): Declare.
4559         (bfd_archures_list): Add bfd_openrisc_arch.
4560         * elf.c (prep_headers): Add bfd_arch_openrisc.
4562 2001-04-23  Bo Thorsen  <bo@suse.de>
4564         * elf64-x86-64.c: Add c++ vtable hack.
4565         Small whitespace and comment changes.
4567 2001-04-19  Andreas Jaeger  <aj@suse.de>
4569         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4570         (elf64_x86_64_plt_entry): Likewise.
4571         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4572         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4574 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
4576         * elf32-cris.c: Tweak comments related to dynamic linking.
4577         (cris_elf_relocate_section): When not creating shared object, fill
4578         in the .got table for any symbol not in the dynamic symbol table.
4579         (elf_cris_finish_dynamic_symbol): When not creating shared object,
4580         only emit a .got.rela reloc if the symbol is in the dynamic symbol
4581         table.
4582         (cris_elf_check_relocs): Use variable r_type in all places rather
4583         than the original expression.  Add default case in switch for
4584         reloc types.
4585         (elf_cris_size_dynamic_sections): Iterate over
4586         elf_cris_discard_excess_program_dynamics when not creating shared
4587         library.
4588         (elf_cris_discard_excess_dso_dynamics): Renamed from
4589         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
4590         (elf_cris_discard_excess_program_dynamics): New.
4592 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
4594         * coffcode.h (coff_write_object_contents): Use
4595         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4597 2001-04-14  H.J. Lu  <hjl@gnu.org>
4599         * bfd-in2.h: Regenerate.
4601 2001-04-14  Jakub Jelinek <jakub@redhat.com>
4603         * section.c (STD_SECTION): Add entsize.
4605 2001-04-13  H.J. Lu  <hjl@gnu.org>
4607         * section.c (SEC_MERGE): Define new flag for merging.
4608         (SEC_STRINGS): Likewise.
4609         (entsize): New field.
4611 2001-04-13  Roger Sayle  <roger@metaphorics.com>
4613         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4614         flag on pe-i386 targets.
4616 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
4618         * libbfd-in.h (_bfd_merge_section): New.
4619         (_bfd_write_merged_section): New.
4620         (_bfd_merged_section_offset): New.
4621         * libbfd.h: Rebuilt.
4622         * linker.c (_bfd_generic_link_output_symbols): Handle
4623         discard_sec_merge.
4624         * aoutx.h (aout_link_write_symbols): Likewise.
4625         * pdp11.c (aout_link_write_symbols): Likewise.
4626         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4627         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4628         sections.
4629         (elf_link_sec_merge_syms): New.
4630         (elf_link_input_bfd): Call _bfd_merged_section_offset
4631         and _bfd_write_merged_section.
4632         Handle discard_sec_merge.
4633         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4634         field.
4635         (struct bfd_elf_section_data): Likewise.
4636         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4637         SEC_STRINGS section flags and entsize from their ELF counterparts.
4638         (_bfd_elf_link_hash_table_init): Initialize merge_info.
4639         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4640         from their BFD counterparts.
4641         * merge.c: New file.
4642         * Makefile.am: Add strtab.lo.
4643         * Makefile.in: Rebuilt.
4645 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
4647         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4648         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4650 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
4652         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4653         endian MIPS ELF target.
4654         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4655         MIPS ELF target.
4657         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4658         64bit big endian MIPS ELF target.
4659         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4660         endian MIPS ELF target.
4661         * configure: Regenerated.
4663         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4664         little endian targets.
4665         (mips_elf_sym_is_global): Handle traditional targets.
4667         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4668         64bit big endian MIPS ELF target.
4669         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4670         endian MIPS ELF target.
4672         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4673         and bfd_elf64_tradlittlemips_vec.
4675 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
4677         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4678         ordinary "progbits" section.
4680 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
4682         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4683         when -Bsymbolic causes a symbol to no longer need a .plt entry.
4685 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
4687         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4689 2001-03-30  H.J. Lu  <hjl@gnu.org>
4691         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4692         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4694 2001-03-26  H.J. Lu  <hjl@gnu.org>
4696         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4697         if there are any relocations for generic ELF.
4698         (bfd_elf32_bfd_link_add_symbols): Defined to
4699         elf32_generic_link_add_symbols.
4700         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4701         if there are any relocations for generic ELF.
4702         (bfd_elf64_bfd_link_add_symbols): Defined to
4703         elf64_generic_link_add_symbols.
4705 2001-03-23  Nick Clifton  <nickc@redhat.com>
4707         * Makefile.am (BUILD_CFILES): New variable: List of C source
4708         files created in build directory.
4709         (BUILD_HFILES): New variable: List of header files created in
4710         build directory.
4711         (POTFILES): Delete.
4712         (po/POTFILES.in): Replace rule with empty entry.
4713         (po/SRC-POTFILES.in): New rule: Create a list of source files
4714         in the source directory.
4715         (po/BLD-POTFILES.in): New rule: Create a list of source files
4716         in the build directory.
4717         (MOSTLYCLEAN): Do not delete source files created in build
4718         directory.
4719         * Makefile.in: Regenerate.
4720         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4721         into po/Makefile.
4722         * configure: Regenerate.
4724         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4725         and BLD_POTFILES.
4726         Add .. to the search path when building bfd.pot.
4727         Delete POTFILES when performing distclean.
4728         Add comment describing why distclean is broken in maintainer mode.
4729         * po/POTFILES.in: Delete.
4730         * po/SRC-POTFILES.in: New file.
4731         * po/BLD-POTFILES.in: New file.
4732         * po/bfd.pot: Regenerate.
4734 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
4736         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
4737         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4738         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4739         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4740         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4741         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4742         functions.
4743         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4744         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
4745         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4746         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4747         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4748         New HOWTO members for new relocs.
4749         (cris_reloc_map): Map new relocs.
4750         (ELF_DYNAMIC_INTERPRETER): Define.
4751         (PLT_ENTRY_SIZE): Define.
4752         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4753         elf_cris_pic_plt_entry): New, PLT templates.
4754         (struct elf_cris_pcrel_relocs_copied, struct
4755         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4756         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4757         (cris_final_link_relocate): Check that 16-bit GOT relocs have
4758         positive values.  Adjust PCREL relocs to be relative to location
4759         after relocation.
4760         (cris_elf_relocate_section): Handle relocations to dynamic
4761         objects.  Handle new relocations.  Call error handler when seeing
4762         non-PIC relocation for read-only sections while generating shared
4763         object.
4764         (cris_elf_check_relocs): Set reference counts for GOT and PLT
4765         entries.
4766         (bfd_elf32_bfd_link_hash_table_create,
4767         elf_backend_adjust_dynamic_symbol,
4768         elf_backend_size_dynamic_sections,
4769         elf_backend_finish_dynamic_symbol,
4770         elf_backend_finish_dynamic_sections,
4771         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4772         elf_backend_hide_symbol, elf_backend_want_got_plt,
4773         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4774         elf_backend_got_header_size, elf_backend_plt_header_size):
4775         Define.
4777         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4778         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4779         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4780         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4781         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4782         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4783         * bfd-in2.h, libbfd.h: Regenerate.
4785 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
4787         (_bfd_mips_elf_relocate_section): Give a better error message when
4788         a relocation is not recognized.
4790 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
4792         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4793         non-NULL before attempting to dereference.
4795 2001-03-20  H.J. Lu  <hjl@gnu.org>
4797         * configure.in: Remove the redundent AC_ARG_PROGRAM.
4798         * configure: Rebuild.
4800 2001-03-20  Andreas Schwab  <schwab@suse.de>
4802         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4803         relocation value when resolving a reference from a debugging
4804         section.
4806 2001-03-16  Scott Thomason  <SThomaso@hii.com>
4808         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4809         (xcoff64_swap_sym_out): Fix syntax errors.
4811 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
4813         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4815 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
4817         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4818         (hppa_link_hash_newfunc): Init it.
4819         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4820         section appears to be non-PIC.
4821         (final_link_relocate): Likewise.
4822         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4823         possible candidate function, and set pic_call for those that will
4824         only have a .plt entry for the PIC call stub.
4825         (hppa_handle_PIC_calls): Set maybe_pic_call.
4827 2001-03-12  DJ Delorie  <dj@redhat.com>
4829         * elf32-sh.c (sh_elf_relocate_section): Only relocation
4830         R_SH_DIR8WP* relocs if they're against external symbols, else
4831         they're just for relaxing.  Validate the reloc values.
4833 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
4835         * binary.c (bfd_external_binary_architecture): Declare.
4836         (binary_object_p): If bfd_external_binary_architecture is defined,
4837         set the architecture to this string.
4839 2001-03-11  Philip Blundell  <philb@gnu.org>
4841         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4842         entries that could serve as a definition for a weak symbol.
4844 2001-03-08  Nick Clifton  <nickc@redhat.com>
4846         * Most files: Update copyright notices using Perl script created
4847         by Kevin Buettner <kevinb@redhat.com>.
4849 2001-03-07  Nick Clifton  <nickc@redhat.com>
4851         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4852         prior patch on ! defined OLD_ARM_ABI.
4854 2001-03-07  Andreas Jaeger  <aj@suse.de>
4856         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4857         some relocation values.
4859 2001-03-06  Nick Clifton  <nickc@redhat.com>
4861         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4862         of offset in BLX(1) instruction.
4863         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4864         offset in BLX(1) instruction.
4865         Fix formatting.
4867 2001-03-06  Nick Clifton  <nickc@redhat.com>
4869         * coff-arm.c (coff_arm_reloc_type_lookup): Add
4870         BFD_RELOC_THUMB_PCREL_BLX.
4872 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
4874         * archures.c (bfd_default_scan): Add Coldfire CPUs.
4875         * bfd-in2.h: Regenerate.
4876         * cpu-m68k.c: Add Coldfire CPUs for arch table.
4877         * ieee.c (ieee_write_processor): Set proper id for
4878         Coldfire CPUs.
4880 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4882         * configure.in: Add s390 target.
4883         * configure: Regenerate.
4885 2001-02-28  Andreas Jaeger  <aj@suse.de>
4887         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4888         to addend.
4890 2001-02-28  Philip Blundell  <pb@futuretv.com>
4892         * elf32-arm.h: Update mentions of renamed EF_xx constants.
4893         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4895 2001-02-27  H.J. Lu  <hjl@gnu.org>
4897         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4898         abfd->tdata.aout_data == NULL.
4900 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
4902         * elf32-hppa.c: Correct field selector in stub comments.
4903         (clobber_millicode_symbols): Formatting fix.
4905         * configure.in: Bump version to 2.11.90.
4906         * configure: Regenerate.
4907         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4908         (CFILES): $SOURCE_CFILES + generated C files.
4909         (POTFILES): Include $HFILES not $SOURCE_HFILES.
4910         Run "make dep-am"
4911         * Makefile.in: Regenerate.
4912         * doc/Makefile.in: This too.
4914 2001-02-26  Timothy Wall  <twall@cygnus.com>
4916         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4917         comments.
4919 2001-02-26  Nick Clifton <nickc@redhat.com>
4921         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4922         up, replacing multiple if statements with a switch.
4923         (handle_COMDAT): New function.
4925 2001-02-26  H.J. Lu  <hjl@gnu.org>
4927         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4928         a warning for section flags we do not handle instead of
4929         aborting.
4931 2001-02-26  Andreas Jaeger  <aj@suse.de>
4933         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4935 2001-02-22  Timothy Wall  <twall@cygnus.com>
4937         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4938         * configure.in: Add objects for elf64_ia64_aix vectors.
4939         * configure: Regenerated.
4940         * configure.host: Recognize ia64-*-aix*.
4941         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
4942         for AIX.  AIX5 requires most relocations to be dynamic (*all*
4943         binaries are somewhat similar to shared libraries).
4944         * targets.c: Add elf64_ia64_aix vectors.
4946 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
4948         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4949         C8 said "1" instead of "8".  Clarify error string for IMM22:
4950         "signed integer" instead of just "integer".
4952 2001-02-20  Andreas Jaeger  <aj@suse.de>
4954         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4955         PLT entries that could serve as a definition for a weak symbol.
4957 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
4959         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4960         entries that could serve as a definition for a weak symbol.
4961         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4963 2001-02-18  David O'Brien  <obrien@FreeBSD>
4965         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4966         FreeBSD/i386-CURRENT differently until I can figure out the needed
4967         corefile changes.
4968         * configure: Regenerate.
4969         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4970         FreeBSD/PowerPC, and FreeBSD/sparc64.
4972 2001-02-18  lars brinkhoff  <lars@nocrew.org>
4974         * Makefile.am: Add PDP-11 a.out target.
4975         * config.bfd: Likewise.
4976         * configure.in: Likewise.
4977         * targets.c: Likewise.
4978         * archures.c: Likewise.
4979         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
4980         * libbfd.h: Add PDP-11 relocations.
4981         * reloc.c: Likewise.
4982         * cpu-pdp11.c: New file.
4983         * pdp11.c: New file.
4985         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4986         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4987         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4988         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4989         (GET_MAGIC): New macro.
4990         (PUT_MAGIC): Likewise.
4991         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4993 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
4995         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4996         multiarch needs it).
4998 2001-02-18  H.J. Lu  <hjl@gnu.org>
5000         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
5001         index.
5003 2001-02-18  Kazu Hirata  <kazu@hxi.com>
5005         * vms-misc.c: Fix formatting.
5007 2001-02-16  Kazu Hirata  <kazu@hxi.com>
5009         * vms.c: Fix formatting.
5011 2001-02-14  H.J. Lu  <hjl@gnu.org>
5013         * elf.c (elf_find_function): New function.
5014         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
5015         the file name and function name.
5017 2001-02-14  Nick Clifton  <nickc@redhat.com>
5019         * ecoff.c (bfd_debug_section): Update to initialise new fields in
5020         asection structure.
5022         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
5023         (BFD64_BACKENDS): Add pepigen.c
5024         Add rules to create peigen.c and pepigen.c from peXXigen.c.
5026         * Makefile.in: Regenerate.
5027         * configure:  Regenerate.
5028         * po/POTFILES.in: Regenerate.
5029         * po/bfd.pot: Regenerate.
5031 2001-02-14  H.J. Lu  <hjl@gnu.org>
5033         * libcoff-in.h (pe_tdata): Add members target_subsystem and
5034         force_minimum_alignment.
5036 2001-02-14  Bo Thorsen  <bo@suse.de>
5038         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
5039         (elf64_86_64_size_info): Struct added to fix a problem
5040         with the hashtable string entries.
5041         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
5042         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
5043         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
5044         remove the FIXME for this.
5045         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
5046         section. Also removed the FIXME for it.
5047         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
5048         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
5049         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
5051 2001-02-13  Richard Henderson  <rth@redhat.com>
5053         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
5054         and not user provided.
5056 2001-02-13  Kazu Hirata  <kazu@hxi.com>
5058         * vms.c (vms_print_symbol): Remove unreachable code.
5060         * rs6000-core.c: Fix formatting.
5062 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
5064         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
5065         as _bfd_XXi_only_swap_filehdr_out.
5066         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
5067         pe->force_minimum_alignment to TRUE.
5068         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
5069         PEI_TARGET_SUBSYSTEM.
5070         (pe_print_private_bfd_data): Call
5071         _bfd_XX_print_private_bfd_data_common() instead of
5072         _bfd_pe_print_private_bfd_data_common().
5073         (pe_bfd_copy_private_bfd_data): Call
5074         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
5075         _bfd_pe_bfd_copy_private_bfd_data_common().
5076         (coff_bfd_copy_private_section_data): Define as
5077         _bfd_XX_bfd_copy_private_section_data instead of
5078         _bfd_pe_bfd_copy_private_section_data.
5079         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
5080         of a _bfd_pe_get_symbol_info.
5082         * peigen.c: Delete.
5084         * peXXigen.c: Renamed from peigen.c.
5085         (COFF_WITH_XX): Define this macro (will get expanded into
5086         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
5087         compiled as peigen.c or pepigen.c.
5088         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
5089         define the canonical PEP structures and definitions.
5090         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
5091         effect, enforce minimum file and section alignments.  If
5092         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
5093         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
5094         so, by default, this is a no-op).
5096         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
5097         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
5098         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
5099         _bfd_pefoo if it's not defined.  Use these macros to define
5100         coff swap macros.
5102         * libcoff.h (pe_tdata): Add members target_subsystem and
5103         force_minimum_alignment.
5105         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
5106         COFF_WITH_pep.
5107         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
5109         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
5110         peigen.lo.
5112         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
5113         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
5114         PEPAOUTHDR.
5116         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
5117         (BFD64_BACKENDS_CFILES): Mention pepigen.c
5118         (peigen.c): Add rule to generate from peXXigen.c.
5119         (pepigen.c): Ditto.
5120         (pepigen.lo): List dependencies for pepigen.lo.
5122 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
5124         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
5125         $global$ referenced but not defined, set its value here.
5127 2001-02-09  Bo Thorsen  <bo@suse.de>
5129         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
5130         alignment to 3.
5131         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
5132         and relocation.
5133         (elf64_x86_64_relocate_section): Fix formatting.
5134         (elf64_x86_64_relocate_section): Fix addend for relocation of
5135         R_X86_64_(8|16|32|PC8|PC16|PC32).
5137 2001-02-12  Jan Hubicka  <jh@suse.cz>
5139         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
5141 2001-02-11  H.J. Lu  <hjl@gnu.org>
5143         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5144         alignment.
5146 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5148         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5149         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
5150         relocations against dynsym symbols.
5152         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5153         the R_MIPS_26 relocation.
5154         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5155         the R_MIPS_26 relocation.
5156         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5157         relocation.
5158         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5159         the R_MIPS_26 relocation.
5160         (mips_elf64_howto_table_rela): Likewise.
5162         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5163         member to mark symbols that have non-CALL relocations against
5164         them.
5165         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5166         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5167         R_MIPS_GOT16.
5168         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5169         non-CALL relocation against it is encountered.
5170         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5171         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5172         no_fn_stub is not set.
5174         * elf32-mips.c (mips_elf_output_extsym): Get the output section
5175         information from the real symbol for indirect ones.
5176         Check no_fn_stub to find out if a symbol has a function stub
5177         indeed.
5179 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5181         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5182         * Makefile.in: Regenerate.
5184 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
5186         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
5187         true if section name is an unwind table section name.
5188         (elfNN_ia64_additional_program_headers): Count each unwind section
5189         separately.
5190         (elfNN_ia64_modify_segment_map): Install one unwind program header
5191         for each unwind separate section.  Note: normally the linker
5192         script merges the unwind sections that go into a single segment,
5193         so this still generates at most one unwind program header per
5194         segment.
5196         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5197         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5198         (elfNN_ia64_fake_sections): Mark sections with names that start
5199         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5200         unwind section.
5202         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5203         Use it to make sh_info in unwind section point to the text section
5204         it applies to.
5206 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5208         * Makefile.am: Add linux target for S/390.
5209         * archures.c: Likewise.
5210         * bfd-in2.h: Likewise.
5211         * config.bfd: Likewise.
5212         * configure.in: Likewise.
5213         * elf.c: Likewise.
5214         * libbfd.h: Likewise.
5215         * targets.c: Likewise.
5216         * cpu-s390.c: New file.
5217         * elf32-s390.c: New file.
5218         * elf64-s390.c: New file.
5220 2001-02-09  Nick Clifton  <nickc@redhat.com>
5222         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5223         ImageBase.  This has already been done by coff_swap_hdr_in.
5225 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
5227         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5229 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
5231         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5232         (sparc64_elf_relocate_section): Likewise.
5234 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
5236         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5237         similar to R_SPARC_32.
5238         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5240 2001-02-08  H.J. Lu  <hjl@gnu.org>
5242         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5243         relocation entries for weak definitions when building DSO with
5244         -Bsymbolic.
5246 2001-02-08  Richard Henderson  <rth@redhat.com>
5248         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5249         before visibility.  Locally defined protected symbols are not
5250         dynamic.
5252 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
5254         * config.bfd: Enable coff64 for rs6000-*.  Patch from
5255         <hzoli@austin.ibm.com>.
5257 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
5259         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5260         found, do not attempt to find dwarf2 info before returning.
5262 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
5264         * elflink.h (is_global_symbol_definition): Rename to
5265         is_global_data_symbol_definition and have it reject function
5266         symbols.
5267         (elf_link_is_defined_archive_symbol): Use renamed function.
5269 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
5271         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5272         * libbfd.h (bfd_target_vector): Likewise.
5273         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5274         make static; create pointer reference named bfd_target_vector.
5275         (_bfd_target_vector_entries): Calculate this based on the array
5276         typed _bfd_target_vector.
5278 2001-02-06  H.J. Lu  <hjl@gnu.org>
5280         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5281         internal symbols are not dynamic.
5282         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5284 2001-02-06  Nick Clifton  <nickc@redhat.com>
5286         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5287         that it will not be pulled into the list of files that make up
5288         po/POTFILES.in.
5289         * Makefile.in: Regenerate.
5290         * po/bfd.pot:  Regenerate.
5292 2001-02-06  H.J. Lu  <hjl@gnu.org>
5294         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5295         checking.
5296         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5297         external_PEI_IMAGE_hdr.
5299 2001-02-06  Kazu Hirata  <kazu@hxi.com>
5301         * elf-m10200.c: Fix formatting.
5303 2001-02-04  Nick Clifton  <nickc@redhat.com>
5305         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5306         rel, it will be handled later on.
5308 2001-02-02  Fred Fish  <fnf@ninemoons.com>
5310         * Makefile.in: Fix typo.
5312 2001-02-01  Kazu Hirata  <kazu@hxi.com>
5314         * elf-m10300.c: Fix formatting.
5316 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
5318         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5319         (elf_backend_get_symbol_type): Define.
5320         (elf64_hppa_object_p): Set architecture and machine from elf
5321         header flags.
5323 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
5325         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5326         before mdebug.
5328 2001-01-26  Richard Henderson  <rth@redhat.com>
5330         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5331         for non-default visibility.
5332         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5333         delete ugly macro and replace with pretty function.
5335 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
5337         * coff-go32.c: Update copyright.
5338         * coff-stgo32.c: Likewise.
5339         * coff-go32.c (COFF_LONG_FILENAMES): Define.
5340         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5341         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5342         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5344 2001-01-25  Kazu Hirata  <kazu@hxi.com>
5346         * bfd-in2.h: Rebuild.
5347         * libbfd.h: Likewise.
5349 2001-01-23  H.J. Lu  <hjl@gnu.org>
5351         * bfd-in2.h: Rebuild.
5353 2001-01-23  H.J. Lu  <hjl@gnu.org>
5355         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5356         is NULL or PRIV(vms_rec) is outside of the buffer.
5358 2001-01-23  Kazu Hirata  <kazu@hxi.com>
5360         * coff64-rs6000.c: Fix formatting.
5361         * coff-arm.c: Likewise.
5362         * coffgen.c: Likewise.
5363         * cofflink.c: Likewise.
5364         * coff-mcore.c: Likewise.
5365         * coff-mips.c: Likewise.
5366         * coff-pmac.c: Likewise.
5367         * coff-ppc.c: Likewise.
5368         * coff-rs6000.c: Likewise.
5369         * elf32.c: Likewise.
5370         * elf32-fr30.c: Likewise.
5371         * elf32-i370.c: Likewise.
5372         * elf32-i860.c: Likewise.
5373         * elf32-m32r.c: Likewise.
5374         * elf32-m68k.c: Likewise.
5375         * elf32-mcore.c: Likewise.
5376         * elf32-ppc.c: Likewise.
5377         * elf32-sh.c: Likewise.
5378         * elf32-v850.c: Likewise.
5379         * elf64-alpha.c: Likewise.
5380         * elf64-sparc.c: Likewise.
5381         * elflink.c: Likewise.
5382         * elflink.h: Likewise.
5383         * elf-m10200.c: Likewise.
5384         * elf-m10300.c: Likewise.
5385         * elfxx-ia64.c: Likewise.
5387         * aoutx.h: Fix formatting.
5388         * bfd.c: Likewise.
5389         * bfd-in2.h: Likewise.
5390         * bfd-in.h: Likewise.
5391         * cpu-i386.c: Likewise.
5392         * cpu-m68hc11.c: Likewise.
5393         * dwarf2.c: Likewise.
5394         * elf64-x86-64.c: Likewise.
5395         * format.c: Likewise.
5396         * freebsd.h: Likewise.
5397         * hash.c: Likewise.
5398         * hp300hpux.c: Likewise.
5399         * hppabsd-core.c: Likewise.
5400         * hpux-core.c: Likewise.
5402 2001-01-22  Bo Thorsen  <bo@suse.de>
5404         * elf64-x86-64.c: Added PIC support for X86-64.
5405         (elf64_x86_64_link_hash_newfunc): Function added.
5406         (elf64_x86_64_link_hash_table_create): Likewise.
5407         (elf64_x86_64_check_relocs): Likewise.
5408         (elf64_x86_64_gc_mark_hook): Likewise.
5409         (elf64_x86_64_gc_sweep_hook): Likewise.
5410         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5411         (elf64_x86_64_size_dynamic_sections): Likewise.
5412         (elf64_x86_64_discard_copies): Likewise.
5413         (elf64_x86_64_finish_dynamic_symbol): Likewise.
5414         (elf64_x86_64_finish_dynamic_sections): Likewise.
5415         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5417 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5419         * Makefile.am (install-data-local): Make use of $(DESTDIR).
5420         * Makefile.in: Regenerate.
5422 2001-01-21  Kazu Hirata  <kazu@hxi.com>
5424         * coff-a29k.c: Fix formatting.
5426 2001-01-19  H.J. Lu  <hjl@gnu.org>
5428         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5429         relocation section names.
5430         (elf_i386_relocate_section): Report files with bad relocation
5431         section names and return false.
5433 2001-01-17  Bo Thorsen  <bo@suse.de>
5435         * targets.c: Alphabetize list of xvecs.
5437 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
5439         * config.bfd: Add linux target variant for elfxx-hppa.
5440         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5441         bfd_elf64_hppa_linux_vec.
5442         * configure: Regenerate.
5443         * elf64-hppa.c: Include elf64-target.h again to support linux
5444         target variant.
5445         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5446         * elf32-hppa.c: Include elf32-target.h again to support linux
5447         target variant.
5448         (elf32_hppa_post_process_headers): New function.
5449         (elf_backend_post_process_headers): Define.
5450         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5451         bfd_elf32_hppa_linux_vec.
5453         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5454         and data_segment_base fields.
5455         (elf32_hppa_link_hash_table_create ): Init them.
5456         (elf32_hppa_check_relocs): Update comments.
5457         (hppa_record_segment_addr): New function.
5458         (elf32_hppa_relocate_section): Call it.
5459         (final_link_relocate): Handle R_PARISC_SEGREL32.
5460         (elf32_hppa_final_link): New function.
5461         (bfd_elf32_bfd_final_link): Define to call it.
5462         (hppa_unwind_entry_compare): New function.
5463         * cache.c (bfd_open_file): Create files in write+read mode.
5465         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5466         SEGREL32 and numerous other relocs.  Change duplicate
5467         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5469         * opncls.c (bfd_fdopenr): Add parens like the comment says around
5470         O_ACCMODE.
5472         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5473         .plt entries for DT_INIT and DT_FINI.
5474         (elf32_hppa_finish_dynamic_sections): Remove special handling of
5475         DT_INIT and DT_FINI.
5477         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5478         offsets for stub .plt access if wide mode.  Check offset in range.
5480 2001-01-13  Nick Clifton  <nickc@redhat.com>
5482         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5483         line.
5485         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5486         line.
5488 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
5490         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5491         * configure: Regenerate.
5493 2001-01-11  Peter Targett  <peter.targett@arccores.com>
5495         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5496         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5497         * cpu-arc.c (arch_info_struct): Add entries for variants.
5498         (bfd_arc_arch) Set default to bfd_mach_arc_5.
5499         (arc_get_mach) Don't assume machine names prefixed arc- before
5500         testing.
5501         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5502         selections.
5503         (arc_elf_final_write_processing) Likewise.
5504         (ELF_MACHINE_CODE) Use EM_ARC.
5506 2001-01-10  Nick Clifton  <nickc@redhat.com>
5508         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5510 2001-01-07  Philip Blundell  <philb@gnu.org>
5512         * README: Replace `bug-gnu-utils@gnu.org' with
5513         `bug-binutils@gnu.org'.
5515 2001-01-04  Kazu Hirata  <kazu@hxi.com>
5517         * som.c: Fix formatting.
5519 2001-01-03  Kazu Hirata  <kazu@hxi.com>
5521         * ecoffswap.h: Fix formatting.
5522         * elf-bfd.h: Likewise.
5523         * elfarm-nabi.c: Likewise.
5524         * elfarm-oabi.c: Likewise.
5525         * elfcode.h: Likewise.
5526         * elfcore.h: Likewise.
5527         * elflink.c: Likewise.
5528         * elflink.h: Likewise.
5529         * elfxx-ia64.c: Likewise.
5530         * elfxx-target.h: Likewise.
5531         * libbfd.c: Likewise
5532         * linker.c: Likewise.
5533         * lynx-core.c: Likewise.
5535 2001-01-02  Kazu Hirata  <kazu@hxi.com>
5537         * pc532-mach.c: Fix formatting.
5538         * pe-arm.c: Likewise.
5539         * pe-i386.c: Likewise.
5540         * pe-mips.c: Likewise.
5541         * pe-ppc.c: Likewise.
5542         * pe-sh.c: Likewise.
5543         * pei-mips.c: Likewise.
5544         * pei-sh.c: Likewise.
5545         * peicode.h: Likewise.
5546         * ppcboot.c: Likewise.
5547         * ptrace-core.c: Likewise.
5549 2001-01-01  Kazu Hirata  <kazu@hxi.com>
5551         * reloc.c: Fix formatting.
5552         * riscix.c: Likewise.
5553         * rs6000-core.c: Likewise.
5554         * xcoff-target.h: Likewise.
5556 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5558         * elfcode.h (elf_object_p): Also restore the bfd mach field on
5559         error, by calling bfd_default_set_arch_mach with incoming
5560         values.
5562 2000-12-26  Kazu Hirata  <kazu@hxi.com>
5564         * vaxnetbsd.c: Fix formatting.
5565         * versados.c: Likewise.
5566         * vms-gsd.c: Likewise.
5567         * vms-hdr.c: Likewise.
5568         * vms-misc.c: Likewise.
5570 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
5572         * archive.c (coff_write_armap): Don't write more than symbol_count
5573         `archive_member_file_ptr's.
5575 2000-12-25  Kazu Hirata  <kazu@hxi.com>
5577         * vms-tir.c: Fix formatting.
5579 2000-12-23  Kazu Hirata  <kazu@hxi.com>
5581         * vms.c: Fix formatting.
5582         * vms.h: Likewise.
5584 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
5586         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5588         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5590         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5591         arithmetic.
5593         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5595         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5597 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
5599         * libbfd.c (bfd_get_bits): Added
5600         (bfd_put_bits): Likewise
5601         * bfd-in.h: Declared the above.
5602         * bfd-in2.h: Regenerated.
5604 2000-12-20  Kazu Hirata  <kazu@hxi.com>
5606         * targets.c: Fix formatting.
5607         * tekhex.c: Likewise.
5608         * trad-core.c: Likewise.
5610 2000-12-19  Kazu Hirata  <kazu@hxi.com>
5612         * sco5-core.c: Fix formatting.
5613         * section.c: Likewise.
5614         * sparclinux.c: Likewise.
5615         * sparclynx.c: Likewise.
5616         * sparcnetbsd.c: Likewise.
5617         * srec.c: Likewise.
5618         * stabs.c: Likewise.
5619         * stab-syms.c: Likewise.
5620         * sunos.c: Likewise.
5621         * syms.c: Likewise.
5622         * sysdep.h: Likewise.
5624 2000-12-18  Nick Clifton  <nickc@redhat.com>
5626         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5627         defined.
5628         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5629         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5631 2000-12-18  Nick Clifton  <nickc@redhat.com>
5633         * vms-misc.c (_bfd_vms_get_record): Add default case to
5634         file_format switch.
5636 2000-12-15  Miloslav Trmac <mitr@volny.cz>
5638         * elfcore.h (elf_core_file_p): Move to the start of the program
5639         headers before attempting to read them.
5641 2000-12-14  Kazu Hirata  <kazu@hxi.com>
5643         * peigen.c: Fix formatting.
5644         * som.c: Likewise.
5645         * som.h: Likewise.
5647 2000-12-13  Kazu Hirata  <kazu@hxi.com>
5649         * peigen.c: Fix formatting.
5651 2000-12-12  Jim Wilson  <wilson@redhat.com>
5653         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5655 2000-12-08  Mark Salter  <msalter@redhat.com>
5657         * binary.c (binary_set_section_contents): Ignore sections
5658         with zero size.
5660 2000-12-12  Kazu Hirata  <kazu@hxi.com>
5662         * m68klinux.c: Fix formatting.
5663         * m68knetbsd.c: Likewise.
5664         * mipsbsd.c: Likewise.
5665         * netbsd-core.c: Likewise.
5666         * netbsd.h: Likewise.
5667         * newsos3.c: Likewise.
5668         * nlm32-alpha.c: Likewise.
5669         * nlm32-i386.c: Likewise.
5670         * nlm32-ppc.c: Likewise.
5671         * nlm32-sparc.c: Likewise.
5672         * nlmcode.h: Likewise.
5673         * nlmswap.h: Likewise.
5674         * nlm-target.h: Likewise.
5675         * ns32knetbsd.c: Likewise.
5677 2000-12-10  Fred Fish  <fnf@be.com>
5679         * elflink.h (elf_link_output_extsym): Don't complain about undefined
5680         symbols in shared objects if allow_shlib_undefined is true.
5682 2000-12-12  Nick Clifton  <nickc@redhat.com>
5684         * cpu-sh.c: Fix formattng.
5685         * elf.c: Fix formattng.
5686         * elf32-mips.c: Fix formattng.
5687         * elf32-sh.c: Fix formattng.
5688         * elf64-alpha.c: Fix formattng.
5690 2000-12-09  Nick Clifton  <nickc@redhat.com>
5692         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5693         dwarf2_find_line_info as last parameter to invocation of
5694         _bfd_dwarf2_find_nearest_line.
5695         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5696         dwarf2_find_line_info as last parameter to invocation of
5697         _bfd_dwarf2_find_nearest_line.
5699 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
5701         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5702         (BFD_LIBS): ...to here.
5703         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5704         (BFD_LIBS_CFILES): ...to here.
5705         * Makefile.in: Regenerate.
5706         * configure.in: Remove dwarf.lo from the elf shell variable.
5707         * configure: Regenerate.
5708         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5709         * libcoff.h: Regenerate.
5710         * coffgen.c (coff_find_nearest_line): Call
5711         _bfd_dwarf2_find_nearest_line.
5712         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5713         accordingly.
5714         (read_abbrevs): Likewise
5715         (decode_line_info): Likewise.
5716         (parse_comp_unit): Likewise.
5717         (comp_unit_find_nearest_line): Likewise.
5718         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5719         * libbfd.h: Regenerate.
5720         * elf.c (_bfd_elf_find_nearest_line): Update call.
5721         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5722         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5723         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5724         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5725         (styp_to_sec_flags): Handle DWARF2 sections.
5726         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5727         to _bfd_find_nearest_line.
5728         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5729         call to _bfd_find_nearest_line.
5731 2000-12-08  Kazu Hirata  <kazu@hxi.com>
5733         * coffgen.c: Fix formatting.
5734         * elf-m10300.c: Likewise.
5735         * elf32-i386.c: Likewise.
5736         * elf32-i960.c: Likewise.
5737         * elf32-m68k.c: Likewise.
5738         * elf32-mcore.c: Likewise.
5739         * elf32-ppc.c: Likewise.
5740         * elf32-sh.c: Likewise.
5741         * elf32-sparc.c: Likewise.
5742         * elf32-v850.c: Likewise.
5743         * elf64-alpha.c: Likewise.
5744         * elf64-hppa.c: Likewise.
5745         * elf64-mips.c: Likewise.
5746         * elf64-sparc.c: Likewise.
5748 2000-12-07  Kazu Hirata  <kazu@hxi.com>
5750         * elf32-ppc.c: Fix formatting.
5751         * elf64-x86-64.c: Likewise.
5753 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
5755         From  Ralf Baechle  <ralf@gnu.org>
5757         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5758         BFDs containing no sections or empty .text, .data or .bss sections
5759         to be merged, regardless of their flags.
5761 2000-12-06  Kazu Hirata  <kazu@hxi.com>
5763         * elf32-m32r.c: Fix formatting.
5764         * elf32-m68hc11.c: Likewise.
5765         * elf32-m68hc12.c: Likewise.
5766         * elf32-m68k.c: Likewise.
5767         * elf32-mcore.c: Likewise.
5768         * elf32-pj.c: Likewise.
5769         * elf32-ppc.c: Likewise.
5771 2000-12-05  Kazu Hirata  <kazu@hxi.com>
5773         * elf32-fr30.c: Fix formatting.
5774         * elf32-hppa.c: Likewise.
5775         * elf32-i370.c: Likewise.
5776         * elf32-i386.c: Likewise.
5777         * elf32-i860.c: Likewise.
5778         * elf32-i960.c: Likewise.
5780 2000-12-03  Kazu Hirata  <kazu@hxi.com>
5782         * elf32-arm.h: Fix formatting.
5783         * elf32-avr.c: Likewise.
5784         * elf32-cris.c: Likewise.
5785         * elf32-d10v.c: Likewise.
5786         * elf32-d30v.c: Likewise.
5787         * elf-hppa.h: Likewise.
5788         * elf-m10200.c: Likewise.
5789         * elf-m10300.c: Likewise.
5791 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
5793         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5794         bfd_mach_mips32_4k.  Update FIXME comment.
5795         * archures.c (bfd_mach_mips32): New constant.
5796         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5797         the latter, renumber it.
5798         * bfd-in2.h (bfd_mach_mips32): New constant.
5799         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5800         the latter, renumber it.
5801         * cpu-mips.c (I_mips32): New constant.
5802         (I_mips4K, I_mips32_4k): Rename the former to the latter.
5803         (arch_info_struct): Add bfd_mach_mips32 entry, replace
5804         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5805         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5806         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
5807         with E_MIPS_MACH_MIPS32_4K.
5808         (_bfd_mips_elf_final_write_processing): Replace
5809         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5810         bfd_mach_mips32 case.
5811         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5812         comparison with support for MIPS32.
5813         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5814         MIPS32.
5816         * aoutx.h (NAME(aout,machine_type)): Add cases for
5817         bfd_mach_mips5 and bfd_mach_mips64.
5818         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5819         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5820         * cpu_mips.c (I_mips5, I_mips64): New definitions.
5821         (arch_info_struct): Add entries for bfd_mach_mips5 and
5822         bfd_mach_mips64.
5823         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5824         _bfd_mips_elf_print_private_bfd_data): Add cases for
5825         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5826         (_bfd_mips_elf_final_write_processing): Add cases for
5827         bfd_mach_mips5 and bfd_mach_mips64.
5829         * aoutx.h (NAME(aout,machine_type)): Add a
5830         bfd_mach_mips_sb1 case.
5831         * archures.c (bfd_mach_mips_sb1): New constant.
5832         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5833         * cpu-mips.c (I_sb1): New constant.
5834         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5835         * elf32-mips.c (elf_mips_mach): Add case for
5836         E_MIPS_MACH_SB1.
5837         (_bfd_mips_elf_final_write_processing): Add case for
5838         bfd_mach_mips_sb1.
5840 2000-12-01  Joel Sherrill <joel@OARcorp.com>
5842         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5843         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5844         (sparc*-*-rtems*): Switched from a.out to ELF.
5846 2000-11-30  Jan Hubicka  <jh@suse.cz>
5848         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5849         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5850         (elf64-x86-64.lo): Add dependencies.
5851         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5852         bfd_mach_x86_64_intel_syntax.
5853         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5854         * config.bfd (x86_64): Add.
5855         * configure.in: Add support for bfd_elf64_x86_64_vec.
5856         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5857         (bfd_i386_arch, i8086_ar): Link in.
5858         * elf64-x86-64.c: New file.
5859         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5860         * targets.c (bfd_elf64_x86_64_vec): Add.
5861         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5863 2000-11-30  Kazu Hirata  <kazu@hxi.com>
5865         * xcofflink.c: Fix formatting.
5867 2000-11-28  Kazu Hirata  <kazu@hxi.com>
5869         * aoutx.h: Fix formatting.
5870         * bfd-in.h: Likewise.
5871         * bfd-in2.h: Likewise.
5872         * cache.c: Likewise.
5873         * cisco-core.c: Likewise.
5874         * coff64-rs6000.c: Likewise.
5875         * coffcode.h: Likewise.
5876         * coffswap.h: Likewise.
5877         * corefile.c: Likewise.
5878         * elf32-mips.c: Likewise.
5880 2000-11-27  Kazu Hirata  <kazu@hxi.com>
5882         * aout-adobe.c: Fix formatting.
5883         * coff64-rs6000.c: Likewise.
5884         * coffgen.c: Likewise.
5885         * cofflink.c: Likewise.
5887 2000-11-27  Philip Blundell  <pb@futuretv.com>
5889         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5890         (obj_coff_strings_written): New accessor macro for above.
5891         * libcoff.h: Regenerate.
5892         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5893         strings.
5894         * coffcode.h (coff_write_object_contents): No need to write out
5895         the string table if it's already been done.
5897 2000-11-22  Philip Blundell  <pb@futuretv.com>
5899         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5900         weak undefined symbols.
5902 2000-11-24  Nick Clifton  <nickc@redhat.com>
5904         * archures.c (bfd_mach_arm_5TE): Define.
5905         (bfd_mach_arm+XScale): Define.
5906         * bfd-in2.h: Regenerate.
5908         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5909         BFD_RELOC_ARM_PCREL_BLX.
5911         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5912         XScale machine numbers.
5914         * config.bfd (xscale-elf): Add target.
5915         (xscale-coff): Add target.
5917         * cpu-arm.c: Add xscale machine name.
5918         Add v5t, v5te and XScale machine numbers.
5920 2000-11-23  Kazu Hirata  <kazu@hxi.com>
5922         * aix386-core.c: Fix formatting.
5924 2000-11-22  Jim Wilson  <wilson@redhat.com>
5926         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5927         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5928         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5929         (ins_imms_scaled): Initialize sign_bit at function entry.
5930         (elf64_ia64_operands): Add missing initializers.
5931         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5932         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5933         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5934         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5935         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5936         parameters.
5937         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5938         and free_extsyms at function entry.
5939         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5940         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5941         (get_got): Delete unused local srel.
5942         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5943         (elfNN_ia64_relocate_section): Delete unused local dynindx.
5945 2000-11-21  Kazu Hirata  <kazu@hxi.com>
5947         * coff-a29k.c: Fix formatting.
5948         * coff-h8500.c: Likewise.
5949         * coff-i960.c: Likewise.
5950         * coff-ppc.c: Likewise.
5951         * coff-rs6000.c: Likewise.
5952         * coff-stgo32.c: Likewise.
5953         * coff-tic54x.c: Likewise.
5954         * coff-w65.c: Likewise.
5955         * cpu-h8500.c: Likewise.
5956         * cpu-hppa.c: Likewise.
5957         * cpu-ns32k.c: Likewise.
5958         * ecoff.c: Likewise.
5959         * ecofflink.c: Likewise.
5961 2000-11-21  Nick Clifton  <nickc@redhat.com>
5963         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5964         remove possibility of infinite loop.
5966 2000-11-20  Kazu Hirata  <kazu@hxi.com>
5968         * aix386-core.c: Fix formatting.
5969         * aout-adobe.c: Likewise.
5970         * aout-arm.c: Likewise.
5971         * aout-encap.c: Likewise.
5972         * aout-ns32k.c: Likewise.
5973         * aout-target.h: Likewise.
5974         * aout-tic30.c: Likewise.
5975         * aoutf1.h: Likewise.
5976         * aoutx.h: Likewise.
5977         * archive.c: Likewise.
5978         * bfd-in.h: Likewise.
5979         * bfd-in2.h: Likewise.
5980         * bfd.c: Likewise.
5981         * bout.c: Likewise.
5983 2000-11-17  H.J. Lu  <hjl@gnu.org>
5985         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5986         pltoff entries for DT_INIT and DT_FINI.
5987         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5988         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5989         entries.
5991 2000-11-16  Richard Henderson  <rth@redhat.com>
5993         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5994         (allocate_dynrel_entries): Likewise.
5995         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
5996         (set_pltoff_entry): Likewise.
5997         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5998         (elfNN_ia64_reloc_type_lookup): Likewise.
5999         (elfNN_ia64_install_value): Likewise.
6000         (elfNN_ia64_relocate_section): Likewise.
6001         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
6002         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
6004 2000-11-16  Kazu Hirata  <kazu@hxi.com>
6006         * cpu-a29k.c: Fix formatting.
6007         * cpu-alpha.c: Likewise.
6008         * cpu-arm.c: Likewise.
6009         * cpu-avr.c: Likewise.
6010         * cpu-d10v.c: Likewise.
6011         * cpu-h8500.c: Likewise.
6012         * cpu-hppa.c: Likewise.
6013         * cpu-i370.c: Likewise.
6014         * cpu-i386.c: Likewise.
6015         * cpu-i960.c: Likewise.
6016         * cpu-ia64-opc.c: Likewise.
6017         * cpu-ia64.c: Likewise.
6018         * cpu-m32r.c: Likewise.
6019         * cpu-m68hc11.c: Likewise.
6020         * cpu-m68hc12.c: Likewise.
6021         * cpu-m68k.c: Likewise.
6022         * cpu-m88k.c: Likewise.
6023         * cpu-mips.c: Likewise.
6024         * cpu-ns32k.c: Likewise.
6025         * cpu-pj.c: Likewise.
6026         * cpu-powerpc.c: Likewise.
6027         * cpu-sh.c: Likewise.
6028         * cpu-sparc.c: Likewise.
6029         * cpu-tic54x.c: Likewise.
6030         * cpu-v850.c: Likewise.
6031         * cpu-vax.c: Likewise.
6032         * cpu-w65.c: Likewise.
6033         * cpu-we32k.c: Likewise.
6034         * cpu-z8k.c: Likewise.
6035         * dwarf1.c: Likewise.
6036         * dwarf2.c: Likewise.
6038 2000-11-15  Kazu Hirata  <kazu@hxi.com>
6040         * coff-arm.c: Fix formatting.
6041         * coff-ppc.c: Likewise.
6042         * coff-rs6000.c: Likewise.
6043         * coff-sh.c: Likewise.
6044         * coff-sparc.c: Likewise.
6045         * coff-tic30.c: Likewise.
6046         * coff-tic54x.c: Likewise.
6047         * coff-tic80.c: Likewise.
6048         * coff-w65.c: Likewise.
6049         * coff-we32k.c: Likewise.
6050         * coff-z8k.c: Likewise.
6052 2000-11-15  Richard Henderson  <rth@redhat.com>
6054         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
6055         section with the same ALLOC|LOAD flags as the source section.
6057 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
6059         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
6060         by STO_ALPHA constants.
6062 2000-11-14  Kazu Hirata  <kazu@hxi.com>
6064         * coff-pmac.c: Fix formatting.
6065         * coff-ppc.c: Likewise.
6067 2000-11-13  H.J. Lu  <hjl@gnu.org>
6069         * elflink.h (elf_link_add_object_symbols): Also add indirect
6070         symbols for common symbols with the default version.
6072 2000-11-09  Philip Blundell  <pb@futuretv.com>
6074         * section.c (STD_SECTION): Set gc_mark flag.
6076 2000-11-11  Kazu Hirata  <kazu@hxi.com>
6078         * coff-i960.c: Likewise.
6079         * coff-m68k.c: Likewise.
6080         * coff-m88k.c: Likewise.
6081         * coff-mcore.c: Likewise.
6082         * coff-mips.c: Likewise.
6084 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
6086         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
6088 2000-11-10  Kazu Hirata  <kazu@hxi.com>
6090         * coff-h8300.c: Fix formatting.
6091         * coff-h8500.c: Likewise.
6092         * coff-i386.c: Likewise.
6093         * coff-i860.c: Likewise.
6094         * coff-i960.c: Likewise.
6095         * coff-ia64.c: Likewise.
6097 2000-11-09  Kazu Hirata  <kazu@hxi.com>
6099         * archive.c: Fix formatting.
6100         * archures.c: Likewise.
6102 2000-11-07  Richard Henderson  <rth@redhat.com>
6104         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
6105         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
6106         * section.c (bfd_set_section_contents): Call memcpy if
6107         section->contents set and location not equal to contents plus offset.
6109 2000-11-08  Kazu Hirata  <kazu@hxi.com>
6111         * bfd-in.h: Fix formatting.
6112         * bfd-in2.h: Likewise.
6113         * bfd.c: Likewise.
6114         * binary.c: Likewise.
6115         * bout.c: Likewise.
6116         * coff-a29k.c: Likewise.
6117         * coff-alpha.c: Likewise.
6118         * coff-apollo.c: Likewise.
6119         * coff-aux.c: Likewise.
6121 2000-11-07  Kazu Hirata  <kazu@hxi.com>
6123         * aix386-core.c: Fix formatting.
6124         * aoutf1.h: Likewise.
6125         * aoutx.h: Likewise.
6126         * archures.c: Likewise.
6127         * armnetbsd.c: Likewise.
6129 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
6131         * coff-h8300.c (special): Adjust reloc address.
6133 2000-11-06  Steve Ellcey <sje@cup.hp.com>
6135         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
6136         to differentiate elf32 and elf64 on ia64.
6137         * bfd-in2.h: Regenerate.
6138         * config.bfd: Add target for "ia64*-*-hpux*".
6139         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
6140         * configure: Regenerate.
6141         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
6142         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
6144         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6145         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
6146         * Makefile.in: Regnerate.
6147         * elf64-ia64.c: Deleted.
6148         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6150 2000-11-06  Kazu Hirata  <kazu@hxi.com>
6152         * aout-adobe.c: Fix formatting.
6153         * aout-arm.c: Likewise.
6154         * aout-cris.c: Likewise.
6155         * aout-encap.c: Likewise.
6156         * aout-ns32k.c: Likewise.
6157         * aout-target.h: Likewise.
6158         * aout-tic30.c: Likewise.
6160 2000-11-05  Philip Blundell  <philb@gnu.org>
6162         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6163         BFDs containing no sections to be merged, regardless of their flags.
6165 2000-11-04  Philip Blundell  <philb@gnu.org>
6167         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6168         if a relocation for an undefined symbol also results in an
6169         overflow.
6171 2000-11-06  Christopher Faylor <cgf@cygnus.com>
6173         * config.bfd: Add support for Sun Chorus.
6175 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
6177         * configure.in: Recognize alpha-*-freebsd*.
6178         * configure: Regenerate.
6180 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
6182         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6183         (Chunk): New global variable set by a parameter in objcopy.c.
6184         (S3Forced): New global variable set by a parameter in
6185         objcopy.c.
6186         (srec_set_section_contents): If S3Forced is true, always generate
6187         S3 records.
6188         (srec_write_section): Use 'Chunk' to limit maximum length of S
6189         records.
6191 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
6193         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6194         * Makefile.in: Regenerate.
6195         * bfd-in2.h: Regenerate.
6196         * po/bfd.pot: Regenerate.
6198 2000-10-31  Philip Blundell  <philb@gnu.org>
6200         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6201         EF_SOFT_FLOAT if it is defined.
6203 2000-10-27  Philip Blundell  <philb@gnu.org>
6205         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6206         attempts to mix PIC code with non-PIC, just mark the output as
6207         being position dependent.
6208         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
6209         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
6210         all mismatches, not just the first one.
6212 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
6214         * ieee.c (ieee_archive_p): Plug one of many possible
6215         memory leaks in error handling.
6217 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
6219         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6220         elf32_sparc_object_p, elf32_sparc_final_write_processing):
6221         Support v8plusb.
6222         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6223         sparc64_elf_object_p): Support v9b.
6224         * archures.c: Declare v8plusb and v9b machines.
6225         * bfd-in2.h: Ditto.
6226         * cpu-sparc.c: Ditto.
6228 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
6230         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6231         of a GOT reloc.
6233         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6234         (SYMBOL_CALLS_LOCAL): New macro.
6235         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6236         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6237         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6238         (ppc_elf_relocate_section): Use flag variable to determine
6239         whether the relocation refers to a local symbol.
6240         Test whether a PLTREL24 reloc will produce a reloc by looking
6241         to see whether a PLT entry was made.
6243 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
6245         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6246         entries that could serve as a definition for a weak symbol.
6248 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
6250         From  Ralf Baechle  <ralf@gnu.org>
6252         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6253         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
6254         against local symbols.
6255         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6257 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
6259         * section.c (struct sec): Add kept_section.
6260         (struct bfd_comdat_info): Remove sec, we can use above.
6261         (STD_SECTION): Add initializer.
6262         (bfd_make_section_anyway): Init here too.
6264         * bfd-in2.h: Regenerate.
6266         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6267         zeroing of `flags'.
6268         (elf_link_input_bfd): Set all asection->symbol->value's here, and
6269         fudge values for discarded link-once section symbols.
6271         * elf64-hppa.c: Include alloca-conf.h
6273 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
6275         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6277         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6279 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
6281         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6283 2000-10-10  Tom Rix <trix@redhat.com>
6285         * section.c (bfd_make_section_anyway): Release newsect ptr when
6286         newsect->symbol fails to alloc.  Use bfd_release instead of free.
6288 2000-10-09  Richard Henderson  <rth@cygnus.com
6290         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6291         (elf64_ia64_unwind_entry_compare): New.
6292         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6294 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
6296         * elflink.h (size_dynamic_sections): Don't create various tags if
6297         .dynstr is excluded from the link.  Don't set first dynsym entry
6298         if dynsymcount is zero.
6299         (elf_bfd_final_link): Don't try to swap out dynamic syms if
6300         .dynsym excluded from the link.  Don't try to write any dynamic
6301         sections excluded from the link.
6303         * elf.c (swap_out_syms): Handle global section symbols.
6305 2000-10-05  DJ Delorie  <dj@redhat.com>
6307         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6308         * coffcode.h (coff_set_alignment_hook): read extended reloc count
6309         (coff_write_relocs): write extended reloc count
6310         (coff_write_object_contents): account for extended relocs
6312 2000-10-05  Jim Wilson  <wilson@cygnus.com>
6314         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6315         field.
6316         * elf.c (_bfd_elf_make_section_from_shdr): Call the
6317         elf_backend_section_flags function.
6318         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6319         code.
6320         (elf64_ia64_section_flags): New function containing flag conversion
6321         code.
6322         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6323         * elfxx-target.h (elf_backend_section_flags): Define.
6324         (elfNN_bed): Initialize elf_backend_section_flags field.
6326 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
6328         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6329         _bfd_elf32_gc_record_vtable.  Correct a comment.
6331 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
6333         From  Ralf Baechle  <ralf@gnu.org>
6335         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6336         produces binaries with got[1] = 0x80000001 to differenciate them
6337         for the dynamic linker from the broken binaries produced by old
6338         versions.
6340 2000-09-30  Petr Sorfa <petrs@sco.com>
6342         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6343         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6344         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6345         * configure: Regenerate.
6347 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
6349         Define two bfd_targets for absence and presence of leading
6350         underscore on symbols.  Make sure to only link same kind.
6351         * elf32-cris.c (cris_elf_object_p,
6352         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6353         cris_elf_merge_private_bfd_data): New.
6354         (elf_backend_object_p, elf_backend_final_write_processing,
6355         bfd_elf32_bfd_print_private_bfd_data,
6356         bfd_elf32_bfd_merge_private_bfd_data): Define.
6357         <Target vector definition>: Include elf32-target.h twice with
6358         different macro settings:
6359         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6360         bfd_elf32_us_cris_vec.
6361         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6362         (elf_symbol_leading_char): First as 0, then '_'.
6363         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6364         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6365         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6366         * configure: Regenerate.
6367         * targets.c: Declare bfd_elf32_us_cris_vec.
6368         * po/bfd.pot: Regenerate.
6370 2000-09-29  Momchil Velikov  <velco@fadata.bg>
6372         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6373         R_ARM_THM_PC22 relocations.
6375 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
6377         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6379 2000-09-29  Momchil Velikov <velco@fadata.bg>
6381         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6382         is has the SEC_HAS_CONTENTS flag set.
6384 2000-09-28  ï¿½Ã–rjan Friberg  <orjanf@axis.com>
6385             Hans-Peter Nilsson  <hp@axis.com>
6387         * aout-cris.c (N_TXTADDR): Define.
6389 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
6391         * som.c: Include alloca-conf.h.
6392         * Makefile.am: "make dep-am"
6393         * Makefile.in: Regenerate.
6395 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
6397         * elf32-hppa.c (plt_stub): New.
6398         (PLT_STUB_ENTRY): Define.
6399         (elf32_hppa_link_hash_table): Change multi_subspace to packed
6400         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
6401         (elf32_hppa_link_hash_table_create): Init to suit.
6402         (elf32_hppa_check_relocs): Set has_12bit_branch and
6403         has_17bit_branch as appropriate.
6404         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
6405         non-local functions.
6406         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
6407         Add space for plt_stub as needed.
6408         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6409         functions at plt_stub.
6410         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6411         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6413         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6414         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
6415         of fixed size, and if negative, disable handling of input sections
6416         before stub section.  Set up default stub group size depending
6417         on detected branch relocs.
6418         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6419         ensure different offsets from sym_value aren't rounded to
6420         different 2k blocks.  Use lrsel and rrsel for other stubs too for
6421         consistency rather than necessity.
6422         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6423         (final_link_relocate): Likewise.
6424         (elf32_hppa_relocate_section): Likewise.
6426         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6427         (_bfd_elf_hppa_gen_reloc_type): Generate them.
6428         (elf_hppa_final_link_relocate): Handle them.
6429         (elf_hppa_relocate_insn): Likewise.
6430         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6432 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
6434         * elfcode.h (elf_object_p): Preserve and clear abfd section
6435         information.  Restore at error.
6437 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
6439         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6440         is empty, make sure that its rva also 0. NT loader dislikes
6441         having otherwise.
6443 2000-09-26  Steve Ellcey <sje@cup.hp.com>
6445         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6446         global by default.
6448 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
6450         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6451         currently unused RELATIVE_DYNAMIC_RELOCS code.
6452         (hppa_discard_copies): Likewise.
6453         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
6454         comments.  Don't check non-code output sections for stub grouping.
6456 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
6458         * section.c (bfd_get_unique_section_name): Return NULL if
6459         bfd_malloc fails.
6461 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6463         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6464         instruction sequence to actually work.
6465         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6466         accordingly.
6468 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
6470         * elf32-sh.c (sh_elf_relocate_section): Use
6471         _bfd_final_link_relocate to apply the relocation against a section
6472         symbol, when doing relocatable links.
6474 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
6476         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6477         to id_sec.
6478         (stub_hash_newfunc): Here too.
6479         (hppa_add_stub): And here.
6480         (elf32_hppa_link_hash_table): Remove stub_section_created,
6481         reloc_section_created, first_init_sec and first_fini_sec.  Add
6482         stub_group.
6483         (elf32_hppa_link_hash_table_create): Init to suit.
6484         (hppa_get_stub_entry): Add support for grouping stub sections.
6485         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
6486         section code.  Index stub vars by section->id.
6487         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
6488         exit paths.  Zap allocation of above removed vars.  Refine
6489         link-once test.
6491         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6492         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6493         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6494         rather than pointer to bfd_link_info.
6495         (hppa_add_stub): Likewise.
6496         (final_link_relocate): Likewise.
6498 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
6500         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6501         link-once sections.
6503 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
6505         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6506         ld/emulparams/shelf.sh.
6508 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6510         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6511         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6512         * bfd-in2.h: Regenerate.
6514 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
6516         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6517         LITUSE relocations incorrectly if -relax is specified on the ld
6518         command line and the displacement field of the load or store
6519         instruction is non-zero. (Patch by paul.winalski@compaq.com)
6521 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
6523         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6524         first_fini_sec here.
6525         (elf32_hppa_size_stubs): Instead correctly find the first .init
6526         and .fini section here.
6528 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
6530         * elf32-hppa.c (clobber_millicode_symbols): New function.
6531         (elf32_hppa_size_dynamic_sections): Call it.
6533 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
6535         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6536         packed.  Add plabel, plt_abs packed booleans.
6537         (hppa_link_hash_newfunc): Init new fields.
6538         (PLABEL_PLT_ENTRY_SIZE): Define.
6539         (hppa_stub_name): Use size_t len vars.
6540         (hppa_add_stub): Likewise.
6541         (elf32_hppa_build_stubs): Likewise.
6542         (hppa_build_one_stub): Kill some compiler warnings.
6543         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6544         if dynamic linking.  Munge the local plt offsets into
6545         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
6546         size_t len vars.  Add assert for plabel addend.
6547         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6548         (elf32_hppa_hide_symbol): New function.
6549         (elf_backend_hide_symbol): Define.
6550         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6551         with h->plabel set.  Don't make plt entries to have dynamic syms
6552         when they have been forced local.  If plt entry is used by a
6553         plabel, make it PLABEL_PLT_ENTRY_SIZE.
6554         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6555         Set up .plt offsets for local syms.
6556         (elf32_hppa_relocate_section): Initialise plt entries for local
6557         syms.  Leave weak undefined plabels zero.  Make global plabel
6558         relocs against function symbol, and leave the addend zero.
6559         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6560         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6561         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
6562         relocs instead of SEGREL32 for dynamic got relocs.
6563         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6564         (elf_backend_got_header_size): Adjust.
6565         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6567         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6568         (hppa_type_of_stub): Use it instead of #if 0
6569         (hppa_discard_copies): Use it here too.
6570         (elf32_hppa_size_dynamic_sections): And here.
6572         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6573         (elf32_hppa_link_hash_table_create): And here.
6574         (hppa_build_one_stub): And here.  Instead keep track of stub
6575         offset using _raw_size.
6576         (elf32_hppa_size_stubs): Likewise.
6577         (elf32_hppa_build_stubs): Likewise.
6578         (hppa_size_one_stub): Likewise.  Resize reloc section too.
6580         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6581         first_fini_sec handling.  Don't search for reloc section or set
6582         hplink->reloc_section_created here.
6583         (elf32_hppa_size_stubs): Instead search for reloc sections, and
6584         set reloc_section_created here.
6585         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6586         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6587         and DT_FINI.
6588         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6590         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6591         with `hplink->root.'.
6592         (elf32_hppa_check_relocs): Likewise.
6593         (elf32_hppa_gc_sweep_hook): Likewise.
6594         (elf32_hppa_adjust_dynamic_symbol): Likewise.
6595         (hppa_handle_PIC_calls): Likewise.
6596         (elf32_hppa_size_dynamic_sections): Likewise.
6597         (elf32_hppa_set_gp): Likewise.
6598         (elf32_hppa_relocate_section): Likewise.
6599         (elf32_hppa_finish_dynamic_symbol): Likewise.
6600         (elf32_hppa_finish_dynamic_sections): Likewise.
6602         From  David Huggins-Daines  <dhd@linuxcare.com>
6603         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6604         defined weak symbols in shared links.
6605         (final_link_relocate): Calls to defined weak symbols in shared
6606         objects must go via import stubs, as the target might not be known
6607         at link time.
6609 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
6611         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6612         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6613         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
6614         the original entries with EMPTY_HOWTOs, and added new ones to fill
6615         in the gap.
6616         (sh_elf_info_to_howto): Make sure the new gap isn't used.
6617         (sh_elf_relocate_section): Likewise.
6619 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
6621         * cpu-mips.c (arch_info_struct): Add mips:4K
6622         * bfd-in2.h (bfd_mach_mips4K): New define.
6623         * archures.c: Add bfd_mach_mips4K to comment.
6624         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6625         E_MIPS_ARCH_2 for bfd_mach_mips4K.
6627 2000-09-13  Marco Franzen <marcof@thyron.com>
6629         * som.c (som_write_symbol_strings): Do not used fixed buffers,
6630         use size_t as a counter.
6631         (som_write_space_strings): Similarly.
6633 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
6635         * elf32-i860.c (elf32_i860_relocate_pc26): New function
6636         and prototype.
6637         (elf32_i860_relocate_section): Invoke new function from here.
6639 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6641         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6642         static.
6644 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6646         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6647         target section name instead of dumping core when the target symbol is
6648         undefined.
6650 2000-09-09  Kazu Hirata  <kazu@hxi.com>
6652         * riscix.c: Remove DEFUN.
6654 2000-09-08  Nick Clifton  <nickc@redhat.com>
6656         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6657         initialise flags in output bfd if the input bfd is the default
6658         architecture with the default flags.
6660 2000-09-08  Kazu Hirata  <kazu@hxi.com>
6662         * archive.c: Fix formatting.
6663         * coff-arm.c: Likewise.
6664         * doc/chew.c: Likewise.
6666 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
6668         * section.c (bfd_get_unique_section_name): Put a dot before the
6669         numeric suffix.
6671 2000-09-07  Kazu Hirata  <kazu@hxi.com>
6673         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6674         * elf.c: Fix formatting.
6676 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
6678         * config.bfd (sh-*-linux*): Added.
6679         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6680         * targets.c: Declare them.
6681         * elf32-sh-lin.c: New file.
6682         * Makefile.am: Compile it.
6683         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6684         * configure, Makefile.in: Rebuilt.
6686 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
6688         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6689         pseduo-section when determining where the TOC ends.
6691         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6692         output x_tvndx as it is only two bytes wide.
6694         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6695         reloc is 26 or 32 bits wide.
6697         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6698         for relocs that don't change anything.  Also look at the full
6699         6 bits of bitsize.
6701 2000-09-06  Philip Blundell  <philb@gnu.org>
6703         * config.bfd (arm*-*-uclinux*): New target.
6705 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
6707         * configure: Rebuilt with new libtool.m4.
6709 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
6711         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6712         word for variable name.
6713         * bfd-in2.h: Regenerate.
6715 2000-09-05  Nick Clifton  <nickc@redhat.com>
6717         * config.in: Regenerate.
6718         * libbfd.h: Regenerate.
6719         * po/bfd.pot: Regenerate.
6720         * doc/bfdint.texi: Remove CVS date string - it foils compares with
6721         local versions.
6723 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
6725         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
6727 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
6729         Shared library and PIC support.
6730         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6731         (GOT_ENTRY_SIZE): New.
6732         (ELF_DYNAMIC_INTERPRETER): New.
6733         (STUB_SUFFIX): Define.
6734         (LONG_BRANCH_PIC_IN_SHLIB): Define.
6735         (RELATIVE_DYNAMIC_RELOCS): Define.
6736         (enum elf32_hppa_stub_type): New.
6737         (struct elf32_hppa_stub_hash_entry): Rename offset to
6738         stub_offset.  Add a number of new fields.
6739         (struct elf32_hppa_link_hash_entry): New.
6740         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
6741         global_value.
6742         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6743         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6744         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
6745         new fields.
6746         (hppa_link_hash_newfunc): New function.
6747         (elf32_hppa_link_hash_table_create): Use above function. Init new
6748         fields.
6749         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
6750         instead of addend, and remove sym_name from args.  Don't use
6751         symbol name for local syms, instead use sym index.
6752         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6753         stub type rather than size.  Pass in hash and handle import stub
6754         case.  Also pass in reloc instead of offset so we can calculate
6755         PCREL22F and PCREL12F branches properly.
6756         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
6757         import and export stubs too.
6758         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
6759         import and export stub sizing.
6760         (elf32_hppa_check_relocs): New function.
6761         (elf32_hppa_adjust_dynamic_symbol): New function.
6762         (hppa_discard_copies): New function.
6763         (elf32_hppa_size_dynamic_sections): New function.
6764         (elf_backend_size_dynamic_sections): Define.
6765         (elf32_hppa_finish_dynamic_symbol): New function.
6766         (elf_backend_finish_dynamic_symbol): Define.
6767         (elf32_hppa_size_stubs): Stash params in link hash table, and move
6768         some local vars into the link hash table too.  For shared links,
6769         trundle over function syms, generating export stubs.  Handle
6770         PCREL22F branches.  Break out stub creation code from here..
6771         (hppa_add_stub): .. to here.  New function.
6772         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6773         call the bfd linker.  Use elf_gp to record global pointer.
6774         Calculate a value from sections if $global$ is missing.
6775         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6776         (elf32_hppa_gc_mark_hook): New function.
6777         (elf_backend_gc_mark_hook): Define.
6778         (elf32_hppa_gc_sweep_hook): New function.
6779         (elf_backend_gc_sweep_hook): Define.
6780         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6781         Add rel to args, and remove howto, input_bfd, offset, addend,
6782         sym_name as we can recalculate these locally.  Handle calls to
6783         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
6784         handling of undefined weak syms.  Check that stubs are in range.
6785         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
6786         message on hitting a DPREL21L reloc that needs fixing.  Subtract
6787         off PC for PCREL14F.  Break out code that does a stub lookup from
6788         here..
6789         (hppa_get_stub_entry): ..to here.  New function.
6790         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6791         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6792         relocs, etc. etc.
6793         (elf32_hppa_finish_dynamic_sections): New function.
6794         (elf_backend_finish_dynamic_sections): Define.
6795         (elf_backend_final_write_processing) Define.
6796         (hppa_handle_PIC_calls): New function.
6797         (elf32_hppa_build_stubs): Call it.  Pass link_info to
6798         hppa_build_one_stub.
6799         (elf32_hppa_create_dynamic_sections): New function
6800         to create .plt and .got then set .plt flags correctly.
6801         (elf_backend_create_dynamic_sections): Define.
6802         (elf32_hppa_object_p): New function.
6803         (elf_backend_object_p): Define.
6804         (elf32_hppa_elf_get_symbol_type): New function.
6805         (elf_backend_get_symbol_type): Define.
6806         (elf_backend_can_gc_sections): Define.
6807         (elf_backend_want_got_plt): Define.
6808         (elf_backend_plt_alignment): Set to 2.
6809         (elf_backend_plt_readonly): Define.
6810         (elf_backend_want_plt_sym): Define.
6811         (elf_backend_got_header_size): Reserve one entry.
6813         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6814         (elf32_hppa_size_stubs): Pass in multi_subspace.
6815         (elf32_hppa_set_gp): Declare.
6817         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6818         (bfd_get_unique_section_name): New function.
6819         * bfd-in2.h: Regenerate.
6821         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6822         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6823         comment.
6825         From  David Huggins-Daines  <dhd@linuxcare.com>
6826         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6827         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6828         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6829         been updated in finish_dynamic_symbol before modifying function
6830         symbol.
6832         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6833         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
6834         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6835         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
6836         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
6837         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6838         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
6839         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6841         From David Huggins-Daines  <dhd@linuxcare.com>
6842         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6843         style of local labels as well.
6845 2000-09-03  Philip Blundell  <philb@gnu.org>
6847         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6848         references to undefined symbols in debugging sections.
6850 2000-09-02  H.J. Lu  <hjl@gnu.org>
6852         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6853         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6854         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6855         section.
6857 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
6859         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6860         (elf32_i860_is_local_label_name): New function and prototype.
6862 2000-09-02  Nick Clifton  <nickc@redhat.com>
6864         * configure.in: Increase version number to 2.10.91.
6865         * configure: Regenerate.
6866         * aclocal.m4: Regenerate.
6867         * config.in: Regenerate.
6868         * po/bfd.pot: Regenerate.
6870 2000-09-02  Daniel Berlin <dberlin@redhat.com>
6872         * elf.c (_bfd_elf_make_section_from_shdr): Add
6873         .gnu.linkobce.wi. to the list of debug section names.
6875 2000-09-02  Nick Clifton  <nickc@redhat.com>
6877         * dwarf2.c (find_debug_info): New function: Locate a section
6878         containing dwarf2 debug information.
6879         (bfd_dwarf2_find_nearest_line): Find all sections containing
6880         debug information and include them in the stash.
6882 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
6884         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6885         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6886         (sh_reloc_map): Add new relocs.
6887         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6888         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6889         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6890         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6891         functions.
6892         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6893         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6894         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6895         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6896         New array constants.
6897         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6898         New variables.
6899         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6900         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6901         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6902         elf_sh_plt_reloc_offset): Define.
6903         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6904         elf_sh_link_hash_table): New structs.
6905         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6906         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6907         relocation types.
6908         (elf_backend_create_dynamic_sections,
6909         bfd_elf32_bfd_link_hash_table_create,
6910         elf_backend_adjust_dynamic_symbol,
6911         elf_backend_size_dynamic_sections,
6912         elf_backend_finish_dynamic_symbol,
6913         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6914         elf_backend_plt_readonly, elf_backend_want_plt_sym,
6915         elf_backend_got_header_size, elf_backend_plt_header_size):
6916         Define.
6917         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6918         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6919         New relocs.
6920         * bfd-in2.h, libbfd.h: Rebuilt.
6922 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
6924         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6925         change.
6927 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
6929         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6930         not initialized, set them to indicate the SH1 instruction set.
6932 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
6934         * acinclude.m4: Include libtool and gettext macros from the
6935         top level.
6936         * aclocal.m4, configure: Rebuilt.
6938 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
6940         * elf.c: Eliminate references to __sparcv9 macro; replace with
6941         autoconf variables HAVE_PSINFO32_T etc.
6942         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6943         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6944         * config.in: Ditto.
6945         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6946         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6947         * aclocal.m4: Ditto.
6948         * configure: Regenerate.
6950 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
6952         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6953         for any shared link, not just shared -Bsymbolic.
6954         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6955         any shared link, and pass link info to it.
6956         (elf_i386_size_dynamic_sections): Update comment.
6957         (elf_i386_discard_copies): Modify to discard relocs for symbols
6958         that have been forced local.
6959         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6960         that have been forced local.
6962 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
6964         * elflink.h (elf_link_add_object_symbols): Allow common
6965         symbols to have an alignment of 1 if explicitly requested, and
6966         not overridden by other definitions.
6968 2000-08-22  Doug Kwan <dkwan@transmeta.com>
6970         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6971         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6973 2000-08-22  H.J. Lu  <hjl@gnu.org>
6975         * elf-bfd.h (elf_link_hash_table): Add runpath.
6977         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6978         * bfd-in2.h: Rebuilt.
6980         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6981         "runpath" field to NULL.
6982         (bfd_elf_get_runpath_list): New function.
6984         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6985         DT_RUNPATH entries.
6987 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
6989         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6990         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6991         explicitly.  Improve validation of r_type.
6993 2000-08-21  H.J. Lu  <hjl@gnu.org>
6995         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6996         dynamic allocated content space.  Add a comment to remind us that
6997         one day this ought to be fixed.
6998         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6999         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7000         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7002 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
7004         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
7005         field with the newly relocated value instead of adding it to the
7006         existing immediate field.
7007         (elf32_i860_relocate_splitn): Likewise.
7008         (elf32_i860_relocate_highadj): Likewise.
7010 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
7012         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
7013         was previously just a stub).
7015 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
7017         * elflink.c (_bfd_elf_create_got_section): Don't abort().
7018         Formatting fixes.
7019         (_bfd_elf_create_dynamic_sections): Likewise.
7021 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
7023         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
7024         for undefined symbols to be the beginning of the section.
7026         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
7027         four extra entries at the beginning of the .rela.plt section.
7028         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
7029         section to account for the four reserved entries in the .plt section.
7031 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
7033         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
7034         to the list of NOPs we recognize after a branch-and-link.
7035         Use the ori NOP when one is needed.
7037         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
7038         for large archives.
7040 2000-08-14  Jim Wilson  <wilson@cygnus.com>
7042         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
7043         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
7044         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
7045         EF_IA_64_ABSOLUTE.
7047 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
7049         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
7051 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
7053         * elf32-i860.c (elf32_i860_relocate_section): New function.
7054         (i860_final_link_relocate): New function.
7055         (elf32_i860_relocate_splitn): New function.
7056         (elf32_i860_relocate_pc16): New function.
7057         (elf32_i860_relocate_highadj): New function.
7058         (elf32_i860_howto): Minor adjustments to some relocations.
7059         (elf_info_to_howto_rel): Define.
7060         (elf_backend_relocate_section): Define.
7062 2000-08-10  Nick Clifton  <nickc@cygnus.com>
7064         * elf32-arm.h: Fix formatting.
7066 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
7068         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
7070 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
7072         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
7074 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7076         * ieee.c (ieee_write_debug_part): Rewrite a comment.
7077         * elf64-ia64.c: Fix a typo.
7079 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
7081         * elf32-i860.c (elf32_i860_howto_table): New structure.
7082         (lookup_howto): New function.
7083         (elf32_i860_reloc_type_lookup): New function.
7084         (elf32_i860_info_to_howto_rela): New function.
7085         (elf_code_to_howto_index): New structure.
7086         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
7087         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
7088         elf32_i860_reloc_type_lookup.
7090 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
7092         * som.c (struct fixup_format): Constify `format'.
7093         (som_hppa_howto_table): Use SOM_HOWTO macro.
7094         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
7095         (som_bfd_reloc_type_lookup): Likewise.
7096         (compare_subspaces): Remove unused `count1', `count2'.
7097         (som_begin_writing): Remove unused `total_reloc_size'.
7098         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
7099         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
7100         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
7101         (som_find_nearest_line): Decorate unused parameter(s).
7102         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
7103         (som_bfd_link_split_section): Likewise.
7105 2000-08-03  Nick Clifton  <nickc@cygnus.com>
7107         * section.c: Restore backed out code.
7108         * elf.c: Restore backed out code.
7109         (copy_private_bfd_data): Fix bug preventing stipped dynamic
7110         binaries from working.
7111         * bfd-in2.h: Regenerate.
7113 2000-08-03  H.J. Lu  <hjl@gnu.org>
7115         * section.c: Back out the change made by Nick Clifton
7116         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
7117         binaries.
7118         * bfd-in2.h: Likewise.
7119         * elf.c: Likewise.
7121 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
7123         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
7125 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
7127         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
7128         * bfd-in2.h, libbfd.h: Regenerate.
7130 2000-07-31  Nick Clifton  <nickc@cygnus.com>
7132         * section.c (struct sec): Add new boolean field 'segment_mark'.
7133         (STD_SECTION): Initialise new field to zero.
7135         * bfd-in2.h: Regenerate.
7137         * elf.c (copy_private_bfd_data): Reorganise section to segment
7138         mapping to cope with moved sections requiring new segments,
7139         and overlapping segments.
7140         (SEGMENT_END): New macro: Return the end address of a segment.
7141         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
7142         contains a section by comparing their VMA addresses.
7143         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
7144         contains a section by comparing their LMA addresses.
7145         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
7146         section should be included in a segment.
7147         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
7148         follows another in memory.
7149         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
7150         segments overlap.
7152 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
7154         * cpu-i860.c: Added comments.
7156         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
7157         bfd_elf32_i860_little_vec.
7158         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
7159         (ELF_MAXPAGESIZE): Changed to 4096.
7161         * targets.c (bfd_elf32_i860_little_vec): Declaration of
7162         new target.
7163         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
7165         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
7166         config for little endian elf32 i860.
7167         (targ_defvec): Define for the new config above
7168         as "bfd_elf32_i860_little_vec".
7169         (targ_selvecs): Define for the new config above
7170         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
7172         * configure.in (bfd_elf32_i860_little_vec): Added recognition
7173         of new target vec.
7175         * configure: Regenerated.
7177 2000-07-27  H.J. Lu  <hjl@gnu.org>
7179         * elflink.h (elf_merge_symbol): Take one more argument,
7180         dt_needed, to indicate if the symbol comes from a DT_NEEDED
7181         entry. Don't overide the existing weak definition if dt_needed
7182         is true.
7183         (elf_link_add_object_symbols): Pass dt_needed to
7184         elf_merge_symbol ().
7186 2000-07-27  Nick Clifton  <nickc@cygnus.com>
7188         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
7189         allocated contents.
7191 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
7193         * configure.host (*-*-aix*): AIX has 'long long' always.
7195         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
7196         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
7197         (xcoff_write_archive_contents_big): Don't update the offset
7198         of the symbol table, xcoff_write_armap will do it.
7200 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
7202         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
7203         of dynobj for SGI_COMPAT checks.
7205 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
7207         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
7208         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
7209         * bfd-in2.h: Regenerate.
7211 2000-07-21  Nick Clifton  <nickc@cygnus.com>
7213         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
7214         range symbol indices in relocs and issue an error message.
7216 2000-07-20  H.J. Lu  <hjl@gnu.org>
7218         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
7219         info->new_dtags when setting DT_FLAGS_1. It will only be set
7220         by the new linker options. It shouldn't break anything.
7222 2000-07-20  H.J. Lu  <hjl@gnu.org>
7224         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
7225         only if info->new_dtags is true.
7227 2000-07-20  H.J. Lu  <hjl@gnu.org>
7229         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
7230         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
7232 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
7234         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
7235         (ALL_MACHINES_CFILES): Add cpu-cris.c.
7236         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
7237         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
7238         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
7239         * Makefile.in: Rebuild.
7240         * aclocal.m4: Rebuild.
7241         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
7242         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
7243         (bfd_cris_arch): Declare.
7244         (bfd_archures_list): Add bfd_cris_arch.
7245         * bfd-in2.h: Rebuild.
7246         * config.bfd: (cris-*-*): New target.
7247         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
7248         * configure: Rebuild.
7249         * elf.c (prep_headers): Add bfd_arch_cris.
7250         * libbfd.h: Rebuild.
7251         * libaout.h (enum machine_type): Add M_CRIS.
7252         * reloc.c: Add CRIS relocations.
7253         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
7254         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
7255         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
7256         * po/POTFILES.in, po/bfd.pot: Regenerate.
7258 2000-07-19  H.J. Lu  <hjl@gnu.org>
7260         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
7261         DF_TEXTREL if DT_TEXTREL is set.
7262         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7263         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7264         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7265         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
7266         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
7267         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7268         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
7269         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7270         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
7271         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
7273         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
7274         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
7275         DT_RPATH is set.
7276         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
7278 2000-07-19  H.J. Lu  <hjl@gnu.org>
7280         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
7281         * bfd-in2.h: Rebuild.
7283         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
7284         (elf_dt_soname): New.
7286         * elf.c (bfd_elf_set_dt_needed_soname): New.
7288         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
7289         entry if the shared object loaded by DT_NEEDED is used to
7290         resolve the reference in a regular object.
7292 2000-07-19  H.J. Lu  <hjl@gnu.org>
7294         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
7295         DT_DEPAUDIT and DT_AUDIT as strings.
7297 2000-07-19  Nick Clifton  <nickc@cygnus.com>
7299         * format.c: Fix formatting.
7301 2000-07-19  H.J. Lu  <hjl@gnu.org>
7303         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
7305 2000-07-19  H.J. Lu  <hjl@gnu.org>
7307         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
7308         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
7309         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
7310         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
7311         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
7312         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
7313         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
7315 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
7317         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
7318         renamed functions from here...
7319         (assign_section_numbers): Use renamed functions.
7320         (prep_headers): Use renamed functions.
7322         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
7323         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
7324         * bfd-in2.h: Regenerate.
7326 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7328         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
7329         parenthesis in if statement.
7331 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
7333         Enable the support for Traditional MIPS.
7334         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
7335         return ict_none appropriately for traditional mips targets.
7336         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
7337         (STUB_MOVE): Conditionalize for traditonal mips.
7338         (STUB_LI16): Likewise.
7339         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
7340         room for RTPROC header.
7341         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
7342         the permission for the PT_DYNAMIC as read, write and execute.
7343         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
7344         for traditonal mips.
7345         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
7346         _DYNAMIC_LINKING for traditonal mips.
7347         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
7348         in case of traditonal mips.
7349         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
7350         entry is required. For a function if PLT is not required then set the
7351         corresponding hash table entry to 0.
7352         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
7353         traditonal mips.
7354         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
7355         shared object set the value to 0.
7356         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
7357         _DYNAMIC_LINKING for traditonal mips.
7358         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
7359         for traditonal mips.
7361 2000-07-15  H.J. Lu  <hjl@gnu.org>
7363         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
7365 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
7367         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
7368         out a structure that is BFD_IN_MEMORY.
7370 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
7372         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
7373         bfd pointer.  Print section id instead of bfd pointer for local
7374         syms.  Prefix addend with `+' for global syms as well as local.
7375         Correct calculation of name component lengths.
7376         (elf64_hppa_check_relocs): Update call to get_dyn_name.
7378         From David Huggins-Daines  <dhd@linuxcare.com>
7379         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
7380         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
7381         (elf64_hppa_modify_segment_map): Likewise.
7383 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7385         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
7386         addresses to be "naturally" sign extended.  Return -1 if unknown.
7387         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
7388         * bfd-in2.h: Regenerate.
7390 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7392         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
7393         and ECOF_SIGNED_64 to list ways to extract an offset.
7394         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
7395         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
7396         Update.
7397         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
7398         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
7400 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
7402         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
7403         bfd_get_start_address.
7404         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
7405         (elf_swap_ehdr_out): Ditto.
7407 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
7409         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7410         compatibility with older binutils.
7412 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
7414         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7415         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7417         From Ryan Bradetich  <rbradetich@uswest.net>
7418         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7419         (parse_line_table): Ditto.
7420         (_bfd_dwarf1_find_nearest_line): Ditto.
7421         * syms.c (cmpindexentry): Remove extra `*' from params.
7423 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
7425         * elf32-mips.c (sort_dynamic_relocs): New Function.
7426         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7427         via qsort to sort the dynamic relocations in increasing r_symndx
7428         value.
7430 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
7432         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7433         ATTRIBUTE_UNUSED to unused args.
7434         (get_opd): Likewise.
7435         (get_plt): Likewise.
7436         (get_dlt): Likewise.
7437         (get_stub): Likewise.
7438         (elf64_hppa_adjust_dynamic_symbol): Likewise.
7439         (elf64_hppa_link_output_symbol_hook): Likewise.
7440         (elf64_hppa_check_relocs): Delete unused var.
7441         (elf64_hppa_size_dynamic_sections): Likewise.
7442         (elf64_hppa_finalize_opd): Likewise.
7443         (elf64_hppa_finalize_dynreloc): Likewise.
7444         (elf64_hppa_modify_segment_map): Likewise.
7445         (elf64_hppa_finish_dynamic_sections): Likewise.
7447         * elf-hppa.h (elf_hppa_final_write_processing): Add
7448         ATTRIBUTE_UNUSED to unused args.
7449         (elf_hppa_final_link_relocate): Likewise.
7450         (elf_hppa_record_segment_addrs): Add paretheses.
7451         (elf_hppa_relocate_section): Constify dyn_name.
7453         From  David Huggins-Daines  <dhd@linuxcare.com>
7454         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7455         rearrange case statement so that it gets preferred to 32-bit ones.
7457         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7458         asection->id instead of address of asection structure.
7459         (elf32_hppa_size_stubs): Likewise.
7461         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7462         for .init* and .fini*.
7464         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7465         and addends used in stub names to 32 bits.
7466         (elf32_hppa_size_stubs): Likewise.
7468         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7469         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
7470         not bfd_put_64.  Fix minor comment typo and formatting.
7472         Changes to create multiple linker stubs, positioned immediately
7473         before the section where they are required.
7474         * elf32-hppa.c: Don't include hppa_stubs.h.
7475         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7476         (elf32_hppa_stub_hash_table): Delete.
7477         (elf32_hppa_link_hash_entry): Delete.
7478         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7479         stub_hash_table, and store the struct here rather than a pointer.
7480         Delete output_symbol_count.  Add offset array.  Change
7481         global_value to a bfd_vma.
7482         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7483         (elf32_hppa_stub_hash_traverse): Delete.
7484         (elf32_hppa_name_of_stub): Delete.
7485         (elf32_hppa_link_hash_lookup): Delete.
7486         (elf32_hppa_link_hash_traverse): Delete.
7487         (elf32_hppa_stub_hash_table_init): Delete.
7488         (elf32_hppa_size_of_stub): Pass input section and offset rather
7489         than location and calculate location here.  Don't pass name as all
7490         stubs are now the same size.
7491         (elf32_hppa_stub_hash_newfunc): Init new fields.
7492         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7493         too.
7494         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7495         comparing against ints.  Rewrite stub handling code.
7496         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7497         Case enums to int before comparing against ints.  Remove
7498         bfd_reloc_dangerous case.
7499         (elf32_hppa_build_one_stub): Rewrite.
7500         (elf32_hppa_size_one_stub): New function.
7501         (elf32_hppa_build_stubs): Rewrite.
7502         (elf32_hppa_size_stubs): Pass in linker call-back functions.
7503         Rewrite stub-handling specific code.
7505         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7507         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7509         * hppa_stubs.h: Delete.
7510         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7511         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7512         * Makefile.in: Regenerate.
7514         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7515         e_nlrsel.
7517         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7519         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7520         and section name for bfd_reloc_notsupported error message.
7521         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7522         bfd_reloc_notsupported.
7523         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7525         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7526         undefined weak symbols for all relocs.
7527         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7528         offsets are relative to one past the delay slot.
7529         (elf32_hppa_size_stubs): Account for reloc addend when calculating
7530         branch destination.  Put addend into stub name too.
7531         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7532         adjust by 8 when deciding whether a linker stub is needed.  Put
7533         addend into stub name as for above.
7535         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7536         various args and vars.
7537         (elf32_hppa_bfd_final_link_relocate): Here too.
7538         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
7539         inner block var to avoid shadowing.
7541         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
7542         unsigned.
7543         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7544         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7545         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7547         * libhppa.h: Change practically all unsigned ints to plain ints.
7548         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
7549         prototypes.
7551         From Ryan Bradetich  <rbradetich@uswest.net>
7552         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7553         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7554         suit above.
7555         From  David Huggins-Daines  <dhd@linuxcare.com>
7556         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7557         to the new OP_* ones.
7559         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7560         error exit.  Bail out earlier on plabel relocs that we aren't
7561         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
7562         string, and then don't free our copy.
7563         (elf32_hppa_build_one_stub): Make insn unsigned int.
7565         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7566         available with BL, not BE and BLE.
7568         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7569         code for elf arg relocs.
7570         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7571         argument with elf_link_hash_entry h.  Handle undefined weak
7572         symbols.  Move $global$ lookup from here...
7573         (elf32_hppa_relocate_section): ...to here.  Return correct error
7574         message for non-handled relocs.
7575         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
7576         wrong test was -0x3ffff to +0x40000.
7578         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7579         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7580         Handle them as such.
7581         (elf_hppa_relocate_insn): Fix a typo.
7583         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7584         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7585         assemble_17, assemble_21): Delete.
7586         Supply defines for all 64 possible opcodes.
7587         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7588         formats.  Handle COMICLR.
7589         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
7590         -10, -16, 16, 22.
7592         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7593         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7594         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7595         to suit.
7596         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
7597         the local syms - did this code get deleted accidentally?  Ignore
7598         undefined and undefweak syms.
7600         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7601         block.  Use it instead of elf64_hppa_hash_table (info).
7602         (elf_hppa_final_link_relocate): Use hppa_info instead of
7603         elf64_hppa_hash_table (info).
7605         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7606         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7607         (hppa_rebuild_insn): Mask immediate bits here instead.
7608         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7610 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
7612         * section.c (struct sec): Add id field.  Tidy comment formatting.
7613         (bfd_make_section_anyway): Set id.
7614         (STD_SECTION): Init id too.
7615         Change CONST to const throughout.
7616         * archures.c (bfd_arch_info): Tidy comment.
7617         (bfd_arch_list): Change a CONST to const.
7618         * libbfd-in.h: Tidy comments and replace CONST with const.
7619         * elf-bfd.h: Likewise.
7620         * libbfd.h: Regenerate.
7621         * bfd-in2.h: Regenerate.
7622         * libcoff.h: Regenerate.
7624 2000-07-07  DJ Delorie  <dj@redhat.com>
7626         * archive.c (_bfd_write_archive_contents): Add an informative
7627         comment.
7629 2000-07-06  Kazu Hirata  <kazu@hxi.com>
7631         * srec.c: Fix formatting.
7633 2000-06-05  DJ Delorie  <dj@redhat.com>
7635         * MAINTAINERS: new
7637 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
7639         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7640         value of PC-relative offsets.
7642 2000-07-03  Jim Wilson  <wilson@cygnus.com>
7644         * elf64-alpha.c (alpha_elf_size_info): New.
7645         (elf_backend_size_info): Define to alpha_elf_size_info.
7646         * elfcode.h (elf_size_info): Change hash bucket size to 4.
7648 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
7650         * elf32-mips.c: Include elf32-target.h again for the traditional
7651         MIPS targets.
7653 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
7655         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7656         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7657         (avr_info_to_howto_rela): Likewise.
7658         (elf32_avr_gc_mark_hook): Likewise.
7659         (elf32_avr_gc_sweep_hook): Likewise.
7660         (elf32_avr_relocate_section): Likewise.
7662 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
7664         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7665         an external symbol for a non-shared, non-relocatable link.
7667 2000-07-03  Nick Clifton  <nickc@redhat.com>
7669         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7670         is an external symbol.
7671         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7672         external symbol.
7674 2000-07-03  Kazu Hirata  <kazu@hxi.com>
7676         * reloc16.c: Fix formatting.
7678 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
7680         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7681         to add a new target for traditional mips i.e
7682         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7683         * configure.in: Likewise.
7684         * configure: Rebuild.
7685         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7686         bfd_target_vector.
7687         (bfd_elf32_tradlittlemips_vec): Likewise.
7688         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7689         to see that elfNN_bed does not get redefined even if the target file
7690         is included twice for a chip. See elf32-mips.c.
7692 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
7694         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
7695         (CLEANFILES): Add DEPA.
7696         * Makefile.in: Regenerate.
7698 2000-06-30  DJ Delorie  <dj@cygnus.com>
7700         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7701         can't assume the PE header is at 0x80.
7703 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
7705         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7707 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
7709         * go32stub.h: Update stub.
7711 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
7713         * archures.c (bfd_mach_avr5): Define.
7714         * bfd-in2.h (bfd_mach_avr5): Define.
7715         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7716         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
7717         (compatible): Update comment.  Add missing test.
7718         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7719         for avr2 and avr4.  Simplify 8K wrap code.
7720         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7721         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7723 2000-06-26  Kazu Hirata  <kazu@hxi.com>
7725         * coff-h8300.c: Fix formatting.
7726         * cpu-h8300.c: Likewise.
7728 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
7730         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7731         for local symbols whose names are unknown.
7733 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
7735         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7736         find one.
7737         * Makefile.in: Regenerate.
7738         * doc/Makefile.in: Regenerate.
7740 2000-06-20  H.J. Lu  <hjl@gnu.org>
7742         * Makefile.am: Rebuild dependency.
7743         * Makefile.in: Rebuild.
7745 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7747         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7748         (elf_backend_copy_indirect_symbol): Map to the new function.
7750 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
7752         * archive.c (normalize): Correct pointer comparison when checking
7753         for backslashes.
7754         (bfd_bsd_truncate_arname): Likewise.
7755         (bfd_gnu_truncate_arname): Likewise.
7757 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
7759         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7760         sections elf_{text,data}_{section,symbol}.
7761         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7762         (_bfd_mips_elf_hide_symbol): New function.
7763         (elf_backend_hide_symbol): Map to the new function.
7764         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7765         definitions of mips_elf_{text,data}_{section,symbol}.
7766         (mips_elf_local_relocation_p): Try to find the direct symbol
7767         based on new check_forced argument.
7768         (mips_elf_calculate_relocation): Use new version of
7769         mips_elf_local_relocation_p.
7770         (mips_elf_relocate_section): Likewise.
7771         (_bfd_mips_elf_relocate_section): Likewise.
7772         (mips_elf_sort_hash_table): Only assert that have enough GOT
7773         space.
7774         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7775         entry if the relocation based on the new external argument.
7776         (mips_elf_create_dynamic_relocation): Assert that we have a
7777         section contents allocated where we can swap out the dynamic
7778         relocations.
7779         (mips_elf_calculate_relocation): Find the real hash-table entry
7780         correctly by using h->root.root.type.  Only create a dynamic
7781         relocation entry if the symbol is defined in a shared library.
7782         Create an external GOT entry for the GOT16 relocation if the
7783         symbol was forced local.
7784         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7785         dynamic index if the symbol was forced local.
7787 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7789         * elf32-mips.c: Fix typos in comments.
7791 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
7793         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7794         CORE_VERSION_1.
7796 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
7798         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7799         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7800         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7801         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7802         (bfd_elf32_m68hc11_vec): Likewise.
7803         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7804         Supports 68hc11 & 68hc12  at the same time.
7805         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7806         bfd_target_vector.
7807         (bfd_elf32_m68hc11_vec): Likewise.
7808         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7809         * archures.c (bfd_m68hc12_arch): Define and register in global list
7810         (bfd_m68hc11_arch): Likewise.
7811         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7812         BFD_RELOC_M68HC11_3B): Define.
7813         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7814         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7816 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7818         * elf_bfd.h (struct elf_backend_data): Add info argument to
7819         elf_backend_hide_symbol.
7820         (_bfd_elf_link_hash_hide_symbol): Likewise.
7821         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7822         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7823         * elflink.h (elf_link_add_object_symbols): Likewise.
7824         (elf_link_assign_sym_version): Likewise.
7826 2000-06-18  H.J. Lu  <hjl@gnu.org>
7828         * coff-i386.c (coff_i386_reloc): Don't return in case of
7829         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7830         Compensate PE relocations when linking with non-PE object
7831         files to generate a non-PE executable.
7833 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
7835         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7836         GOT entries if we're doing a static link or -Bsymbolic link.
7838 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
7840         * elflink.h (elf_link_adjust_relocs): Check for and call backend
7841         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7842         available.
7843         (elf_link_output_relocs): Likewise.
7844         (elf_reloc_link_order): Likewise.
7846 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7848         * archures.c (enum bfd_architecture): #define constants for
7849         PowerPc and RS6000 machine numbers.
7850         * bfd-in2.h: Regenerate.
7851         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7852         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
7853         and RS6000 machine numbers using #defined constants from
7854         archures.c.
7855         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7856         machine numbers using #defined constants from archures.c.  Add
7857         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
7858         64-bit words in 620 entry.
7859         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7860         RSC, and RS2.
7861         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7863 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
7865         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7866         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7867         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7869 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7871         * bfd-in.h (bfd_family_coff): Define.
7872         * bfd-in2.h: Regenerate.
7873         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7874         coff_find_nearest_line): Check COFFness using bfd_family_coff()
7875         instead of bfd_target_coff_flavour.
7876         * cofflink.c (_bfd_coff_final_link): Likewise.
7877         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7878         exclude XCOFF files.
7879         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7880         Likewise.
7881         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7882         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7883         * xcofflink.c (XCOFF_XVECP): Delete.
7884         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7885         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7886         bfd_xcoff_record_link_assignment,
7887         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7888         check for bfd_target_xcoff_flavour.
7890 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7892         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7893         files on AIX 4.3.
7894         (read_hdr): New function.
7895         (rs6000coff_core_p): Store mstsave or __context64 struct instead
7896         of trying to extract individual registers.  Set abfd->arch_info
7897         to match the architecture that created the core file.
7898         (rs6000coff_get_section_contents): Delete.
7899         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7901 2000-06-14  H.J. Lu  <hjl@gnu.org>
7903         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7904         is NULL.
7906 2000-06-13  H.J. Lu  <hjl@gnu.org>
7908         * configure: Regenerate.
7910 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
7912         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7913         armpei_little_vec.
7915 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
7917         * configure.in (VERSION): Update to show this is the CVS mainline.
7919 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
7921         * elf32-d10v.c: Include elf/d10v.h
7922         (enum reloc_type): Delete.
7923         * elf32-d30v.c: Include elf/d30v.h
7924         (enum reloc_type): Delete.
7926         * Makefile.am: Run "make dep-am" to regenerate dependencies.
7927         * Makefile.in: Regenerate.
7929         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7930         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7931         move HOWTOs into elf_howto_table.
7932         (R_386_standard, R_386_ext_offset): Define.
7933         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7934         (elf_i386_reloc_type_lookup): Modify calculation of index into
7935         elf_howto_table since we've removed the padding.
7936         (elf_i386_info_to_howto_rel): Likewise.
7937         (elf_i386_relocate_section): Likewise.
7939 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
7941         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7943 2000-06-05  H.J. Lu  <hjl@gnu.org>
7945         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7946         an error when seeing an undefined symbol with hidden/internal
7947         attribute. It is handled in *_relocate_section ().
7949 2000-06-05  H.J. Lu  <hjl@gnu.org>
7951         * elflink.h (elf_fix_symbol_flags): Follow the link for the
7952         indirect symbol for the ELF_LINK_NON_ELF bit.
7953         (elf_link_output_extsym): Don't output the indirect symbol even
7954         if the ELF_LINK_NON_ELF bit is set.
7956 2000-06-01  J.T. Conklin  <jtc@redback.com>
7958         * config.bfd (i[3456]86-*-netbsdelf*): New target.
7959         (i[3456]86-*-netbsdaout*): New target.
7960         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7961         (i[3456]86-*-openbsd*): Likewise.
7963 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
7965         * trad-core.c: From hpux-core.c, include <dirent.h> or
7966         <sys/ndir.h> when possible.
7968 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
7970         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7971         definitions.  We must not assume they are sorted in the file
7972         according to their index numbers.
7974 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
7976         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7977         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
7978         R_PARISC_DIR17F are for absolute branches; Handle them as such.
7980 2000-05-30  Nick Clifton  <nickc@cygnus.com>
7982         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7983         80960CA, 80960MC as valid machine names.
7985 2000-05-30  H.J. Lu  <hjl@gnu.org>
7987         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7988         visibility bits if the symbol is undefined. Correctly handle
7989         weak undefined symbols with hidden and internal attributes.
7991         * elflink.h (elf_link_add_object_symbols): Always turn the
7992         symbol into local if it has the hidden or internal attribute.
7994 2000-05-29  Philip Blundell  <philb@gnu.org>
7996         * ppcboot.c:  Add packed attribute if compiling with GCC.
7998 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
8000         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
8002 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
8004         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
8005         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
8006         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
8007         a few old comments.
8009 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
8011         * Makefile.am: Update dependencies with "make dep-am"
8012         * Makefile.in: Regenerate.
8014         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
8015         bindtextdomain): Replace defines with those from intl/libgettext.h
8016         to quieten gcc warnings.
8018 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
8020         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
8022         * archive.c (normalize, bfd_bsd_truncate_arname,
8023         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
8024         file names with backslashes.
8026         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
8027         before opening it.
8029         * sysdep.h: Include filenames.h.
8031 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
8033         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
8035 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
8037         * elf64-sparc.c (sparc64_elf_relax_section): New.
8038         (sparc64_elf_relocate_section): Optimize tail call into branch always
8039         if possible.
8040         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8041         (elf32_sparc_relax_section): New.
8043 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
8045         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
8046         Remove unusued variables.
8047         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
8048         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
8049         previous fix, so that shared libs really don't influence targets
8050         extension mask and memory model.
8052 2000-05-23  H.J. Lu  <hjl@gnu.org>
8054         * elf64-alpha.c (elf64_alpha_relocate_section): Check
8055         h->root.other not h->other.
8056         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8058         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
8060 2000-05-23  H.J. Lu  <hjl@gnu.org>
8062         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
8063         undefined symbol with the non-default visibility attributes.
8064         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
8065         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8066         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8067         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8068         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8069         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8070         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8071         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8072         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8073         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
8074         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8076 2000-05-22  Richard Henderson  <rth@cygnus.com>
8078         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
8079         PCREL22, PCREL64I.  Zero size of special relocs.
8080         (elf64_ia64_reloc_type_lookup): Likewise.
8081         (USE_BRL, oor_brl, oor_ip): New.
8082         (elf64_ia64_relax_section): New.
8083         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
8084         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
8085         (elf64_ia64_relocate_section): Likewise.
8086         (bfd_elf64_bfd_relax_section): New.
8087         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
8088         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
8089         * bfd-in2.h, libbfd.h: Regenerate.
8091 2000-05-22  Nick Clifton  <nickc@cygnus.com>
8093         * configure.in : Add peigen.lo to MIPS PE targets.
8094         * configure: Regenerate.
8096 2000-05-22  Momchil Velikov  <velco@fadata.bg>
8098         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
8099         only if it is known for both input and output bfds. Separate
8100         error message strings as in some languages, it may be necessary
8101         to change more than one place in the string to change between
8102         'big' and 'little'.
8104         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
8105         endianess checks, call _bfd_generic_verify_endian_match() instead.
8107         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
8109         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
8111         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
8112         endianess before checking bfd flavours.
8114 2000-05-22  H.J. Lu  <hjl@gnu.org>
8116         * elflink.h (elf_link_output_extsym): Clear the visibility
8117         field for symbols not defined locally.
8119 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
8121         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
8122         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
8123         (hppa_rebuild_insn): Mask immediate bits here instead.
8124         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
8126 2000-05-18  Momchil Velikov <velco@fadata.bg>
8128         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
8129         relocs for an executable, ensure that they are virtual addresses.
8131 2000-05-18  Jeffrey A Law  (law@cygnus.com)
8133         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
8135 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
8136             Rick Gorton             <gorton@scrugs.lkg.dec.com>
8138         * elflink.h: Add emitrelocations support: when enabled, relocation
8139         information and relocation sections are put into final output
8140         executables.  If the emitrelocations flag is set, do the following:
8141         (elf_bfd_final_link): Emit relocation sections.
8142         (elf_link_input_bfd): Compute relocation section contents.
8143         (elf_gc_sections): Don't clean relocation sections.
8145 2000-05-16  Catherine Moore  <clm@cygnus.com>
8147         * som.c (som_decode_symclass):  Recognize weak symbols.
8149 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
8151         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
8152         read idata section only from dataoff.
8153         (pe_print_edata): Correctly check for valid eat_member.
8155 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
8157         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
8159 2000-05-14  Philip Blundell  <philb@gnu.org>
8161         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
8163 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
8165         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
8167         * peigen.c (pe_print_idata): Look for .idata section and print
8168         info even if data directory has zero entries.  Read idata section
8169         starting from dataoff, and adjust all data offsets to suit.  Cast
8170         all bfd_vma vars to unsigned long before passing to fprintf.
8171         * peigen.c (pe_print_edata): Similarly, look for .edata section
8172         and print info even if data directory has zero entries.  Cast
8173         all bfd_vma vars to unsigned long before passing to fprintf.
8175         From Szabolcs Szakacsits <szaka@F-Secure.com>
8176         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
8177         directory size which may be bogus.
8178         * peigen.c (pe_print_edata): Similarly.
8180 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
8182         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
8183         section is empty.
8184         (copy_private_bfd_data): Allow for space possibly taken up by elf
8185         headers when calculating segment physical address from lma.
8187 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
8189         * versados.c (versados_scan): Init stringlen and pass_2_done.
8191         * trad-core.c (trad_unix_core_file_p): Return
8192         bfd_error_wrong_format rather than bfd_error_file_truncated.
8194         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
8195         add_data_entry.  DataDirectory virtual address is relative.
8196         (pe_print_idata): Account for relative DataDirectory virtual
8197         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
8198         (pe_print_edata): Similarly.
8200         From Szabolcs Szakacsits <szaka@F-Secure.com>
8201         * peigen.c (dir_names): Add Delay Import Directory.
8202         (pe_print_idata):  Always search for bfd section containing
8203         idata address rather than looking up section name.  Print this
8204         section name rather than .idata.
8205         (pe_print_edata): Similarly.  Also print some fields as %08lx.
8206         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
8207         Win32Version.
8209 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
8211         * xcoff.h: Rename to xcoff-target.h
8212         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
8213         * coff-rs6000.c: Ditto.
8214         * coff64-rs6000.c: Ditto.
8215         * coff-pmac.c: Ditto.
8216         * Makefile.in: Regenerate.
8218 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
8220         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
8221         Change U802TOC64MAGIC to U803XTOCMAGIC.
8223 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
8225         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
8226         * bfd-in.h: Prototype bfd_elf_get_arch_size.
8227         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
8229 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
8231         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
8233 2000-05-03  Martin v. L�öwis  <loewis@informatik.hu-berlin.de>
8235         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
8236         hidden and internal symbols.
8237         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
8238         visibility.
8239         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
8240         assign a PLT or GOT entry to symbols with hidden and
8241         internal visibility.
8243 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
8245         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
8246         the .bss section.
8247         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8249 2000-05-02  H.J. Lu  <hjl@gnu.org>
8251         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
8252         ELFOSABI_SYSV.
8254 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
8256         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
8257         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
8258         dependencies.
8259         * Makefile.in: Regenerate.
8261 2000-05-01  Jim Wilson  <wilson@cygnus.com>
8263         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
8264         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
8265         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
8266         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
8267         * Makefile.in: Rebuild.
8269 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
8271         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
8272         doesn't work very well.
8274         * elf-hppa.h (elf_hppa_internal_shdr): Define.
8275         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
8276         Set hdr->s_type to 1 if ARCH_SIZE == 32.
8277         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
8278         (elf_hppa_info_to_howto): Likewise.
8279         (elf_hppa_info_to_howto_rel): Likewise.
8280         (elf_hppa_reloc_type_lookup): Likewise.
8281         (elf_hppa_is_local_label_name): Likewise.
8282         (elf_hppa_fake_sections): Likewise.
8283         (elf_hppa_final_write_processing): Likewise.
8284         (elf_hppa_howto_table): Fully initialise all entries.
8285         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
8286         (elf_hppa_info_to_howto): Likewise.
8287         (elf_hppa_info_to_howto_rel): Likewise.
8288         (elf_hppa_reloc_type_lookup): Likewise.
8289         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
8290         elf_hppa_unmark_useless_dynamic_symbols,
8291         elf_hppa_remark_useless_dynamic_symbols,
8292         elf_hppa_record_segment_addrs, elf_hppa_final_link,
8293         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
8294         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
8295         elf32-hppa.c mess is cleaned up.
8296         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
8297         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
8298         r_field then call hppa_field_adjust inline func with variable
8299         r_field arg, instead call hppa_field_adjust with fixed arg.
8300         In case R_PARISC_PCREL22F, don't set r_field.
8301         (elf_hppa_relocate_insn): Change args and return type to unsigned
8302         int.  Call re_assemble_* funcs to do the work.
8304         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
8305         sign extending.
8307         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
8308         extending.
8309         (sign_extend): Mask first before sign extending.
8310         (low_sign_extend): Rewrite without condition expression.
8311         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
8312         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
8313         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
8314         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
8315         result as function return value rather than through pointer arg.
8316         Accept unsigned int args, and return unsigned int.
8317         (re_assemble_3): New.  Combines function of dis_assemble_3 with
8318         re-assembly of opcode and immediate.
8319         (re_assemble_12): Likewise.
8320         (re_assemble_16): Likewise.
8321         (re_assemble_17): Likewise.
8322         (re_assemble_21): Likewise.
8323         (re_assemble_22): Likewise.
8324         (hppa_field_adjust): Rewrite and document, paying attention to
8325         size of types and signed/unsigned issues.
8326         (get_opcode): Shift before masking.
8327         (FDLW): Rename to FLDW.
8328         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
8329         (hppa_rebuild_insn): Change args and return value to unsigned
8330         int.  Make use of re_assemble_*.  Correct case 11.
8332         * dep-in.sed: Handle ../opcodes/.
8333         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
8334         elf64-hppa.h, hppa_stubs.h, xcoff.h.
8335         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
8336         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
8337         elfarm-nabi.lo dependencies outside of auto-dependency area.
8338         Regenerate dependencies.
8339         * Makefile.in: Regenerate.
8341         * configure.in (TRAD_HEADER): Test non-null before
8342         AC_DEFINE_UNQUOTED.
8343         * configure: Regenerate.
8345         * reloc.c: Fix mis-spelling in comment.
8347 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
8349         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
8350         * vms.c (vms_openr_next_archived_file): Return NULL.
8352 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8354         * coffcode.h Copy changes mistakenly done to libcoff.h in
8355         4/24/2000 patch.
8357 2000-04-29  Andreas Jaeger  <aj@suse.de>
8359         * libbfd-in.h: Correctly check GCC version.
8360         * bfd-in.h: Likewise.
8361         * libhppa.h: Likewise.
8362         * libbfd.h: Regenerate.
8363         * bfd-in2.h: Regenerate.
8365 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8367         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
8368         coffdu-rs6000.{lo,c}.
8369         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
8370         on xcoff.h
8371         * Makefile.in: Regenerate.
8372         * xcoff.h: New file.
8373         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
8374         * coff-rs6000.c: Move all declarations and defines that are
8375         common to the xcoff backends into xcoff.h
8376         * coff64-rs6000.c: Ditto,
8378 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8380         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
8381         _bfd_coff_force_symnames in strings and
8382         _bfd_coff_debug_string_prefix_length to their default values.
8383         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
8385 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
8387         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
8388         _bfd_coff_force_symnames in strings and
8389         _bfd_coff_debug_string_prefix_length to their default values.
8391 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
8393         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
8394         Check local_got_refcounts before dereferencing.
8396         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
8397         before deciding we don't need R_PPC_PLT32 relocation.
8398         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
8399         dereferencing.
8401         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
8403         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
8404         .plt entries.
8405         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
8406         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
8407         (elf_i386_relocate_section): Allow for .plt to go missing.
8408         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8409         can use a relative reloc for got as elf_i386_relocate_section.
8410         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8412 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
8414         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8416 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
8418         * Makefile.am (coff64-rs6000.lo): New rule.
8419         * Makefile.in: Regenerate.
8420         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8421         xcoff_is_local_label_name, xcoff_rtype2howto,
8422         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8423         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8424         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8425         (NO_COFF_SYMBOLS): Define.
8426         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8427         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8428         internally.
8429         (MINUS_ONE): New macro.
8430         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8431         relocation.
8432         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8433         coff_SWAP_aux_out): Map to the new functions.
8434         * coff64-rs6000.c: New file.
8435         * libcoff.h (bfd_coff_backend_data): Add new fields
8436         _bfd_coff_force_symnames_in_strings and
8437         _bfd_coff_debug_string_prefix_length.
8438         (bfd_coff_force_symnames_in_strings,
8439         bfd_coff_debug_string_prefix_length): New macros for above fields.
8440         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8441         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
8442         of using coff_swap_sym_in directly.
8443         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8444         (coff_set_flags) Set magic for XCOFF64.
8445         (coff_compute_section_file_positions): Add symbol name length to
8446         string section length if bfd_coff_debug_string_prefix_length is
8447         true.
8448         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8449         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8450         using coff_swap_lineno_in directly.
8451         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8452         and _bfd_coff_debug_string_prefix_length fields.
8453         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8454         symbol names into strings table when
8455         bfd_coff_force_symnames_in_strings is true.
8456         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8457         SET_RELOC_VADDR): New macros.
8458         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8459         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8460         code.
8461         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8462         changes within RS6000COFF_C specific code.
8463         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8464         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8465         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8466         Extend existing hack on target name.
8467         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8468         target name.
8469         * coff-tic54x.c (ticof): Keep up to date with new fields
8470         in bfd_coff_backend_data.
8471         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8472         targ_selvecs to include rs6000coff64_vec for rs6000.
8473         * configure.in: Add rs6000coff64_vec case.
8474         * cpu-powerpc.c: New bfd_arch_info_type.
8476 2000-04-24  Jeffrey A Law  (law@cygnus.com)
8478         * config.bfd: Only disable elf32-hppa vectors, not all of the
8479         BSD and OSF configuration support.  Provide (disabled) clauses
8480         for PA64 support.
8481         * configure.in: Add clause for PA64 support.
8482         * configure: Rebuilt.
8484         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8485         (bfd_elf64_hppa_vec): Declare.
8487         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8488         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8489         (elf64-hppa.lo): Add dependencies.
8490         * Makefile.in: Rebuilt.
8492         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8494 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
8496         * libhppa.h (dis_assemble_16): New function.
8497         (pa_arch): Added pa20w element.
8499 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
8501         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8502         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8503         bfd_elf64_slurp_reloc_table.
8505         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8506         definitions to get external names.
8507         (elf_write_relocs): Renamed from write_relocs and make global.
8508         (elf_slurp_reloc_table): Make global.
8509         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8511         * archive.c (hpux_uid_gid_encode): New function.
8512         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8513         defined and the ID is greater than 99999.
8514         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8515         special uid/gid fields into 32 bit values.
8517 2000-04-21  Matthew Green  <mrg@cygnus.com>
8519         * config.bfd: Add NetBSD/sparc64 support.
8521 2000-04-21  Richard Henderson  <rth@cygnus.com>
8522             David Mosberger  <davidm@hpl.hp.com>
8523             Timothy Wall <twall@cygnus.com>
8524             Jim Wilson  <wilson@cygnus.com>
8526         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8527         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8528         (BFD64_BACKENDS): Add elf64-ia64.lo.
8529         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8530         (cpu-ia64.lo, elf64-ia64.lo): New rules.
8531         * Makefile.in: Rebuild.
8532         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8533         (bfd_ia64_arch): Declare.
8534         (bfd_archures_list): Add bfd_ia64_arch.
8535         * bfd-in2.h: Rebuild.
8536         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8537         * configure: Rebuild.
8538         * configure.host: (ia64-*-linux*): New host.
8539         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8540         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8541         * elf.c (prep_headers): Add bfd_arch_ia64.
8542         * libbfd.h: Rebuild.
8543         * reloc.c: Add IA-64 relocations.
8544         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8545         Declare.
8546         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8547         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8549 2000-04-21  Richard Henderson  <rth@cygnus.com>
8551         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8552         contents when performing a partial link.
8553         (bfd_elf_d30v_reloc_21): Likewise.
8555 2000-04-20  H.J. Lu  <hjl@gnu.org>
8557         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8558         patch to symbols defined by a shared object.
8559         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8561 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
8563         K&R compiler fixes.
8564         * dwarf2.c (concat_filename): Avoid string literal concatenation.
8565         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8567 2000-04-11  David Mosberger  <davidm@hpl.hp.com>
8569         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8570         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8571         (coff-ia64.lo): Add dependency.
8572         * Makefile.in: Regenerate.
8573         * coff-ia64.c: New file.
8574         * efi-app-ia32.c: Ditto.
8575         * efi-app-ia64.c: Ditto.
8576         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8577         (coff_set_flags): Ditto.
8578         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8579         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8580         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8581         * configure: Regenerate.
8582         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8583         (PUT_OPTHDR_IMAGE_BASE): Ditto.
8584         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8585         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8586         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8587         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8588         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8589         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8590         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8591         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8592         (GET_PDATA_ENTRY): Ditto.
8593         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8594         data_start.  Use above macros to read fields that are 64 bit wide for
8595         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
8596         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8597         FileAlignment and SectionAlignment to minimum alignment if they
8598         are zero.
8599         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8600         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8601         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8602         Use above macros to write fields that are 64 bit wide for
8603         COFF_WITH_PEP64.
8604         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8605         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
8606         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
8607         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
8608         begin address, end address, and unwind info address only.  Use
8609         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
8610         print addresses.
8611         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8612         HIGH3ADJ relocation names.
8613         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8614         * targets.c: Declare bfd_efi_app_ia32_vec and
8615         bfd_efi_app_ia64_vec.
8616         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8617         bfd_efi_app_ia64_vec.
8619 2000-04-17  Timothy Wall  <twall@cygnus.com>
8621         * bfd-in2.h: Add prototypes for tic54x load page access.
8622         * bfd-in.h: Regenerate.
8623         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8624         in customized _set_arch_mach function.
8625         * coffcode.h (coff_set_alignment_hook): Set section load page if
8626         the appropriate macro is defined.
8627         (write_object_contents): Read section load page.
8629 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
8631         * elf32-hppa.h: Update copyright date.
8633         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8634         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8636         * elf32-d30v.c (MAX32): Don't use LL suffix.
8637         (MIN32): Define in terms of MAX32.
8638         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8640         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8641         expression.
8643         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8645 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
8647         * dep-in.sed: Match space before file name, not after.
8648         * Makefile.am: Regenerate dependencies.
8649         * Makefile.in: Regenerate.
8651         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8652         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
8653         extend without an if statement.
8655 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
8657         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8658         signed quantites.
8659         * elf32-mips.c (gprel16_with_gp): Likewise.
8660         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8661         here using -0x40000, not (int)0xfffc0000.
8662         (elf32_hppa_size_of_stub): Likewise.
8664 2000-04-11  Timothy Wall  <twall@cygnus.com>
8666         * coff-tic54x.c: Now builds with all targets.
8667         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8668         * Makefile.in: Regenerate.
8669         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8670         unitialized variable.
8672 2000-04-07  Andrew Cagney  <cagney@b1.cygnus.com>
8674         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
8675         --enable-build-warnings option.
8676         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8677         * Makefile.in, configure: Re-generate.
8679 2000-04-07  Nick Clifton  <nickc@cygnus.com>
8681         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8682         BFD_RELOC_THUMB_PCREL_BLX.
8684         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8685         R_ARM_XPC25 and R_ARM_THM_PC22.
8687         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8688         R_ARM_XPC25 and R_ARM_THM_XPC22.
8689         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8690         R_ARM_[XPC25|THM_XPC22].
8692         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8693         elf/arm-oabi.h to elf/arm.h
8695         * Makefile.am: Fix dependency for elfarm-oabi.c
8696         * Makefile.in: Regenerate.
8698         * bfd-in2.h: Regenerate.
8699         * libbfd.h: Regenerate.
8701 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8703         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8704         and restore it on failure.  Release newly allocated tdata on
8705         failure.
8707 2000-04-07  Jim Wilson  <wilson@cygnus.com>
8709         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8710         (decode_line_info): Set it.  Report error if unit->line_offset is
8711         equal to or larger than it.
8713 2000-04-07  Timothy Wall  <twall@cygnus.com>
8715         * targets.c: Added vecs for tic54x.
8716         * reloc.c: Added relocs for tic54x.
8717         * libbfd.h: Regenerated.
8718         * configure: Add TI COFF vecs for tic54x.
8719         * configure.in: Ditto.
8720         * config.bfd (targ_cpu): Recognize new tic54x target.
8721         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8722         * bfd-in2.h: Add tic54x target and relocations.
8723         * Makefile.am, Makefile.in: Add tic54x target.
8724         * archures.c (bfd_archures_list): Add tic54x target.
8725         * coff-tic54x.c: New.
8726         * cpu-tic54x.c: New.
8728 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8730         * elfcore.h (elf_core_file_p): call backend_object_p which
8731         thereby gets an opportunity to update the arch/machine type.
8733 2000-04-06  Timothy Wall  <twall@cygnus.com>
8735         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8736         class.  Handle SEC_CLINK and SEC_BLOCK flags.
8737         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8738         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8740 2000-04-06  Nick Clifton  <nickc@cygnus.com>
8742         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8743         EF_INTERWORK if this is an unknown EABI.
8744         (elf32_arm_merge_private_bfd_data): Check EABI version
8745         numbers.  Only check EF_xxx flags if the EABI version number
8746         is unknown.
8747         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8748         if the EABI version number is unknown.
8749         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8750         if the EABI version number is unknown.
8752 2000-04-05  J"orn Rennecke <amylaar@cygnus.co.uk>
8754         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8755         BFD_RELOC_SH_LOOP_END.
8756         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8757         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8758         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8759         (sh_elf_reloc_loop): New function.
8760         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8761         any more.
8762         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8763         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8764         * bfd-in2.h, libbfd.h: Regenerate.
8766 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
8768         * po/bfd.pot: Regenerate.
8770         * Makefile.am: Remove extraneous mkdep comment.
8771         (MKDEP): Use gcc -MM rather than mkdep.
8772         (DEP): Quote when passing vars to sub-make.  Add warning
8773         message to end.
8774         (DEP1): Rewrite for "gcc -MM".
8775         (CLEANFILES): Add DEP2.
8776         Update dependencies.
8777         * Makefile.in: Regenerate.
8779 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
8781         * configure.in: Added corefile support for AIX 4.3.  In particular,
8782         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8783         compiling rs6000-core.c.
8784         * configure: Regenerated.
8786 2000-04-03  H.J. Lu  <hjl@gnu.org>
8788         * cache.c (bfd_open_file): Unlink the output file only if
8789         it has non-zero size.
8791 2000-04-01  Ken Block USG  <block@zk3.dec.com>
8793         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8794         relative relocations for non-loaded sections in shared objects.
8795         (elf64_alpha_check_relocs): Similarly.
8797 2000-04-03  Hans-Peter Nilsson  <hp@axis.com>
8799         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8800         BFD_RELOC_16 to switch for extended relocs.
8801         (MY_swap_ext_reloc_in): New.
8802         (MY_swap_ext_reloc_out): New.
8803         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8804         than NAME(aout,swap_ext_reloc_in) for extended relocs.
8805         (NAME(aout,squirt_out_relocs)): Similarly use
8806         MY_swap_ext_reloc_out.
8807         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8809 2000-04-03  Kazu Hirata  <kazu@hxi.com>
8811         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8812         the R_PCRWORD_B case.
8814 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
8816         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8817         on some targets.
8818         * ihex.c : Ditto.
8820 2000-03-30  Donald Lindsay  <dlindsay@cygnus.com>
8822         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
8823         HOWTO references to bfd_elf_generic_reloc, that have
8824         partial_inplace == true, now use the new function.  The function
8825         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8826         extends its fixes to the R_M32R_{16,24,32} relocs.
8827         The new logic in m32r_elf_lo16_reloc() has been removed, and
8828         it instead calls the new routine to obtain that functionality.
8830 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
8832         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8833         elf32_avr_check_relocs, avr_final_link_relocate,
8834         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8835         elf32_avr_object_p): Add prototypes.
8836         (elf32_avr_gc_mark_hook): Add default for h->root.type.
8837         (bfd_elf_avr_final_write_processing): Make static.
8839 2000-03-27  Denis Chertykov  <denisc@overta.ru>
8841         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
8842         * archures.c (bfd_architecture): Add AVR architecture.
8843         (bfd_archures_list): Add reference to AVR architecture info.
8844         * elf.c (prep_headers): Handle bfd_arch_avr.
8845         * reloc.c: Add various AVR relocation enums.
8846         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8847         list.
8848         * Makefile.am: Add support for AVR elf.
8849         * configure.in: Likewise.
8850         * config.bfd: Likewise.
8851         * Makefile.in: Regenerate.
8852         * configure: This too.
8853         * bfd-in2.h: And this.
8854         * libbfd.h: And this.
8856 2000-03-24  H.J. Lu  <hjl@gnu.org>
8858         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8859         (elf64_alpha_find_reloc_at_ofs): Likewise.
8861 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
8863         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8864         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
8865         allowable range used to be -2**(n-1) to 2**n-1.
8866         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
8867         "boolean overflow" with "bfd_reloc_status_type flag".
8869 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
8871         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8873 2000-03-14  Kazu Hirata  <kazu@hxi.com>
8875         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8876         of shrinks properly, including the last reloc.
8878 2000-03-13  Kazu Hirata  <kazu@hxi.com>
8880         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8881         check for R_MOVL2.
8883 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
8885         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8886         a format mismatch rather than an "error" from bfd_read such as
8887         bfd_error_file_truncated.
8889 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
8891         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8892         sign-extension and big-endian compensation for
8893         R_MIPS_64 even in ld -r.
8895 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
8897         * elf32-mips.c (mips_elf_next_relocation): Rename from
8898         mips_elf_next_lo16_relocation, and generalize to look
8899         for any relocation type.
8900         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8901         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8902         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8903         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8904         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8905         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8906         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8907         (mips_rtype_to_howto): Likewise.
8908         (mips_elf_calculate_relocation): Handle new relocs.
8909         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8910         are paired.  The addend for R_MIPS_GNU_REL16_S2
8911         is shifted right two bits.
8913 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
8915         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8916         comment, and ensure it doesn't happen again.
8917         (bfd_install_relocation): Same here.
8918         (_bfd_relocate_contents): Don't bother assigning unused signmask
8919         shift result.  Fix typos in comments.
8920         Remove trailing whitespace throughout file.
8922 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
8924         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8925         * bfd-in2.h: Rebuild.
8927 2000-03-06  Nick Clifton  <nickc@cygnus.com>
8929         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8930         sym_ptr_ptr fields.
8931         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8932         (SIZEOF_ILF_STRINGS): Redefine.
8933         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
8934         relative reloc, as opposed to a section relative reloc.
8935         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8936         not C_LABEL.
8937         Add length of symbol's prefix to string pointer.
8938         Store a pointer to the symbol in the symbol pointer table.
8939         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8940         Initialise the symbol pointer table.
8941         Store the hint in the Hint/Name table.
8942         Make the jump reloc be symbol realtive, not section relative.
8943         Create an import symbol for imported code.
8945 2000-03-06  Catherine Moore  <clm@cygnus.com>
8947         * elf.c (swap_out_syms):  Check for null type_ptr.
8949 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
8951         * aout-target.h (MY(write_object_contents)): Remove unused
8952         and unusable "#if CHOOSE_RELOC_SIZE".
8953         * pc532-mach.c (MY(write_object_contents)): Ditto.
8954         * netbsd.h (MY(write_object_contents)): Ditto.
8955         * hp300hpux.c (MY(write_object_contents)): Ditto.
8956         * freebsd.h (MY(write_object_contents)): Ditto.
8957         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8959 2000-02-29  H.J. Lu  <hjl@gnu.org>
8961         * peicode.h (jtab): Make it static.
8963         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8964         defined and COFF_IMAGE_WITH_PE is not defined.
8965         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8966         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8968 2000-03-01  Nick Clifton  <nickc@cygnus.com>
8970         * coff-arm.c (bfd_arm_process_before_allocation): Make
8971         'symndx' signed to prevent compile time warning.
8973         * coff-mcore.c: Remove unused prototype for pe_object_p.
8975         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8976         functions that are not used when COFF_IMAGE_WITH_PE is
8977         defined.
8978         (struct sh_opcode): Change type of 'flags' field to unsigned
8979         long so that it can hold the USESAS flag.
8981         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8983         * elf-m10300.c (mn10300_elf_relax_section): Initialise
8984         'sym_sec'.
8986         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8987         parameters.
8988         Remove unusued variables and code.
8989         (elf_backend_add_symbol_hook): Fix prototype.
8991         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8992         'srelgot'.
8994         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8995         'oldinst'.
8997         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8998         parameters.
8999         Remove unusued variables and code.
9000         (elf_backend_add_symbol_hook): Fix prototype.
9002         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
9004         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
9005         to unused function parameter.
9007         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
9008         parameters.
9009         Use EMPTY_HOWTO to initialise empty howto slots.
9010         Remove unused variables.
9012         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
9014 2000-03-01  H.J. Lu  <hjl@gnu.org>
9016         * aoutx.h (aout_link_input_section_std): Pass "true" to
9017         the undefined_symbol callback.
9018         (aout_link_input_section_ext): Likewise.
9019         * bout.c (get_value): Likewise.
9020         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
9021         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
9022         Likewise.
9023         (alpha_relocate_section): Likewise.
9024         * coff-arm.c (coff_arm_relocate_section): Likewise.
9025         * coff-i960.c (coff_i960_relocate_section): Likewise.
9026         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
9027         * coff-mips.c (mips_relocate_section): Likewise.
9028         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
9029         * coff-sh.c (sh_relocate_section): Likewise.
9030         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
9031         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
9032         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
9033         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
9034         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
9035         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9036         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9037         * elf32-i370.c (i370_elf_relocate_section): Likewise.
9038         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9039         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9040         * elf32-sh.c (sh_elf_relocate_section): Likewise.
9041         * elf32-v850.c (v850_elf_relocate_section): Likewise.
9042         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
9043         * elflink.h (elf_link_output_extsym): Likewise.
9044         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
9045         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
9046         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
9048         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
9049         undefined_symbol callback when building shared library with
9050         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
9051         "true".
9052         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
9053         * elf32-i386.c (elf_i386_relocate_section): Likewise.
9054         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9055         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
9056         (elf32_mips_get_relocated_section_content): Likewise.
9057         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9058         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9059         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
9060         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9062 2000-02-28  Nick Clifton  <nickc@cygnus.com>
9064         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
9065         * Makefile.in: Regenerate.
9067         * configure.in: Add support for mips and sh pe vectors.
9068         * configure: regenerate.
9070         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
9071         targets.
9073         * targets.c: Add mips and sh pe vectors.
9075         * libpei.h (coff_final_link_postscript): Only define if not
9076         already defined.
9078         * coffcode.h: Add support for WinCE magic numbers.
9080         * peigen.c (pe_print_reloc): Update comment and rearrange
9081         appending of newline character.
9083         * peicode.h: Add support for Image Library Format.
9084         (pe_ILF_vars): Structure containing data used by ILF code.
9085         (pe_ILF_make_a_section): New function.  Create a section based
9086         on ILF data.
9087         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
9088         ILF data.
9089         (pe_ILF_make_a_symbol): New function.  Create a symbol based
9090         on ILF data.
9091         (pe_ILF_save_relocs): New function.  Store the relocs created
9092         by pe_ILF_make_a_reloc in a section.
9093         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
9094         an ILF object.
9095         (pe_ILF_object_p): New function.  Return a bfd_target pointer
9096         for an ILF object.
9097         (pe_bfd_object_p): If an ILF object is detected call
9098         pe_ILF_object_p on it.
9100         * coff-arm.c: Add support for WinCE relocs which are different
9101         from normal ARM COFF relocs.
9102         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
9104         * coff-sh.c: Add support for sh-pe target.
9105         * pe-sh.c: New file.  Support code for sh-pe target.
9106         * pei-sh.c: New file.  Support code for sh-pe target.
9108         * pe-mips.c: New file.  Support code for mips-pe target.
9109         * pei-mips.c: New file.  Support code for mips-pe target.
9111 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
9113         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
9114         architecture if the object causing the bump is dynamic.
9115         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
9116         and also don't it for memory ordering.
9117         (sparc64_elf_write_relocs): Take src_rela out of the loop.
9119 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
9121         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
9122         calling bfd_get_section_size_before_reloc.
9123         (decode_line_info): Likewise.
9124         (_bfd_dwarf2_find_nearest_line): Likewise.
9126 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
9128         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
9129         name of the libtool directory.
9130         * Makefile.in: Rebuild.
9132 2000-02-25  Rodney Brown (RodneyBrown@pmsc.com)
9134         * som.c (SOM_HOWTO): Define.
9135         (som_hppa_howto_table): Use it.
9137 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
9139         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
9141         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
9143 2000-02-24  Catherine Moore  <clm@cygnus.com>
9145         * som.c (som_misc_symbol_info):  Add field
9146         secondary_def.
9147         (som_bfd_derive_misc_symbol_info):  Initialize
9148         secondary_def.
9149         (som_build_and_write_symbol_table): Keep track
9150         of secondary_def field.
9151         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
9152         if secondary_def field is set.
9153         (som_bfd_ar_write_symbol_stuff): Initialize
9154         secondary_def.
9156 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
9158         * dwarf2.c (read_address): Read 16-bits addresses.
9159         (parse_comp_unit): Accept addr_size == 2.
9161 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
9163         * bfd-in.h: Update copyright date.
9165 2000-02-23  Linas Vepstas <linas@linas.org>
9167         * cpu-i370.c: New file.
9168         * elf32-i370.c:  New file.
9169         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
9170         (bfd_i370_arch): New.
9171         (bfd_archures_list): Add bfd_i370_arch.
9172         * elf.c (prep_headers): Add bfd_arch_i370.
9173         * Makefile.am: Add support for IBM 370 elf.
9174         * config.bfd: Likewise.
9175         * configure.in: Likewise.
9176         * libbfd.h (bfd_reloc_code_real_names): Likewise.
9177         * reloc.c (bfd_reloc_code_type): Likewise.
9178         * targets.c: Likewise.
9180         * Makefile.in: Regenerate.
9181         * configure: Regenerate.
9182         * bfd-in2.h: Regenerate.
9184 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
9186         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
9187         invalid relocation types, and change them to R_386_NONE.
9189 2000-02-22  H.J. Lu  <hjl@gnu.org>
9191         * elflink.h (elf_link_add_object_symbols): If a version symbol is
9192         not defined, don't add a second ELF_VER_CHR.
9194         * elflink.h (elf_bfd_final_link): Call output_extsym for global
9195         symbols converted to local symbols even when stripping all
9196         symbols.
9197         (elf_link_output_extsym): Process global symbols converted to
9198         local symbols even if they are being stripped.
9200 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
9202         * archures.c (bfd_octets_per_byte): Return unsigned int.
9203         (bfd_arch_mach_octets_per_byte): Ditto.
9204         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
9205         comparison warning.
9206         * section.c (bfd_get_section_size_before_reloc): Quell signed
9207         vs. unsigned comparison warning.
9208         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
9209         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
9210         change.  What was I thinking?
9211         * bfd-in2.h: Regenerate.
9213         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
9214         (elf_gc_sections): Same here.
9215         (elf_gc_common_finalize_got_offsets): And here.
9217 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
9219         ELF HPPA doesn't work at present; remove it until it does.
9220         * config.bfd: Comment out setting targ_defvec to
9221         bfd_elf32_hppa_vec.
9222         * Makefile.am: Rebuild dependencies.
9223         (BFD32_BACKENDS): Remove elf32-hppa.lo.
9224         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
9225         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
9226         * Makefile.in: Rebuild.
9227         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
9229 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
9231         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
9232         is no bfd_free().  Revert bfd_free part of previous change.
9234 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
9236         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
9237         arrays.
9238         (coff_compute_section_file_positions): Use bfd_free to pair
9239         bfd_malloc.
9240         (coff_write_object_contents): Likewise.
9242         * coff-rs6000.c (xcoff_howto_table_16): New variable.
9243         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
9245 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
9247         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
9248         (xcoff_ar_file_hdr_big): New structure.
9249         (SIZEOF_AR_FILE_HDR_BIG): New macro.
9250         (xcoff_ar_hdr_big): New structure.
9251         (SIZEOF_AR_HDR_BIG): New macro.
9252         (xcoff_big_format_p): New macro.
9253         (xcoff_ardata_big): New macro.
9254         (arch_xhdr_big): New macro.
9255         (xcoff_slurp_armap): Handle large archives.
9256         (xcoff_archive_p): Detect large archives.
9257         (xcoff_read_ar_hdr): Handle large archives.
9258         (xcoff_openr_next_archived_file): Handle large archives.
9259         (xcoff_generic_stat_arch_elt): Handle large archives.
9260         (xcoff_write_armap_old): Rename from xcoff_write_armap.
9261         (xcoff_write_armap_big): New function.
9262         (xcoff_write_armap): New function, dispatch to _old or _big.
9263         (xcoff_write_archive_contents_old): Rename from
9264         xcoff_write_archive_contents.
9265         (xcoff_write_archive_contents_big): New function.
9266         (xcoff_write_archive_contents): New function, dispatch to _old or
9267         _big.
9269 2000-02-18  Richard Henderson  <rth@cygnus.com>
9271         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
9272         and hide_symbol members.
9273         (elf_link_hash_copy_indirect): Remove.
9274         (elf_link_hash_hide_symbol): Remove.
9275         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
9276         and elf_backend_hide_symbol.
9277         (_bfd_elf_link_hash_copy_indirect): Declare.
9278         (_bfd_elf_link_hash_hide_symbol): Declare.
9279         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
9280         (_bfd_elf_link_hash_hide_symbol): Likewise.
9281         (_bfd_elf_link_hash_table_init): Don't init killed members.
9282         * elflink.h (elf_link_add_object_symbols): Use the bed function
9283         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
9284         (elf_link_assign_sym_version): Likewise.
9285         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
9286         (elf_backend_hide_symbol): Likewise.
9287         (elfNN_bed): Update for new members.
9289 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
9291         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
9292         STACK_END_ADDR): Define for new core file format.
9293         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
9294         for handling the vagaries of the various core file structures used
9295         by AIX over the years.
9296         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
9297         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
9298         core_dumpx structure.
9300 2000-02-17  J"orn Rennecke <amylaar@cygnus.co.uk>
9302         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
9303         (bfd_mach_sh3_dsp): Likewise.
9304         (bfd_mach_sh4): Reinstate.
9305         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
9306         * bfd-in2.h: Regenerate.
9307         * coff-sh.c (struct sh_opcode): flags is no longer short.
9308         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
9309         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
9310         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
9311         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
9312         (sh_opcodes): No longer const.
9313         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
9314         (sh_insn_uses_reg): Check for USESAS and USESR8.
9315         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
9316         (_bfd_sh_align_load_span): Return early for SH4.
9317         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
9318         Take into account that field b of a parallel processing insn
9319         could be mistaken for a separate insn.
9320         * cpu-sh.c (arch_info_struct): New array elements for
9321         sh2, sh-dsp and sh3-dsp.
9322         Reinstate element for sh4.
9323         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
9324         (SH4_NEXT): Reinstate.
9325         (SH3_NEXT, SH3E_NEXT): Adjust.
9326         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
9327         * elf32-sh.c (sh_elf_set_private_flags): New function.
9328         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
9329         (sh_elf_merge_private_data): New function.
9330         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
9331         (bfd_elf32_bfd_copy_private_bfd_data): Define.
9332         (bfd_elf32_bfd_merge_private_bfd_data): Change to
9333         sh_elf_merge_private_data.
9335 2000-02-13  Richard Henderson  <rth@cygnus.com>
9337         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
9338         hide_symbol members.
9339         (elf_link_hash_copy_indirect): New.
9340         (elf_link_hash_hide_symbol): New.
9341         * elflink.h (elf_link_add_object_symbols): Break out copy from
9342         indirect new new symbol to elf.c.
9343         (elf_link_assign_sym_version): Break out privatization of
9344         non-exported symbol to elf.c.
9345         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
9346         (_bfd_elf_link_hash_hide_symbol): New.
9347         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
9349 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
9351         * section.c (_bfd_strip_section_from_output): Add info parameter.
9352         If it passed as non-NULL, use it to check whether any input BFD
9353         has an input section which uses this output section.  Change all
9354         callers.
9355         * bfd-in2.h: Rebuild.
9357         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
9358         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
9359         1999-11-29.
9360         * bfd-in2.h: Rebuild.
9362 2000-02-10  Timothy Wall  <twall@cygnus.com>
9364         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
9365         allow final modifications of swapped-in symbol.
9366         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
9367         * coffcode.h (coff_write_relocs): Use macro
9368         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
9369         symbol index should be set to -1.
9371 2000-02-10  Toshiyasu Morita (toshi.morita@sega.com)
9373         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
9374         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
9375         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
9376         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
9377         sh_insns_uses_or_sets_freg): New functions.
9378         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
9379         * (sh_insns_conflict): Use new functions and new macros to
9380         detect conflicts when two instructions both set same integer registers,
9381         both set same fp register, and both set special register.
9383 2000-02-09  Timothy Wall  <twall@cygnus.com>
9385         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
9386         swapping in sections, so that the swapping routines have access to
9387         the arch/mach info.
9389 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
9391         * coff-go32.c: Update comment. Update copyright.
9393 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
9395         * syms.c (bfd_decode_symclass)
9396         Two new class characters were added - 'V' and 'v'.  The
9397         meaning of 'W' is now restricted to just weak non-object
9398         symbols.  This allows differentiation between, for example,
9399         weak functions vs weak objects.  nm for example now dumps:
9400         'W' = weak global
9401         'w' = weak unresolved
9402         'V' = weak global object
9403         'v' = weak unresolved object
9405         (bfd_is_undefined_symclass): New function.  Return true if the
9406         given symbol class represents and undefined/unresolved symbol.
9408         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9409         unresolved symbols.
9411         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9413         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9414         STT_ARM_16BIT flag set, but it is not attached to a data object
9415         return STT_ARM_16BIT so that it will be treated as code by the
9416         disassembler.
9418 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
9420         * coff-i386.c (i3coff_object_p): Remove prototype.
9421         Update copyright.
9423         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9424         to name.  Update copyright.
9426         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9427         assignment to avoid warning.  Update copyright.
9429 2000-01-24  Robert Lipe  (robertl@sco.com)
9431         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9432         instead of using GNU C extension.
9434 2000-01-21  Nick Clifton  <nickc@cygnus.com>
9436         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9437         amount from a bfd_in_memory structure.
9438         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9439         structure.
9441 2000-01-14  Nick Clifton  <nickc@cygnus.com>
9443         * linker.c (default_indirect_link_order): oops - fix incorrectly
9444         applied patch from Tim Wall.
9446 2000-01-13  Timothy Wall (twall@tiac.net>
9448         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9449         = scnhsz, filhsz, relsz, aoutsz, etc)
9451         * coffswap.h: Ditto.
9453 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9455         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9456         interwork thumb to arm stub.
9458 2000-01-13  Timothy Wall (twall@tiac.net>
9460         * archures.c (bfd_octets_per_byte): New function: Return
9461         target byte size.
9462         (bfd_arch_mach_octets_per_byte): New function: Return target
9463         byte size.
9465         * section.c: Distinguish between octets and bytes for usage of
9466         _cooked_size,  _raw_size, and output_offset.  Clarify
9467         description of bfd_set_section_contents.
9469         * bfd-in2.h: Regenerate.
9471         * coffgen.c: Indicate that the offset parameter is in bytes, not
9472         octets.
9474         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9475         where appropriate to get the octet offset when calling
9476         bfd_set_section_contents.
9477         (bfd_coff_reloc_link_order): Ditto.
9479         * linker.c (bfd_generic_reloc_link_order): Ditto.
9480         (_bfd_default_link_order): Ditto.
9482         * reloc.c (bfd_perform_relocation):  Distinguish between octets
9483         and bytes.  Use octets when indexing into octet data; use bytes
9484         when calculating target addresses.
9485         (bfd_install_relocation): Ditto.
9487         * srec.c (srec_write_section): Ditto.
9489 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9491         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9492         3 to 2.  This allows 4 byte sized sections, which is necessary for
9493         dlltool to build functioning DLLs.
9495 2000-01-10  Philip Blundell  <pb@futuretv.com>
9497         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9498         (arm*-*-conix*): New target.
9500 2000-01-10  Egor Duda  <deo@logos-m.ru>
9502         * config.bfd: Include elf32_i386 vector to target list for cygwin
9503         and mingw.
9505         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9506         * configure.in: Test for structure win32_pstatus_t in
9507         <sys/procfs.h>
9508         * configure: Regenerate.
9510         * elf.c (elfcore_grok_win32pstatus): New function: process
9511         win32_pstatus_t notes in elf core file.
9512         (elfcore_grok_note): Detect win32_pstatus notes.
9514 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9516         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9517         visibility.
9518         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9519         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9521 For older changes see ChangeLog-9899
9523 Local Variables:
9524 mode: change-log
9525 left-margin: 8
9526 fill-column: 74
9527 version-control: never
9528 End: