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