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