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