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