OSDN Git Service

1d153818e1e047aa4df7d650ad373c5defb68c27
[pf3gnuchains/pf3gnuchains4x.git] / bfd / ChangeLog
1 2001-08-09  H.J. Lu  <hjl@gnu.org>
2
3         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
4         (bfd_elf_fprintf_vma): Likewise.
5
6 2001-08-09  H.J. Lu  <hjl@gnu.org>
7
8         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
9         to ...
10         * elf-bfd.h: Here.
11         * bfd-in2.h: Regenerated.
12
13 2001-08-09  H.J. Lu  <hjl@gnu.org>
14
15         * bfd-in.h (bfd_sprintf_vma): New prototype.
16         (bfd_fprintf_vma): Likewise.
17         (bfd_elf_sprintf_vma): Likewise.
18         (bfd_elf_fprintf_vma): Likewise.
19         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
20         * bfd-in2.h: Regenerated.
21
22         * bfd.c (bfd_sprintf_vma): New. Defined.
23         (bfd_fprintf_vma): Likewise.
24
25         * elf.c (bfd_elf_sprintf_vma): New. Defined.
26         (bfd_elf_fprintf_vma): Likewise.
27
28 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
29
30         * coff-rs6000.c: Add missing prototypes.
31         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
32         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
33         xcoff_loader_reloc_offset): Make static.
34         * dwarf1.c: Add missing prototypes.
35         * dwarf2.c: Add missing prototypes.
36         (struct abbrev_info): Move definition.
37         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
38         * elf.c: Add missing prototypes.
39         * elf32-gen.c: Likewise.
40         * elf32-i386.c: Likewise.
41         * elf32-ppc.c: Likewise.
42         (ppc_elf_sort_rela): Use PTR instead of "void *".
43         * elflink.h: Add missing prototypes.  Formatting fixes.
44         * merge.c: Add missing prototypes.
45         (last4_eq): Use PTR instead of "void *".
46         (last_eq): Likewise.
47         * syms.c: Add missing prototypes.
48
49 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
50
51         * bfd.c: Fix formatting.
52         * bfd-in2.h: Regenerate.
53
54 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
55
56         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
57         true (this target uses REL relocations) and 'pcrel_offset' to
58         false (the PC is implied, not stored in the offset).
59
60 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
61
62         1999-10-19  Linus Nordberg  <linus@swox.se>
63         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
64         * elfxx-target.h (elf_backend_want_got_sym): Define.
65         (elfNN_bed): Add elf_backend_want_got_sym.
66         * elflink.c (_bfd_elf_create_got_section): Define
67         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
68
69 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
70
71         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
72         (find_rela_addend): New function.
73         (parse_comp_unit): Call it to find the abbrev offset addend.
74         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
75         members of dwarf2_debug as debugging information is read.
76
77 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
78
79         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
80         targets as well as sh-pe.
81
82 2001-08-03  Ben Harris <bjh21@netbsd.org>
83
84         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
85         reloc from start of section when computing value for R_ARM_REL32
86         reloc.
87
88 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
89
90         From  H.J. Lu  <hjl@gnu.org>
91         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
92         keep relocs for undefined syms if there are no dynamic sections in
93         executable.
94         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
95
96 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
97
98         * cofflink.c (coff_link_check_ar_symbols): also search for
99         __imp__symbol as well as _symbol.
100         * linker.c (_bfd_generic_link_add_archive_symbols): also
101         search for __imp__symbol as well as _symbol.
102
103 2001-08-01  Adam Nemet  <anemet@lnxw.com>
104
105         * elf.c (elf_sort_sections): Return zero only as the last step.
106
107 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
108
109         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
110         ARM_COFF_BUGFIX.
111         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
112         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
113         ARM_COFF_BUGFIX.
114
115 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
116
117         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
118         to match corresponding bfd_coff_backend data member.
119
120 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
121
122         * Makefile.am: Update dependencies with "make dep-am".
123         * Makefile.in: Regenerate
124
125 2001-07-15  H.J. Lu  <hjl@gnu.org>
126
127         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
128         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
129         * Makefile.in: Regenerate.
130
131 2001-07-11  H.J. Lu  <hjl@gnu.org>
132
133         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
134         flags when creating the reloc section if the ALLOC flag in the
135         source section is set.
136
137 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
138
139         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
140         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
141         * bfd-in2.h: Regenerate.
142         * libbfd.h: Regenerate.
143         * elfxx-ia64.c (ia64_howto_table): Define how to handle
144         new relocations.
145         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
146         (elfNN_ia64_check_relocs): Likewise.
147         (elfNN_ia64_install_value): Likewise.
148         (elfNN_ia64_relocate_section): Likewise.
149
150 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
151
152         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
153         R_SPARC_UA64.
154         (elf32_sparc_check_relocs): Likewise.
155         Only create .rela section for alloced sections in shared libraries.
156         (elf32_sparc_relocate_section): Likewise.
157         Remove redundant check.
158         Optimize unaligned reloc usage.
159         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
160         check.
161
162 2001-07-11  H.J. Lu  <hjl@gnu.org>
163
164         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
165         ALLOC|LOAD flags as the source section for debugging sections
166         when creating the reloc section.
167
168 2001-07-05  Jim Wilson  <wilson@redhat.com>
169
170         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
171         the section of the bigger symbol.
172
173         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
174
175 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
176
177         * peicode.h (coff_swap_scnhdr_in): For sections containing
178         uninitialised data, only set their size to s_paddr if this does
179         not reset their size to zero.  MS's latest compilers will set
180         s_paddr to zero.
181
182 2001-07-04  H.J. Lu  <hjl@gnu.org>
183
184         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
185         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
186         bfd_mach_mips5000.
187
188 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
189
190         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
191
192         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
193         sections being discarded.
194
195 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
196
197         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
198         instead of _bfd_elfcore_section_from_phdr.
199         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
200         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
201         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
202         (elfcore_grok_prstatus): Likewise.
203         (elfcore_grok_lwpstatus): Likewise.
204         (bfd_get_elf_phdr_upper_bound): Likewise.
205         (elfcore_make_note_pseudosection): Formatting.
206         (_bfd_elfcore_strndup): Formatting.
207         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
208         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
209
210 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
211
212         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
213         and _bfd_elfcore_strndup.
214         (struct elf_backend_data): Add elf_backend_grok_prstatus
215         and elf_backend_grok_psinfo.
216         * elf.c (_bfd_elfcore_make_pseudosection): New function.
217         (elfcore_grok_prstatus): Use it.
218         (elfcore_make_note_pseudosection): Likewise.
219         (elfcore_strndup):  Rename to...
220         (_bfd_elfcore_strndup): Here, and make global.
221         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
222         (elfcore_grok_note): Call elf_backend_grok_prstatus
223         and elf_backend_grok_psinfo if available.
224         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
225         (_bfd_elf32_mips_grok_psinfo): New function.
226         (elf_backend_grok_prstatus): Define.
227         (elf_backend_grok_psinfo): Define.
228         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
229         (elf_backend_grok_psinfo): Likewise.
230         (elfNN_bed): Include elf_backend_grok_prstatus and
231         elf_backend_grok_psinfo.
232
233 2001-06-29  H.J. Lu  <hjl@gnu.org>
234
235         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
236         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
237         is NULL before filling PLT.
238
239 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
240
241         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
242
243 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
244
245         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
246         here..
247         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
248         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
249         after gc has run.
250
251         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
252         (IS_ABSOLUTE_RELOC): Define.
253         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
254         (hppa_link_hash_newfunc): Always init it.
255         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
256         create COPY relocs only when the reloc is in a read-only section.
257         Instead, allocate space for a dynamic reloc to reference the
258         library symbol directly.  Keep track of space we allocate using
259         relocs_entries.
260         (hppa_discard_copies): Delete, and move code to..
261         (allocate_plt_and_got): ..here.  Rename to
262         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
263         relocs for non-shared link.
264         (elf32_hppa_size_dynamic_sections): Update calls to above.
265         (elf32_hppa_relocate_section): Write out the dynamic relocs used
266         in lieu of COPY relocs.
267
268         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
269         here..
270         (elf_i386_adjust_dynamic_symbol): ..nor here..
271         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
272         after gc has run.
273         (elf_i386_size_dynamic_sections): Fix a comment.
274         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
275         involved in writing reloc out.
276
277 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
278
279         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
280         Ensure syms are dynamic if we might be emitting a reloc.
281         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
282         for undefweak or undefined syms..
283         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
284
285         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
286         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
287         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
288         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
289
290 2001-06-24  H.J. Lu  <hjl@gnu.org>
291
292         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
293         strncasecmp/strcasecmp instead of strncmp/strcmp.
294
295 2001-06-23  H.J. Lu  <hjl@gnu.org>
296
297         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
298         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
299         in the regular object file and treat the weak definition as
300         the normal one.
301
302 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
303
304         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
305         unresolved_reloc test to exclude cases where we use "relocation"
306         before setting it to point into the .got.  Reinstate fudge for
307         unresolved relocs in debugging sections.
308
309         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
310         complicated tests for unresolvable relocs with a simple direct
311         scheme using "unresolved_reloc" var.
312
313         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
314         elf_i386_dyn_relocs.  Update comment.
315         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
316         dyn_relocs.
317         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
318         others to aborts.
319         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
320         abort.
321         (elf_i386_size_dynamic_sections): Likewise.
322         (elf_i386_finish_dynamic_symbol): Likewise.
323         (elf_i386_finish_dynamic_sections): Likewise.
324         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
325         handling code.
326
327         Avoid creating COPY relocs if possible.
328         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
329         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
330         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
331         reloc is in a read-only section.  Instead, allocate space for a
332         dynamic reloc to reference the library symbol directly.  Keep
333         track of space we allocate using pcrel_relocs_copied.
334         (discard_copies): Delete, and move code to ..
335         (allocate_plt_and_got): ..here.  Rename to
336         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
337         relocs for non-shared link.
338         (elf_i386_size_dynamic_sections): Update calls to above functions.
339         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
340         more ugly logic to avoid "unresolvable relocation" error.  Use
341         htab shortcut in place of elf_hash_table macro.
342         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
343         not always be created now.
344
345 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
346
347         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
348         shared libraries.
349
350 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
351
352         * configure.host (mips64-*-linux): Reformat.
353
354 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
355
356         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
357         allocate local .got space.  Use shortcuts from hash table for .got
358         and .plt rather than comparing section names.
359         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
360         adjusting index into local_got_refcounts to document what we are
361         really doing.
362         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
363         Tidy .got and .plt error checking.
364
365 2001-06-20  Catherine Moore  <clm@redhat.com>
366
367         * elf-bfd.h (struct elf_backend_data):
368         elf_backend_emit_relocs: New field: Function for emitting
369         relocs.
370         elf_backend_count_relocs: New field: Function for determining
371         the number of relocs to be emitted.
372         * elfxx-target.h: Provide default (NULL) values for
373         elf_backend_emit_relocs and elf_backend_count_relocs.
374         * elflink.h (elf_link_size_reloc_section): Make the hash table
375         big enough to hold the relocs counted by either reloc_count or
376         o->reloc_count.
377         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
378         should be emitted, either because of a command line option
379         stored in the info structure or because the target provides a
380         special reloc emitting function.
381         If the target provides a reloc counting function use it,
382         unless performing a relocatable link or emitting all relocs.
383         Also set the SEC_RELOC flag on any output section which will
384         contain relocs.
385         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
386         should be emitted, either because of a command line option
387         stored in the info structure or because the target provides a
388         special reloc emitting function.
389         If the target provides a reloc emitting function, use it,
390         unless performing a relocatable link or emitting all relocs.
391
392 2001-06-20  H.J. Lu  <hjl@gnu.org>
393
394         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
395         allocate local .got space.
396
397 2001-06-19  Andreas Jaeger  <aj@suse.de>
398
399         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
400         dynamic symbols.
401
402 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
403
404         * elflink.h (struct elf_assign_sym_version_info): Remove member
405         export_dynamic.  All users changed to use info member.
406         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
407         export_dynamic, instead use member in parameter info.
408         * bfd-in.h (bfd_elf32_size_dynamic_sections,
409         bfd_elf64_size_dynamic_sections): Update prototype.
410         * bfd-in2.h: Regenerate.
411
412 2001-06-18  H.J. Lu  <hjl@gnu.org>
413
414         * elflink.h (elf_info_failed): Add a new field, verdefs.
415         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
416         elf_export_symbol.
417         (elf_export_symbol): Check eif->verdefs to decide if a symbol
418         should be exported.
419
420 2001-06-17  H.J. Lu  <hjl@gnu.org>
421
422         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
423         readonly_reloc, to record if a relocation in the .rel.dyn
424         section is against a read-only section.
425         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
426         field to false.
427         (_bfd_mips_elf_check_relocs): Record if there is a relocation
428         in the .rel.dyn section against a read-only section by setting
429         DF_TEXTREL or readonly_reloc.
430         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
431         it is true.
432         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
433         there is a relocation in the .rel.dyn section against a
434         read-only section.
435         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
436         DF_TEXTREL is set.
437
438 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
439
440         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
441         function.  Move flagword result into parameter list.  Remove
442         comment about setting bfd_error_handler to intercept failure
443         results.
444         * coffgen.c (make_a_section_from_file): Examine result of
445         calling bfd_coff_styp_to_sec_flags and pass a failure back to
446         caller.
447         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
448         function.  Move flagword result into parameter list.
449         * libcoff.h: Regenerate.
450         * libecoff.h: Regenerate.
451
452 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
453
454         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
455         section is going to follow it.
456
457 2001-06-12  Catherine Moore  <clm@redhat.com>
458
459         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
460         with the file_align entry from elf_backend_data.
461         (elf_gc_smash_unused_vtentry_relocs): Likewise.
462         (elf_gc_record_vtentry): Likewise.
463
464 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
465
466         * elflink.h: Whitespace changes.
467         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
468         rather than "unsigned char".
469         (elf_link_output_relocs): Likewise.
470         (elf_link_input_bfd): Likewise.
471         (elf_reloc_link_order): LIkewise.
472         * elf.c: s/CONST/const/.  Whitespace changes.
473         * elf32-mips.c: Formatting fix.
474
475         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
476         * Makefile.in: Regenerate.
477         * po/Make-in: Remove trailing tab.
478
479 2001-06-09  Philip Blundell  <philb@gnu.org>
480
481         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
482         change.
483         (elf32_arm_plt_entry): Likewise.
484
485 2001-06-08  H.J. Lu  <hjl@gnu.org>
486
487         * elf.c (swap_out_syms): Keep names for global section symbols.
488
489 2001-06-07  H.J. Lu  <hjl@gnu.org>
490
491         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
492         MIPS-based machines need it.
493
494 2001-06-07  H.J. Lu  <hjl@gnu.org>
495
496         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
497         for SGI only.
498
499         * config.bfd: Remove ecoff from Linux/mips.
500
501 2001-06-07  Andreas Jaeger  <aj@suse.de>
502
503         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
504         assertion.
505         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
506         alignment of 8 for .rela sections; handle further relocations.
507
508 2001-06-06  Christian Groessler <cpg@aladdin.de>
509
510         * coff-z8k.c: Fix formatting.
511         Fix howtos: howto->size was always 1.
512
513 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
514
515         * configure.host (mips64*-*-linux*): Define.
516
517 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
518
519         * elf32-i386.c (elf_i386_discard_copies): Rename to
520         discard_copies, and use elf_link_hash_entry arg rather than
521         elf_i386_link_hash_entry.
522         (elf_i386_link_hash_traverse): Delete.
523         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
524         Tidy sizing of dynamic sections.
525         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
526         possible .plt entries.
527         (elf_i386_gc_sweep_hook): Likewise.
528         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
529         everything with plt.refcount <= 0.
530
531         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
532         .relgot space here.
533         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
534         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
535         .rel.plt here..
536         (allocate_plt_and_got): ..instead do it all here.  New function.
537         (elf_i386_size_dynamic_sections): Allocate local .got space and
538         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
539         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
540         rather than gc variety).
541         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
542         (elf_i386_relocate_section): Use it here and correct handling of
543         R_386_GOT32.  Provide section and offset for "unresolvable
544         relocation" error message.
545         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
546
547         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
548         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
549         (elf_i386_link_hash_table_create): Init them.
550         (create_got_section): New function.
551         (elf_i386_create_dynamic_sections): New function.
552         (elf_backend_create_dynamic_sections): Set to above.
553         (elf_i386_check_relocs): Use shortcuts from hash table rather than
554         calling bfd_get_section_by_name.
555         (elf_i386_gc_sweep_hook): Likewise.
556         (elf_i386_adjust_dynamic_symbol): Likewise.
557         (elf_i386_size_dynamic_sections): Likewise.
558         (elf_i386_relocate_section): Likewise.
559         (elf_i386_finish_dynamic_sections): Likewise.
560
561         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
562
563 2001-06-02  H.J. Lu  <hjl@gnu.org>
564
565         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
566         and ELFOSABI_HPUX.
567         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
568
569 2001-06-02  H.J. Lu  <hjl@gnu.org>
570
571         * aout-cris.c (MACHTYPE_OK): New. Defined.
572
573 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
574
575         * section.c (_bfd_strip_section_from_output): Handle NULL
576         output_section.
577
578 2001-06-02  H.J. Lu  <hjl@gnu.org>
579
580         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
581         rs6000coff64_vec only if BFD64 is defined.
582         (powerpc64-*-aix*): Enable only if BFD64 is defined.
583
584 2001-06-02  H.J. Lu  <hjl@gnu.org>
585
586         * coff-ia64.c (ia64coff_object_p): Rewrite with
587         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
588
589 2001-06-01  Andreas Jaeger  <aj@suse.de>
590
591         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
592         relocation, small reformatting.
593
594 2001-05-29  Andreas Jaeger  <aj@suse.de>
595
596         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
597         (elf64_x86_64_relocate_section): Likewise.
598
599 2001-05-30  Alan Modra  <amodra@one.net.au>
600
601         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
602         millicode.  Don't allocate .got and .rela.got space here..
603         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
604         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
605         .rela.plt here..
606         (hppa_handle_PIC_calls): ..nor here..
607         (allocate_plt_and_got): ..instead do it all here.  New function.
608         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
609         call allocate_plt_and_got.  No need to zap .got if not dynamic.
610         (elf32_hppa_final_link): Call regular bfd_final_link instead of
611         gc_common_final_link.
612         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
613         (elf32_hppa_relocate_section): Use it here.
614         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
615         dynamic_sections_created.
616         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
617
618 2001-05-28  Andreas Jaeger  <aj@suse.de>
619
620         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
621         generic version since we want a hashsize of 4.
622         (elf_backend_size_info): Likewise.
623
624 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
625
626         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
627         a zeroing loop.
628         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
629         (elf_link_input_bfd): Likewise.
630         (elf_reloc_link_order): Likewise.
631         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
632         relocations correctly.
633
634 2001-05-28  Nicolas Pitre <nico@cam.org>
635
636         * elf32-arm.h: fix PLT generation for big endian ARM
637
638 2001-05-28  Alan Modra  <amodra@one.net.au>
639
640         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
641         for symbols forced local that need plabels.
642         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
643         .plt.rela for local syms if non-shared.
644         (hppa_build_one_stub): Mask lsb of plt.offset.
645         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
646         (clobber_millicode_symbols): Correct comment.
647         (elf32_hppa_relocate_section): Likewise.
648         (elf32_hppa_finish_dynamic_symbol): Likewise.
649
650 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
651
652         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
653         * bfd-in2.h: Regenerate.
654         * libbfd.h: Regenerate.
655         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
656         and BFD_RELOC_SPARC_UA64 mapping
657         * elf64-sparc.c: Likewise.
658
659 2001-05-25  H.J. Lu  <hjl@gnu.org>
660
661         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
662         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
663         (coff-rs6000.lo): Remove the old dependency.
664         * Makefile.in: Rebuild.
665
666         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
667         coff-rs6000.lo.
668
669 2001-05-25  H.J. Lu  <hjl@gnu.org>
670
671         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
672         rs6000coff_core_file_matches_executable_p,
673         rs6000coff_core_file_failing_command and
674         rs6000coff_core_file_failing_signal only if AIX_CORE is
675         defined.
676         (pmac_xcoff_vec): Likewise.
677         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
678
679 2001-05-25  Timothy Wall  <twall@redhat.com>
680
681         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
682         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
683
684 2001-05-25  H.J. Lu  <hjl@gnu.org>
685
686         * bfd-in2.h: Regenerated.
687         * libcoff.h: Likewise.
688
689 2001-05-25  Alan Modra  <amodra@one.net.au>
690
691         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
692         undefined millicode syms in shared libs.
693         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
694         (elf32_hppa_check_relocs): Likewise.
695         (elf32_hppa_adjust_dynamic_symbol): Likewise.
696         (elf32_hppa_size_dynamic_sections): Likewise.
697         (elf32_hppa_relocate_section): Likewise.
698         (elf32_hppa_finish_dynamic_symbol): Likewise.
699         (elf32_hppa_finish_dynamic_sections): Likewise.
700
701 2001-05-24  Tom Rix <trix@redhat.com>
702
703         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
704         xcoff-target.h not used to define rs6000 or ppc bfd.
705         * Makefile.in same
706
707         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
708         to 64 bit.
709
710         * coff-rs6000.c : Many changes for 64 bit support.  Move common
711         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
712         and pmac_xcoff_vec
713
714         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
715         linker now supported.  Explictly define the rs6000coff64_vec.
716
717         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
718         (coff_print_aux) same
719         (coff_write_object_contents) same
720         (coff_slurp_line_table) same
721
722         * coffgen.c : (coff_fix_symbol_name) formatting
723         (coff_mangle_symbols) xcoff 64 bit support
724         (coff_write_symbol) same
725         (coff_write_alien_symbol) same
726         (coff_write_native_symbol) same
727         (coff_write_symbols) same
728         (coff_get_symbol_info) same
729         (bfd_coff_get_syment) same
730         (coff_print_symbol) same
731
732         * config.bfd : add powerpc64-*-aix* target
733
734         * libcoff-in.h : formatting
735
736         * libcoff.h : move xcoff extern declarations to libxcoff.h
737
738         * libxcoff.h : New file
739
740         * xcofflink.c : Many changes for xcoff64 support.  Move common
741         structures to include/coff/xcoff.h.  Move specific structure to
742         backends coff-rs6000.c and coff64-rs6000.c.   Use new backend
743         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
744
745         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
746         aix4.2+ -binitfini.
747
748         (xcoff_build_ldsyms) : handle special __rtinit symbol.
749
750 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
751
752         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
753         s/ENTIRES/ENTRIES/.
754
755 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
756
757         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
758         * libbfd.h: Regenerate.
759         * bfd-in2.h: Regenerate.
760
761         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
762         * archures.c (bfd_mach_mips12000): Define.
763         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
764         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
765         support.
766         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
767         * bfd-in2.h: Regenerate.
768         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
769
770 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
771
772         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
773         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
774         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
775         that is used by GCC.
776
777 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
778
779         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
780         of entries in a structured section.
781         * elf.c: Use new macro.
782         * elf32-i386.c: Use new macro.
783         * elf32-mips.c: Use new macro.
784         * elf64-alpha.c: Use new macro.
785         * elf64-sparc.c: Use new macro.
786         * elfcode.h: Use new macro.
787         * elflink.h: Use new macro.
788
789 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
790
791         * bfdint.texi: Replace -oformat with --oformat.
792
793 2001-05-21  Andreas Jaeger  <aj@suse.de>
794
795         * dwarf2.c (decode_line_info): Fix error message.
796         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
797         adjust error message.
798
799 2001-05-18  H.J. Lu  <hjl@gnu.org>
800
801         * elflink.h (elf_link_add_object_symbols): Revert the last
802         change.
803
804 2001-05-17  Alan Modra  <amodra@one.net.au>
805
806         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
807         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
808         (hppa_build_one_stub): Add an assert to check plt.offset.
809
810 2001-05-17  H.J. Lu  <hjl@gnu.org>
811
812         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
813         version definition to basename of the output filename.
814
815 2001-05-17  H.J. Lu  <hjl@gnu.org>
816
817         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
818         basename of the bfd filename.
819
820 2001-05-16  Alan Modra  <amodra@one.net.au>
821
822         * section.c (asection): Add linker_has_input field.
823         (STD_SECTION): Adjust initialization to suit.
824         * ecoff.c (bfd_debug_section): Likewise.
825         * bfd-in2.h: Regenerate.
826
827 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
828
829         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
830         negative 32-bit operands to 16 operands when the operand is
831         going to be zero-extended by the modified opcode.
832
833 2001-05-12  Peter Targett  <peter.targett@arccores.com>
834
835         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
836         name for 'arc5' core versions.
837         (bfd_arc_arch): Make bfd_mach_arc_6 default.
838
839         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
840         architecture.
841         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
842
843 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
844
845         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
846         sections as well.
847         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
848         to .gnu.linkonce.t.FOO text section.
849
850 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
851
852         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
853         fields, change sec into secinfo.
854         (struct sec_merge_info): Add chain, remove last fields.
855         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
856         (sec_merge_hash_lookup): If lookup could not use a string only
857         because it has bad alignment, mark the old string for deletion.
858         (sec_merge_add): Add secinfo argument. Don't compute entry's
859         position, instead record the section.
860         (sec_merge_emit): Update for the sec into secinfo change in
861         struct sec_merge_hash_entry.
862         (_bfd_merge_section): Only record the section for merging, defer
863         putting strings into the hash table.
864         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
865         _bfd_merge_sections): New functions.
866         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
867         changes.
868         * libbfd-in.h (_bfd_merge_sections): Add prototype.
869         (_bfd_nolink_bfd_merge_sections): Define.
870         * libbfd.h: Likewise.
871         (bfd_generic_merge_sections): Add prototype.
872         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
873         (struct bfd_target): Likewise.
874         * bfd.c (bfd_merge_sections): Define.
875         * bfd-in2.h: Rebuilt.
876         * elf.c (_bfd_elf_merge_sections): New function.
877         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
878         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
879         * reloc.c (bfd_generic_merge_sections): New function.
880         * vms.c (vms_bfd_merge_sections): New function.
881         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
882         * aout-target.h (MY_bfd_merge_sections): Define.
883         * aout-tic30.c (MY_bfd_merge_sections): Define.
884         * binary.c (binary_bfd_merge_sections): Define.
885         * bout.c (b_out_bfd_merge_sections): Define.
886         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
887         * coffcode.c (coff_bfd_merge_sections): Define.
888         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
889         * i386msdos.c (msdos_bfd_merge_sections): Define.
890         * i386os9k.c (os9k_bfd_merge_sections): Define.
891         * ieee.c (ieee_bfd_merge_sections): Define.
892         * ihex.c (ihex_bfd_merge_sections): Define.
893         * nlm-target.h (nlm_bfd_merge_sections): Define.
894         * oasys.c (oasys_bfd_merge_sections): Define.
895         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
896         * som.c (som_bfd_merge_sections): Define.
897         * srec.c (srec_bfd_merge_sections): Define.
898         * tekhex.c (tekhex_bfd_merge_sections): Define.
899         * versados.c (versados_bfd_merge_sections): Define.
900         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
901
902 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
903
904         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
905         to be unsigned long, in order to match its use.
906
907 2001-05-10  H.J. Lu  <hjl@gnu.org>
908
909         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
910         indirect symbols.
911
912 2001-05-09  H.J. Lu  <hjl@gnu.org>
913
914         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
915         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
916         Remove the unused veriable `dynver'.
917
918 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
919
920         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
921         NULL or is not COFF.
922         (coff_i386_rtype_to_howto): Don't dump core if output section
923         owner is not COFF.
924
925 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
926
927         * ecoff.c (bfd_debug_section): Fix initialization.
928         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
929         is always a positive integer. Cast away sign mismatch.
930         * elf32-mips.c: Fix misleading comment and typo.
931         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
932         correct data type.
933         * elflink.c: Fix typo.
934         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
935         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
936
937 2001-05-04  Richard Henderson  <rth@redhat.com>
938
939         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
940
941 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
942
943         * elf32-arm.h (elf32_arm_final_link_relocate): Set
944         EF_ARM_HASENTRY if the start address is set.
945
946 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
947
948         * targets.c (_bfd_target_vector_entries): Compute value based on
949         the size of the _bfd_target_vector and not bfd_target_vector.
950
951 2001-05-03  H.J. Lu  <hjl@gnu.org>
952
953         * elfcode.h: Include "libiberty.h".
954
955         * elflink.h (elf_link_add_object_symbols): Set
956         elf_dt_name (abfd) to basename of the bfd filename.
957         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
958         of the bfd filename.
959
960 2001-05-03  Andreas Jaeger  <aj@suse.de>
961
962         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
963         (elf_generic_info_to_howto_rel): Likewise.
964         * coff-alpha.c (reloc_nil): Likewise.
965         (alpha_ecoff_bad_format_hook): Likewise.
966         (alpha_adjust_reloc_out): Likewise.
967         (alpha_bfd_reloc_type_lookup): Likewise.
968         (alpha_convert_external_reloc): Likewise.
969         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
970         (elf64_alpha_reloc_bad): Likewise.
971         (elf64_alpha_reloc_gpdisp): Likewise.
972         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
973         (elf64_alpha_info_to_howto): Likewise.
974         (elf64_alpha_add_symbol_hook): Likewise.
975         (elf64_alpha_create_got_section): Likewise.
976         (elf64_alpha_is_local_label_name): Likewise.
977         (elf64_alpha_merge_ind_symbols): Likewise.
978         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
979         (mips_elf64_get_reloc_upper_bound): Likewise.
980         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
981         (nlm_alpha_get_public_offset): Likewise.
982
983 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
984
985         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
986         about overflow in R_OPENRISC_LO_16_IN_INSN and
987         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
988
989 2001-04-30  H.J. Lu  <hjl@gnu.org>
990
991         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
992         only for ELF_LINK_FORCED_LOCAL.
993         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
994         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
995         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
996
997         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
998         if the symbol has hidden or internal visibility.
999
1000 2001-04-30  Alan Modra  <amodra@one.net.au>
1001
1002         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
1003         calls to undefined weak symbols.
1004
1005 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
1006
1007         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
1008         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
1009
1010 2001-04-27  Andreas Jaeger  <aj@suse.de>
1011
1012         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
1013         out handled entries.
1014         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
1015         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
1016         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
1017         GOT32.
1018
1019 2001-04-27  Sean McNeil <sean@mcneil.com>
1020
1021         * config.bfd: Add arm-vxworks target.
1022         * coff-arm (coff_arm_relocate_section): Add in symbol value to
1023         addend (fro VXworks targets).
1024
1025 2001-04-26  H.J. Lu  <hjl@gnu.org>
1026
1027         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
1028         valid.
1029
1030 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
1031
1032         * bfd-in.h (bfd_cache_close): Declare newly exported function.
1033         * bfd-in2.h: Regenerated.
1034
1035 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
1036
1037         * merge.c (struct sec_merge_hash_entry): Add alignment field.
1038         (struct sec_merge_hash): Remove alignment_power.
1039         (sec_merge_hash_newfunc): Clear alignment.
1040         (sec_merge_hash_lookup): Pass alignment as argument.
1041         Use hashp->root.next, not hashp->next to walk the hash chain.
1042         If a string already in the hashtable does not have required
1043         alignment, create a new hashtable entry.
1044         (sec_merge_init): Remove alignment_power argument.
1045         (sec_merge_add): Add alignment argument.
1046         (sec_merge_emit): Alignment is now a per-entity thing, not per
1047         section.
1048         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
1049         for proper alignment.
1050         Pass alignment information to sec_merge_add.
1051
1052 2001-04-24  Christian Groessler  <cpg@aladdin.de>
1053
1054         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
1055         and R_REL16 reloc types; accept odd values for R_REL16 type
1056
1057 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
1058
1059         * cpu-openrisc.c: New file.
1060         * elf32-openrisc.c: Likewise.
1061
1062         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
1063         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
1064         (BFD32_BACKENDS): Add elf32-openrisc.lo.
1065         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
1066         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
1067         * Makefile.in: Regenerated.
1068         * config.bfd: (openrisc-*-elf): New target.
1069         * configure.in (bfd_elf32_openrisc_vec): New vector.
1070         * configure: Regenerated.
1071         * libbfd.h: Regenerated.
1072         * bfd-in2.h: Regenerated.
1073         * reloc.c: Add OpenRISC relocations.
1074         * targets.c (bfd_elf32_openrisc_vec): Declare.
1075         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
1076         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
1077         (bfd_openrisc_arch): Declare.
1078         (bfd_archures_list): Add bfd_openrisc_arch.
1079         * elf.c (prep_headers): Add bfd_arch_openrisc.
1080
1081 2001-04-23  Bo Thorsen  <bo@suse.de>
1082
1083         * elf64-x86-64.c: Add c++ vtable hack.
1084         Small whitespace and comment changes.
1085
1086 2001-04-19  Andreas Jaeger  <aj@suse.de>
1087
1088         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
1089         (elf64_x86_64_plt_entry): Likewise.
1090         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
1091         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
1092
1093 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
1094
1095         * elf32-cris.c: Tweak comments related to dynamic linking.
1096         (cris_elf_relocate_section): When not creating shared object, fill
1097         in the .got table for any symbol not in the dynamic symbol table.
1098         (elf_cris_finish_dynamic_symbol): When not creating shared object,
1099         only emit a .got.rela reloc if the symbol is in the dynamic symbol
1100         table.
1101         (cris_elf_check_relocs): Use variable r_type in all places rather
1102         than the original expression.  Add default case in switch for
1103         reloc types.
1104         (elf_cris_size_dynamic_sections): Iterate over
1105         elf_cris_discard_excess_program_dynamics when not creating shared
1106         library.
1107         (elf_cris_discard_excess_dso_dynamics): Renamed from
1108         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
1109         (elf_cris_discard_excess_program_dynamics): New.
1110
1111 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
1112
1113         * coffcode.h (coff_write_object_contents): Use
1114         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
1115
1116 2001-04-14  H.J. Lu  <hjl@gnu.org>
1117
1118         * bfd-in2.h: Regenerate.
1119
1120 2001-04-14  Jakub Jelinek <jakub@redhat.com>
1121
1122         * section.c (STD_SECTION): Add entsize.
1123
1124 2001-04-13  H.J. Lu  <hjl@gnu.org>
1125
1126         * section.c (SEC_MERGE): Define new flag for merging.
1127         (SEC_STRINGS): Likewise.
1128         (entsize): New field.
1129
1130 2001-04-13  Roger Sayle  <roger@metaphorics.com>
1131
1132         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
1133         flag on pe-i386 targets.
1134
1135 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
1136
1137         * libbfd-in.h (_bfd_merge_section): New.
1138         (_bfd_write_merged_section): New.
1139         (_bfd_merged_section_offset): New.
1140         * libbfd.h: Rebuilt.
1141         * linker.c (_bfd_generic_link_output_symbols): Handle
1142         discard_sec_merge.
1143         * aoutx.h (aout_link_write_symbols): Likewise.
1144         * pdp11.c (aout_link_write_symbols): Likewise.
1145         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
1146         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
1147         sections.
1148         (elf_link_sec_merge_syms): New.
1149         (elf_link_input_bfd): Call _bfd_merged_section_offset
1150         and _bfd_write_merged_section.
1151         Handle discard_sec_merge.
1152         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
1153         field.
1154         (struct bfd_elf_section_data): Likewise.
1155         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
1156         SEC_STRINGS section flags and entsize from their ELF counterparts.
1157         (_bfd_elf_link_hash_table_init): Initialize merge_info.
1158         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
1159         from their BFD counterparts.
1160         * merge.c: New file.
1161         * Makefile.am: Add strtab.lo.
1162         * Makefile.in: Rebuilt.
1163
1164 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
1165
1166         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
1167         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
1168
1169 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
1170
1171         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
1172         endian MIPS ELF target.
1173         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1174         MIPS ELF target.
1175
1176         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1177         64bit big endian MIPS ELF target.
1178         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1179         endian MIPS ELF target.
1180         * configure: Regenerated.
1181
1182         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1183         little endian targets.
1184         (mips_elf_sym_is_global): Handle traditional targets.
1185
1186         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1187         64bit big endian MIPS ELF target.
1188         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1189         endian MIPS ELF target.
1190
1191         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1192         and bfd_elf64_tradlittlemips_vec.
1193
1194 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
1195
1196         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1197         ordinary "progbits" section.
1198
1199 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
1200
1201         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1202         when -Bsymbolic causes a symbol to no longer need a .plt entry.
1203
1204 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
1205
1206         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1207
1208 2001-03-30  H.J. Lu  <hjl@gnu.org>
1209
1210         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1211         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1212
1213 2001-03-26  H.J. Lu  <hjl@gnu.org>
1214
1215         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1216         if there are any relocations for generic ELF.
1217         (bfd_elf32_bfd_link_add_symbols): Defined to
1218         elf32_generic_link_add_symbols.
1219         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1220         if there are any relocations for generic ELF.
1221         (bfd_elf64_bfd_link_add_symbols): Defined to
1222         elf64_generic_link_add_symbols.
1223
1224 2001-03-23  Nick Clifton  <nickc@redhat.com>
1225
1226         * Makefile.am (BUILD_CFILES): New variable: List of C source
1227         files created in build directory.
1228         (BUILD_HFILES): New variable: List of header files created in
1229         build directory.
1230         (POTFILES): Delete.
1231         (po/POTFILES.in): Replace rule with empty entry.
1232         (po/SRC-POTFILES.in): New rule: Create a list of source files
1233         in the source directory.
1234         (po/BLD-POTFILES.in): New rule: Create a list of source files
1235         in the build directory.
1236         (MOSTLYCLEAN): Do not delete source files created in build
1237         directory.
1238         * Makefile.in: Regenerate.
1239         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1240         into po/Makefile.
1241         * configure: Regenerate.
1242
1243         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1244         and BLD_POTFILES.
1245         Add .. to the search path when building bfd.pot.
1246         Delete POTFILES when performing distclean.
1247         Add comment describing why distclean is broken in maintainer mode.
1248         * po/POTFILES.in: Delete.
1249         * po/SRC-POTFILES.in: New file.
1250         * po/BLD-POTFILES.in: New file.
1251         * po/bfd.pot: Regenerate.
1252
1253 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
1254
1255         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
1256         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1257         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1258         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1259         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1260         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1261         functions.
1262         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1263         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
1264         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1265         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1266         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1267         New HOWTO members for new relocs.
1268         (cris_reloc_map): Map new relocs.
1269         (ELF_DYNAMIC_INTERPRETER): Define.
1270         (PLT_ENTRY_SIZE): Define.
1271         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1272         elf_cris_pic_plt_entry): New, PLT templates.
1273         (struct elf_cris_pcrel_relocs_copied, struct
1274         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1275         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1276         (cris_final_link_relocate): Check that 16-bit GOT relocs have
1277         positive values.  Adjust PCREL relocs to be relative to location
1278         after relocation.
1279         (cris_elf_relocate_section): Handle relocations to dynamic
1280         objects.  Handle new relocations.  Call error handler when seeing
1281         non-PIC relocation for read-only sections while generating shared
1282         object.
1283         (cris_elf_check_relocs): Set reference counts for GOT and PLT
1284         entries.
1285         (bfd_elf32_bfd_link_hash_table_create,
1286         elf_backend_adjust_dynamic_symbol,
1287         elf_backend_size_dynamic_sections,
1288         elf_backend_finish_dynamic_symbol,
1289         elf_backend_finish_dynamic_sections,
1290         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1291         elf_backend_hide_symbol, elf_backend_want_got_plt,
1292         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1293         elf_backend_got_header_size, elf_backend_plt_header_size):
1294         Define.
1295
1296         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1297         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1298         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1299         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1300         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1301         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1302         * bfd-in2.h, libbfd.h: Regenerate.
1303
1304 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
1305
1306         (_bfd_mips_elf_relocate_section): Give a better error message when
1307         a relocation is not recognized.
1308
1309 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
1310
1311         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1312         non-NULL before attempting to dereference.
1313
1314 2001-03-20  H.J. Lu  <hjl@gnu.org>
1315
1316         * configure.in: Remove the redundent AC_ARG_PROGRAM.
1317         * configure: Rebuild.
1318
1319 2001-03-20  Andreas Schwab  <schwab@suse.de>
1320
1321         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1322         relocation value when resolving a reference from a debugging
1323         section.
1324
1325 2001-03-16  Scott Thomason  <SThomaso@hii.com>
1326
1327         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1328         (xcoff64_swap_sym_out): Fix syntax errors.
1329
1330 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
1331
1332         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1333
1334 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
1335
1336         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1337         (hppa_link_hash_newfunc): Init it.
1338         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1339         section appears to be non-PIC.
1340         (final_link_relocate): Likewise.
1341         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1342         possible candidate function, and set pic_call for those that will
1343         only have a .plt entry for the PIC call stub.
1344         (hppa_handle_PIC_calls): Set maybe_pic_call.
1345
1346 2001-03-12  DJ Delorie  <dj@redhat.com>
1347
1348         * elf32-sh.c (sh_elf_relocate_section): Only relocation
1349         R_SH_DIR8WP* relocs if they're against external symbols, else
1350         they're just for relaxing.  Validate the reloc values.
1351
1352 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
1353
1354         * binary.c (bfd_external_binary_architecture): Declare.
1355         (binary_object_p): If bfd_external_binary_architecture is defined,
1356         set the architecture to this string.
1357
1358 2001-03-11  Philip Blundell  <philb@gnu.org>
1359
1360         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1361         entries that could serve as a definition for a weak symbol.
1362
1363 2001-03-08  Nick Clifton  <nickc@redhat.com>
1364
1365         * Most files: Update copyright notices using Perl script created
1366         by Kevin Buettner <kevinb@redhat.com>.
1367
1368 2001-03-07  Nick Clifton  <nickc@redhat.com>
1369
1370         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1371         prior patch on ! defined OLD_ARM_ABI.
1372
1373 2001-03-07  Andreas Jaeger  <aj@suse.de>
1374
1375         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1376         some relocation values.
1377
1378 2001-03-06  Nick Clifton  <nickc@redhat.com>
1379
1380         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1381         of offset in BLX(1) instruction.
1382         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1383         offset in BLX(1) instruction.
1384         Fix formatting.
1385
1386 2001-03-06  Nick Clifton  <nickc@redhat.com>
1387
1388         * coff-arm.c (coff_arm_reloc_type_lookup): Add
1389         BFD_RELOC_THUMB_PCREL_BLX.
1390
1391 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
1392
1393         * archures.c (bfd_default_scan): Add Coldfire CPUs.
1394         * bfd-in2.h: Regenerate.
1395         * cpu-m68k.c: Add Coldfire CPUs for arch table.
1396         * ieee.c (ieee_write_processor): Set proper id for
1397         Coldfire CPUs.
1398
1399 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
1400
1401         * configure.in: Add s390 target.
1402         * configure: Regenerate.
1403
1404 2001-02-28  Andreas Jaeger  <aj@suse.de>
1405
1406         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1407         to addend.
1408
1409 2001-02-28  Philip Blundell  <pb@futuretv.com>
1410
1411         * elf32-arm.h: Update mentions of renamed EF_xx constants.
1412         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1413
1414 2001-02-27  H.J. Lu  <hjl@gnu.org>
1415
1416         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1417         abfd->tdata.aout_data == NULL.
1418
1419 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
1420
1421         * elf32-hppa.c: Correct field selector in stub comments.
1422         (clobber_millicode_symbols): Formatting fix.
1423
1424         * configure.in: Bump version to 2.11.90.
1425         * configure: Regenerate.
1426         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1427         (CFILES): $SOURCE_CFILES + generated C files.
1428         (POTFILES): Include $HFILES not $SOURCE_HFILES.
1429         Run "make dep-am"
1430         * Makefile.in: Regenerate.
1431         * doc/Makefile.in: This too.
1432
1433 2001-02-26  Timothy Wall  <twall@cygnus.com>
1434
1435         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1436         comments.
1437
1438 2001-02-26  Nick Clifton <nickc@redhat.com>
1439
1440         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1441         up, replacing multiple if statements with a switch.
1442         (handle_COMDAT): New function.
1443
1444 2001-02-26  H.J. Lu  <hjl@gnu.org>
1445
1446         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1447         a warning for section flags we do not handle instead of
1448         aborting.
1449
1450 2001-02-26  Andreas Jaeger  <aj@suse.de>
1451
1452         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1453
1454 2001-02-22  Timothy Wall  <twall@cygnus.com>
1455
1456         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1457         * configure.in: Add objects for elf64_ia64_aix vectors.
1458         * configure: Regenerated.
1459         * configure.host: Recognize ia64-*-aix*.
1460         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
1461         for AIX.  AIX5 requires most relocations to be dynamic (*all*
1462         binaries are somewhat similar to shared libraries).
1463         * targets.c: Add elf64_ia64_aix vectors.
1464
1465 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
1466
1467         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1468         C8 said "1" instead of "8".  Clarify error string for IMM22:
1469         "signed integer" instead of just "integer".
1470
1471 2001-02-20  Andreas Jaeger  <aj@suse.de>
1472
1473         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1474         PLT entries that could serve as a definition for a weak symbol.
1475
1476 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
1477
1478         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1479         entries that could serve as a definition for a weak symbol.
1480         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1481
1482 2001-02-18  David O'Brien  <obrien@FreeBSD>
1483
1484         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1485         FreeBSD/i386-CURRENT differently until I can figure out the needed
1486         corefile changes.
1487         * configure: Regenerate.
1488         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1489         FreeBSD/PowerPC, and FreeBSD/sparc64.
1490
1491 2001-02-18  lars brinkhoff  <lars@nocrew.org>
1492
1493         * Makefile.am: Add PDP-11 a.out target.
1494         * config.bfd: Likewise.
1495         * configure.in: Likewise.
1496         * targets.c: Likewise.
1497         * archures.c: Likewise.
1498         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
1499         * libbfd.h: Add PDP-11 relocations.
1500         * reloc.c: Likewise.
1501         * cpu-pdp11.c: New file.
1502         * pdp11.c: New file.
1503
1504         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1505         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1506         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1507         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1508         (GET_MAGIC): New macro.
1509         (PUT_MAGIC): Likewise.
1510         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1511
1512 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
1513
1514         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1515         multiarch needs it).
1516
1517 2001-02-18  H.J. Lu  <hjl@gnu.org>
1518
1519         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1520         index.
1521
1522 2001-02-18  Kazu Hirata  <kazu@hxi.com>
1523
1524         * vms-misc.c: Fix formatting.
1525
1526 2001-02-16  Kazu Hirata  <kazu@hxi.com>
1527
1528         * vms.c: Fix formatting.
1529
1530 2001-02-14  H.J. Lu  <hjl@gnu.org>
1531
1532         * elf.c (elf_find_function): New function.
1533         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1534         the file name and function name.
1535
1536 2001-02-14  Nick Clifton  <nickc@redhat.com>
1537
1538         * ecoff.c (bfd_debug_section): Update to initialise new fields in
1539         asection structure.
1540
1541         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1542         (BFD64_BACKENDS): Add pepigen.c
1543         Add rules to create peigen.c and pepigen.c from peXXigen.c.
1544
1545         * Makefile.in: Regenerate.
1546         * configure:  Regenerate.
1547         * po/POTFILES.in: Regenerate.
1548         * po/bfd.pot: Regenerate.
1549
1550 2001-02-14  H.J. Lu  <hjl@gnu.org>
1551
1552         * libcoff-in.h (pe_tdata): Add members target_subsystem and
1553         force_minimum_alignment.
1554
1555 2001-02-14  Bo Thorsen  <bo@suse.de>
1556
1557         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1558         (elf64_86_64_size_info): Struct added to fix a problem
1559         with the hashtable string entries.
1560         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1561         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1562         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1563         remove the FIXME for this.
1564         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1565         section. Also removed the FIXME for it.
1566         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1567         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1568         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1569
1570 2001-02-13  Richard Henderson  <rth@redhat.com>
1571
1572         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1573         and not user provided.
1574
1575 2001-02-13  Kazu Hirata  <kazu@hxi.com>
1576
1577         * vms.c (vms_print_symbol): Remove unreachable code.
1578
1579         * rs6000-core.c: Fix formatting.
1580
1581 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
1582
1583         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1584         as _bfd_XXi_only_swap_filehdr_out.
1585         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1586         pe->force_minimum_alignment to TRUE.
1587         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1588         PEI_TARGET_SUBSYSTEM.
1589         (pe_print_private_bfd_data): Call
1590         _bfd_XX_print_private_bfd_data_common() instead of
1591         _bfd_pe_print_private_bfd_data_common().
1592         (pe_bfd_copy_private_bfd_data): Call
1593         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1594         _bfd_pe_bfd_copy_private_bfd_data_common().
1595         (coff_bfd_copy_private_section_data): Define as
1596         _bfd_XX_bfd_copy_private_section_data instead of
1597         _bfd_pe_bfd_copy_private_section_data.
1598         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1599         of a _bfd_pe_get_symbol_info.
1600
1601         * peigen.c: Delete.
1602
1603         * peXXigen.c: Renamed from peigen.c.
1604         (COFF_WITH_XX): Define this macro (will get expanded into
1605         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1606         compiled as peigen.c or pepigen.c.
1607         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1608         define the canonical PEP structures and definitions.
1609         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1610         effect, enforce minimum file and section alignments.  If
1611         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1612         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1613         so, by default, this is a no-op).
1614
1615         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1616         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1617         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1618         _bfd_pefoo if it's not defined.  Use these macros to define
1619         coff swap macros.
1620
1621         * libcoff.h (pe_tdata): Add members target_subsystem and
1622         force_minimum_alignment.
1623
1624         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1625         COFF_WITH_pep.
1626         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
1627
1628         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
1629         peigen.lo.
1630
1631         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
1632         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
1633         PEPAOUTHDR.
1634
1635         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
1636         (BFD64_BACKENDS_CFILES): Mention pepigen.c
1637         (peigen.c): Add rule to generate from peXXigen.c.
1638         (pepigen.c): Ditto.
1639         (pepigen.lo): List dependencies for pepigen.lo.
1640
1641 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
1642
1643         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
1644         $global$ referenced but not defined, set its value here.
1645
1646 2001-02-09  Bo Thorsen  <bo@suse.de>
1647
1648         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
1649         alignment to 3.
1650         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
1651         and relocation.
1652         (elf64_x86_64_relocate_section): Fix formatting.
1653         (elf64_x86_64_relocate_section): Fix addend for relocation of
1654         R_X86_64_(8|16|32|PC8|PC16|PC32).
1655
1656 2001-02-12  Jan Hubicka  <jh@suse.cz>
1657
1658         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
1659
1660 2001-02-11  H.J. Lu  <hjl@gnu.org>
1661
1662         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
1663         alignment.
1664
1665 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1666
1667         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1668         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
1669         relocations against dynsym symbols.
1670
1671         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1672         the R_MIPS_26 relocation.
1673         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1674         the R_MIPS_26 relocation.
1675         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1676         relocation.
1677         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1678         the R_MIPS_26 relocation.
1679         (mips_elf64_howto_table_rela): Likewise.
1680
1681         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1682         member to mark symbols that have non-CALL relocations against
1683         them.
1684         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1685         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1686         R_MIPS_GOT16.
1687         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1688         non-CALL relocation against it is encountered.
1689         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1690         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1691         no_fn_stub is not set.
1692
1693         * elf32-mips.c (mips_elf_output_extsym): Get the output section
1694         information from the real symbol for indirect ones.
1695         Check no_fn_stub to find out if a symbol has a function stub
1696         indeed.
1697
1698 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1699
1700         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1701         * Makefile.in: Regenerate.
1702
1703 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
1704
1705         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
1706         true if section name is an unwind table section name.
1707         (elfNN_ia64_additional_program_headers): Count each unwind section
1708         separately.
1709         (elfNN_ia64_modify_segment_map): Install one unwind program header
1710         for each unwind separate section.  Note: normally the linker
1711         script merges the unwind sections that go into a single segment,
1712         so this still generates at most one unwind program header per
1713         segment.
1714
1715         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1716         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1717         (elfNN_ia64_fake_sections): Mark sections with names that start
1718         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1719         unwind section.
1720
1721         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1722         Use it to make sh_info in unwind section point to the text section
1723         it applies to.
1724
1725 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1726
1727         * Makefile.am: Add linux target for S/390.
1728         * archures.c: Likewise.
1729         * bfd-in2.h: Likewise.
1730         * config.bfd: Likewise.
1731         * configure.in: Likewise.
1732         * elf.c: Likewise.
1733         * libbfd.h: Likewise.
1734         * targets.c: Likewise.
1735         * cpu-s390.c: New file.
1736         * elf32-s390.c: New file.
1737         * elf64-s390.c: New file.
1738
1739 2001-02-09  Nick Clifton  <nickc@redhat.com>
1740
1741         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1742         ImageBase.  This has already been done by coff_swap_hdr_in.
1743
1744 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
1745
1746         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1747
1748 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
1749
1750         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1751         (sparc64_elf_relocate_section): Likewise.
1752
1753 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
1754
1755         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1756         similar to R_SPARC_32.
1757         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1758
1759 2001-02-08  H.J. Lu  <hjl@gnu.org>
1760
1761         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
1762         relocation entries for weak definitions when building DSO with
1763         -Bsymbolic.
1764
1765 2001-02-08  Richard Henderson  <rth@redhat.com>
1766
1767         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
1768         before visibility.  Locally defined protected symbols are not
1769         dynamic.
1770
1771 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
1772
1773         * config.bfd: Enable coff64 for rs6000-*.  Patch from
1774         <hzoli@austin.ibm.com>.
1775
1776 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
1777
1778         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
1779         found, do not attempt to find dwarf2 info before returning.
1780
1781 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
1782
1783         * elflink.h (is_global_symbol_definition): Rename to
1784         is_global_data_symbol_definition and have it reject function
1785         symbols.
1786         (elf_link_is_defined_archive_symbol): Use renamed function.
1787
1788 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
1789
1790         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
1791         * libbfd.h (bfd_target_vector): Likewise.
1792         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
1793         make static; create pointer reference named bfd_target_vector.
1794         (_bfd_target_vector_entries): Calculate this based on the array
1795         typed _bfd_target_vector.
1796
1797 2001-02-06  H.J. Lu  <hjl@gnu.org>
1798
1799         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
1800         internal symbols are not dynamic.
1801         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1802
1803 2001-02-06  Nick Clifton  <nickc@redhat.com>
1804
1805         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
1806         that it will not be pulled into the list of files that make up
1807         po/POTFILES.in.
1808         * Makefile.in: Regenerate.
1809         * po/bfd.pot:  Regenerate.
1810
1811 2001-02-06  H.J. Lu  <hjl@gnu.org>
1812
1813         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
1814         checking.
1815         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
1816         external_PEI_IMAGE_hdr.
1817
1818 2001-02-06  Kazu Hirata  <kazu@hxi.com>
1819
1820         * elf-m10200.c: Fix formatting.
1821
1822 2001-02-04  Nick Clifton  <nickc@redhat.com>
1823
1824         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
1825         rel, it will be handled later on.
1826
1827 2001-02-02  Fred Fish  <fnf@ninemoons.com>
1828
1829         * Makefile.in: Fix typo.
1830
1831 2001-02-01  Kazu Hirata  <kazu@hxi.com>
1832
1833         * elf-m10300.c: Fix formatting.
1834
1835 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
1836
1837         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
1838         (elf_backend_get_symbol_type): Define.
1839         (elf64_hppa_object_p): Set architecture and machine from elf
1840         header flags.
1841
1842 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
1843
1844         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
1845         before mdebug.
1846
1847 2001-01-26  Richard Henderson  <rth@redhat.com>
1848
1849         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
1850         for non-default visibility.
1851         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
1852         delete ugly macro and replace with pretty function.
1853
1854 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
1855
1856         * coff-go32.c: Update copyright.
1857         * coff-stgo32.c: Likewise.
1858         * coff-go32.c (COFF_LONG_FILENAMES): Define.
1859         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
1860         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
1861         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1862
1863 2001-01-25  Kazu Hirata  <kazu@hxi.com>
1864
1865         * bfd-in2.h: Rebuild.
1866         * libbfd.h: Likewise.
1867
1868 2001-01-23  H.J. Lu  <hjl@gnu.org>
1869
1870         * bfd-in2.h: Rebuild.
1871
1872 2001-01-23  H.J. Lu  <hjl@gnu.org>
1873
1874         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
1875         is NULL or PRIV(vms_rec) is outside of the buffer.
1876
1877 2001-01-23  Kazu Hirata  <kazu@hxi.com>
1878
1879         * coff64-rs6000.c: Fix formatting.
1880         * coff-arm.c: Likewise.
1881         * coffgen.c: Likewise.
1882         * cofflink.c: Likewise.
1883         * coff-mcore.c: Likewise.
1884         * coff-mips.c: Likewise.
1885         * coff-pmac.c: Likewise.
1886         * coff-ppc.c: Likewise.
1887         * coff-rs6000.c: Likewise.
1888         * elf32.c: Likewise.
1889         * elf32-fr30.c: Likewise.
1890         * elf32-i370.c: Likewise.
1891         * elf32-i860.c: Likewise.
1892         * elf32-m32r.c: Likewise.
1893         * elf32-m68k.c: Likewise.
1894         * elf32-mcore.c: Likewise.
1895         * elf32-ppc.c: Likewise.
1896         * elf32-sh.c: Likewise.
1897         * elf32-v850.c: Likewise.
1898         * elf64-alpha.c: Likewise.
1899         * elf64-sparc.c: Likewise.
1900         * elflink.c: Likewise.
1901         * elflink.h: Likewise.
1902         * elf-m10200.c: Likewise.
1903         * elf-m10300.c: Likewise.
1904         * elfxx-ia64.c: Likewise.
1905
1906         * aoutx.h: Fix formatting.
1907         * bfd.c: Likewise.
1908         * bfd-in2.h: Likewise.
1909         * bfd-in.h: Likewise.
1910         * cpu-i386.c: Likewise.
1911         * cpu-m68hc11.c: Likewise.
1912         * dwarf2.c: Likewise.
1913         * elf64-x86-64.c: Likewise.
1914         * format.c: Likewise.
1915         * freebsd.h: Likewise.
1916         * hash.c: Likewise.
1917         * hp300hpux.c: Likewise.
1918         * hppabsd-core.c: Likewise.
1919         * hpux-core.c: Likewise.
1920
1921 2001-01-22  Bo Thorsen  <bo@suse.de>
1922
1923         * elf64-x86-64.c: Added PIC support for X86-64.
1924         (elf64_x86_64_link_hash_newfunc): Function added.
1925         (elf64_x86_64_link_hash_table_create): Likewise.
1926         (elf64_x86_64_check_relocs): Likewise.
1927         (elf64_x86_64_gc_mark_hook): Likewise.
1928         (elf64_x86_64_gc_sweep_hook): Likewise.
1929         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1930         (elf64_x86_64_size_dynamic_sections): Likewise.
1931         (elf64_x86_64_discard_copies): Likewise.
1932         (elf64_x86_64_finish_dynamic_symbol): Likewise.
1933         (elf64_x86_64_finish_dynamic_sections): Likewise.
1934         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
1935
1936 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1937
1938         * Makefile.am (install-data-local): Make use of $(DESTDIR).
1939         * Makefile.in: Regenerate.
1940
1941 2001-01-21  Kazu Hirata  <kazu@hxi.com>
1942
1943         * coff-a29k.c: Fix formatting.
1944
1945 2001-01-19  H.J. Lu  <hjl@gnu.org>
1946
1947         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
1948         relocation section names.
1949         (elf_i386_relocate_section): Report files with bad relocation
1950         section names and return false.
1951
1952 2001-01-17  Bo Thorsen  <bo@suse.de>
1953
1954         * targets.c: Alphabetize list of xvecs.
1955
1956 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
1957
1958         * config.bfd: Add linux target variant for elfxx-hppa.
1959         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
1960         bfd_elf64_hppa_linux_vec.
1961         * configure: Regenerate.
1962         * elf64-hppa.c: Include elf64-target.h again to support linux
1963         target variant.
1964         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
1965         * elf32-hppa.c: Include elf32-target.h again to support linux
1966         target variant.
1967         (elf32_hppa_post_process_headers): New function.
1968         (elf_backend_post_process_headers): Define.
1969         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
1970         bfd_elf32_hppa_linux_vec.
1971
1972         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
1973         and data_segment_base fields.
1974         (elf32_hppa_link_hash_table_create ): Init them.
1975         (elf32_hppa_check_relocs): Update comments.
1976         (hppa_record_segment_addr): New function.
1977         (elf32_hppa_relocate_section): Call it.
1978         (final_link_relocate): Handle R_PARISC_SEGREL32.
1979         (elf32_hppa_final_link): New function.
1980         (bfd_elf32_bfd_final_link): Define to call it.
1981         (hppa_unwind_entry_compare): New function.
1982         * cache.c (bfd_open_file): Create files in write+read mode.
1983
1984         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
1985         SEGREL32 and numerous other relocs.  Change duplicate
1986         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
1987
1988         * opncls.c (bfd_fdopenr): Add parens like the comment says around
1989         O_ACCMODE.
1990
1991         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
1992         .plt entries for DT_INIT and DT_FINI.
1993         (elf32_hppa_finish_dynamic_sections): Remove special handling of
1994         DT_INIT and DT_FINI.
1995
1996         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
1997         offsets for stub .plt access if wide mode.  Check offset in range.
1998
1999 2001-01-13  Nick Clifton  <nickc@redhat.com>
2000
2001         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
2002         line.
2003
2004         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
2005         line.
2006
2007 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
2008
2009         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
2010         * configure: Regenerate.
2011
2012 2001-01-11  Peter Targett  <peter.targett@arccores.com>
2013
2014         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
2015         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
2016         * cpu-arc.c (arch_info_struct): Add entries for variants.
2017         (bfd_arc_arch) Set default to bfd_mach_arc_5.
2018         (arc_get_mach) Don't assume machine names prefixed arc- before
2019         testing.
2020         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
2021         selections.
2022         (arc_elf_final_write_processing) Likewise.
2023         (ELF_MACHINE_CODE) Use EM_ARC.
2024
2025 2001-01-10  Nick Clifton  <nickc@redhat.com>
2026
2027         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
2028
2029 2001-01-07  Philip Blundell  <philb@gnu.org>
2030
2031         * README: Replace `bug-gnu-utils@gnu.org' with
2032         `bug-binutils@gnu.org'.
2033
2034 2001-01-04  Kazu Hirata  <kazu@hxi.com>
2035
2036         * som.c: Fix formatting.
2037
2038 2001-01-03  Kazu Hirata  <kazu@hxi.com>
2039
2040         * ecoffswap.h: Fix formatting.
2041         * elf-bfd.h: Likewise.
2042         * elfarm-nabi.c: Likewise.
2043         * elfarm-oabi.c: Likewise.
2044         * elfcode.h: Likewise.
2045         * elfcore.h: Likewise.
2046         * elflink.c: Likewise.
2047         * elflink.h: Likewise.
2048         * elfxx-ia64.c: Likewise.
2049         * elfxx-target.h: Likewise.
2050         * libbfd.c: Likewise
2051         * linker.c: Likewise.
2052         * lynx-core.c: Likewise.
2053
2054 2001-01-02  Kazu Hirata  <kazu@hxi.com>
2055
2056         * pc532-mach.c: Fix formatting.
2057         * pe-arm.c: Likewise.
2058         * pe-i386.c: Likewise.
2059         * pe-mips.c: Likewise.
2060         * pe-ppc.c: Likewise.
2061         * pe-sh.c: Likewise.
2062         * pei-mips.c: Likewise.
2063         * pei-sh.c: Likewise.
2064         * peicode.h: Likewise.
2065         * ppcboot.c: Likewise.
2066         * ptrace-core.c: Likewise.
2067
2068 2001-01-01  Kazu Hirata  <kazu@hxi.com>
2069
2070         * reloc.c: Fix formatting.
2071         * riscix.c: Likewise.
2072         * rs6000-core.c: Likewise.
2073         * xcoff-target.h: Likewise.
2074
2075 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
2076
2077         * elfcode.h (elf_object_p): Also restore the bfd mach field on
2078         error, by calling bfd_default_set_arch_mach with incoming
2079         values.
2080
2081 2000-12-26  Kazu Hirata  <kazu@hxi.com>
2082
2083         * vaxnetbsd.c: Fix formatting.
2084         * versados.c: Likewise.
2085         * vms-gsd.c: Likewise.
2086         * vms-hdr.c: Likewise.
2087         * vms-misc.c: Likewise.
2088
2089 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
2090
2091         * archive.c (coff_write_armap): Don't write more than symbol_count
2092         `archive_member_file_ptr's.
2093
2094 2000-12-25  Kazu Hirata  <kazu@hxi.com>
2095
2096         * vms-tir.c: Fix formatting.
2097
2098 2000-12-23  Kazu Hirata  <kazu@hxi.com>
2099
2100         * vms.c: Fix formatting.
2101         * vms.h: Likewise.
2102
2103 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
2104
2105         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
2106
2107         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
2108
2109         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
2110         arithmetic.
2111
2112         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
2113
2114         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
2115
2116 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
2117
2118         * libbfd.c (bfd_get_bits): Added
2119         (bfd_put_bits): Likewise
2120         * bfd-in.h: Declared the above.
2121         * bfd-in2.h: Regenerated.
2122
2123 2000-12-20  Kazu Hirata  <kazu@hxi.com>
2124
2125         * targets.c: Fix formatting.
2126         * tekhex.c: Likewise.
2127         * trad-core.c: Likewise.
2128
2129 2000-12-19  Kazu Hirata  <kazu@hxi.com>
2130
2131         * sco5-core.c: Fix formatting.
2132         * section.c: Likewise.
2133         * sparclinux.c: Likewise.
2134         * sparclynx.c: Likewise.
2135         * sparcnetbsd.c: Likewise.
2136         * srec.c: Likewise.
2137         * stabs.c: Likewise.
2138         * stab-syms.c: Likewise.
2139         * sunos.c: Likewise.
2140         * syms.c: Likewise.
2141         * sysdep.h: Likewise.
2142
2143 2000-12-18  Nick Clifton  <nickc@redhat.com>
2144
2145         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
2146         defined.
2147         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
2148         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
2149
2150 2000-12-18  Nick Clifton  <nickc@redhat.com>
2151
2152         * vms-misc.c (_bfd_vms_get_record): Add default case to
2153         file_format switch.
2154
2155 2000-12-15  Miloslav Trmac <mitr@volny.cz>
2156
2157         * elfcore.h (elf_core_file_p): Move to the start of the program
2158         headers before attempting to read them.
2159
2160 2000-12-14  Kazu Hirata  <kazu@hxi.com>
2161
2162         * peigen.c: Fix formatting.
2163         * som.c: Likewise.
2164         * som.h: Likewise.
2165
2166 2000-12-13  Kazu Hirata  <kazu@hxi.com>
2167
2168         * peigen.c: Fix formatting.
2169
2170 2000-12-12  Jim Wilson  <wilson@redhat.com>
2171
2172         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2173
2174 2000-12-08  Mark Salter  <msalter@redhat.com>
2175
2176         * binary.c (binary_set_section_contents): Ignore sections
2177         with zero size.
2178
2179 2000-12-12  Kazu Hirata  <kazu@hxi.com>
2180
2181         * m68klinux.c: Fix formatting.
2182         * m68knetbsd.c: Likewise.
2183         * mipsbsd.c: Likewise.
2184         * netbsd-core.c: Likewise.
2185         * netbsd.h: Likewise.
2186         * newsos3.c: Likewise.
2187         * nlm32-alpha.c: Likewise.
2188         * nlm32-i386.c: Likewise.
2189         * nlm32-ppc.c: Likewise.
2190         * nlm32-sparc.c: Likewise.
2191         * nlmcode.h: Likewise.
2192         * nlmswap.h: Likewise.
2193         * nlm-target.h: Likewise.
2194         * ns32knetbsd.c: Likewise.
2195
2196 2000-12-10  Fred Fish  <fnf@be.com>
2197
2198         * elflink.h (elf_link_output_extsym): Don't complain about undefined
2199         symbols in shared objects if allow_shlib_undefined is true.
2200
2201 2000-12-12  Nick Clifton  <nickc@redhat.com>
2202
2203         * cpu-sh.c: Fix formattng.
2204         * elf.c: Fix formattng.
2205         * elf32-mips.c: Fix formattng.
2206         * elf32-sh.c: Fix formattng.
2207         * elf64-alpha.c: Fix formattng.
2208
2209 2000-12-09  Nick Clifton  <nickc@redhat.com>
2210
2211         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2212         dwarf2_find_line_info as last parameter to invocation of
2213         _bfd_dwarf2_find_nearest_line.
2214         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2215         dwarf2_find_line_info as last parameter to invocation of
2216         _bfd_dwarf2_find_nearest_line.
2217
2218 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
2219
2220         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2221         (BFD_LIBS): ...to here.
2222         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2223         (BFD_LIBS_CFILES): ...to here.
2224         * Makefile.in: Regenerate.
2225         * configure.in: Remove dwarf.lo from the elf shell variable.
2226         * configure: Regenerate.
2227         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2228         * libcoff.h: Regenerate.
2229         * coffgen.c (coff_find_nearest_line): Call
2230         _bfd_dwarf2_find_nearest_line.
2231         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2232         accordingly.
2233         (read_abbrevs): Likewise
2234         (decode_line_info): Likewise.
2235         (parse_comp_unit): Likewise.
2236         (comp_unit_find_nearest_line): Likewise.
2237         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2238         * libbfd.h: Regenerate.
2239         * elf.c (_bfd_elf_find_nearest_line): Update call.
2240         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2241         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2242         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2243         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2244         (styp_to_sec_flags): Handle DWARF2 sections.
2245         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2246         to _bfd_find_nearest_line.
2247         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2248         call to _bfd_find_nearest_line.
2249
2250 2000-12-08  Kazu Hirata  <kazu@hxi.com>
2251
2252         * coffgen.c: Fix formatting.
2253         * elf-m10300.c: Likewise.
2254         * elf32-i386.c: Likewise.
2255         * elf32-i960.c: Likewise.
2256         * elf32-m68k.c: Likewise.
2257         * elf32-mcore.c: Likewise.
2258         * elf32-ppc.c: Likewise.
2259         * elf32-sh.c: Likewise.
2260         * elf32-sparc.c: Likewise.
2261         * elf32-v850.c: Likewise.
2262         * elf64-alpha.c: Likewise.
2263         * elf64-hppa.c: Likewise.
2264         * elf64-mips.c: Likewise.
2265         * elf64-sparc.c: Likewise.
2266
2267 2000-12-07  Kazu Hirata  <kazu@hxi.com>
2268
2269         * elf32-ppc.c: Fix formatting.
2270         * elf64-x86-64.c: Likewise.
2271
2272 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
2273
2274         From  Ralf Baechle  <ralf@gnu.org>
2275
2276         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2277         BFDs containing no sections or empty .text, .data or .bss sections
2278         to be merged, regardless of their flags.
2279
2280 2000-12-06  Kazu Hirata  <kazu@hxi.com>
2281
2282         * elf32-m32r.c: Fix formatting.
2283         * elf32-m68hc11.c: Likewise.
2284         * elf32-m68hc12.c: Likewise.
2285         * elf32-m68k.c: Likewise.
2286         * elf32-mcore.c: Likewise.
2287         * elf32-pj.c: Likewise.
2288         * elf32-ppc.c: Likewise.
2289
2290 2000-12-05  Kazu Hirata  <kazu@hxi.com>
2291
2292         * elf32-fr30.c: Fix formatting.
2293         * elf32-hppa.c: Likewise.
2294         * elf32-i370.c: Likewise.
2295         * elf32-i386.c: Likewise.
2296         * elf32-i860.c: Likewise.
2297         * elf32-i960.c: Likewise.
2298
2299 2000-12-03  Kazu Hirata  <kazu@hxi.com>
2300
2301         * elf32-arm.h: Fix formatting.
2302         * elf32-avr.c: Likewise.
2303         * elf32-cris.c: Likewise.
2304         * elf32-d10v.c: Likewise.
2305         * elf32-d30v.c: Likewise.
2306         * elf-hppa.h: Likewise.
2307         * elf-m10200.c: Likewise.
2308         * elf-m10300.c: Likewise.
2309
2310 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
2311
2312         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2313         bfd_mach_mips32_4k.  Update FIXME comment.
2314         * archures.c (bfd_mach_mips32): New constant.
2315         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2316         the latter, renumber it.
2317         * bfd-in2.h (bfd_mach_mips32): New constant.
2318         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2319         the latter, renumber it.
2320         * cpu-mips.c (I_mips32): New constant.
2321         (I_mips4K, I_mips32_4k): Rename the former to the latter.
2322         (arch_info_struct): Add bfd_mach_mips32 entry, replace
2323         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2324         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2325         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
2326         with E_MIPS_MACH_MIPS32_4K.
2327         (_bfd_mips_elf_final_write_processing): Replace
2328         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2329         bfd_mach_mips32 case.
2330         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2331         comparison with support for MIPS32.
2332         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2333         MIPS32.
2334
2335         * aoutx.h (NAME(aout,machine_type)): Add cases for
2336         bfd_mach_mips5 and bfd_mach_mips64.
2337         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2338         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2339         * cpu_mips.c (I_mips5, I_mips64): New definitions.
2340         (arch_info_struct): Add entries for bfd_mach_mips5 and
2341         bfd_mach_mips64.
2342         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2343         _bfd_mips_elf_print_private_bfd_data): Add cases for
2344         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2345         (_bfd_mips_elf_final_write_processing): Add cases for
2346         bfd_mach_mips5 and bfd_mach_mips64.
2347
2348         * aoutx.h (NAME(aout,machine_type)): Add a
2349         bfd_mach_mips_sb1 case.
2350         * archures.c (bfd_mach_mips_sb1): New constant.
2351         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2352         * cpu-mips.c (I_sb1): New constant.
2353         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2354         * elf32-mips.c (elf_mips_mach): Add case for
2355         E_MIPS_MACH_SB1.
2356         (_bfd_mips_elf_final_write_processing): Add case for
2357         bfd_mach_mips_sb1.
2358
2359 2000-12-01  Joel Sherrill <joel@OARcorp.com>
2360
2361         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2362         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2363         (sparc*-*-rtems*): Switched from a.out to ELF.
2364
2365 2000-11-30  Jan Hubicka  <jh@suse.cz>
2366
2367         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2368         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2369         (elf64-x86-64.lo): Add dependencies.
2370         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2371         bfd_mach_x86_64_intel_syntax.
2372         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2373         * config.bfd (x86_64): Add.
2374         * configure.in: Add support for bfd_elf64_x86_64_vec.
2375         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2376         (bfd_i386_arch, i8086_ar): Link in.
2377         * elf64-x86-64.c: New file.
2378         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2379         * targets.c (bfd_elf64_x86_64_vec): Add.
2380         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2381
2382 2000-11-30  Kazu Hirata  <kazu@hxi.com>
2383
2384         * xcofflink.c: Fix formatting.
2385
2386 2000-11-28  Kazu Hirata  <kazu@hxi.com>
2387
2388         * aoutx.h: Fix formatting.
2389         * bfd-in.h: Likewise.
2390         * bfd-in2.h: Likewise.
2391         * cache.c: Likewise.
2392         * cisco-core.c: Likewise.
2393         * coff64-rs6000.c: Likewise.
2394         * coffcode.h: Likewise.
2395         * coffswap.h: Likewise.
2396         * corefile.c: Likewise.
2397         * elf32-mips.c: Likewise.
2398
2399 2000-11-27  Kazu Hirata  <kazu@hxi.com>
2400
2401         * aout-adobe.c: Fix formatting.
2402         * coff64-rs6000.c: Likewise.
2403         * coffgen.c: Likewise.
2404         * cofflink.c: Likewise.
2405
2406 2000-11-27  Philip Blundell  <pb@futuretv.com>
2407
2408         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2409         (obj_coff_strings_written): New accessor macro for above.
2410         * libcoff.h: Regenerate.
2411         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2412         strings.
2413         * coffcode.h (coff_write_object_contents): No need to write out
2414         the string table if it's already been done.
2415
2416 2000-11-22  Philip Blundell  <pb@futuretv.com>
2417
2418         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2419         weak undefined symbols.
2420
2421 2000-11-24  Nick Clifton  <nickc@redhat.com>
2422
2423         * archures.c (bfd_mach_arm_5TE): Define.
2424         (bfd_mach_arm+XScale): Define.
2425         * bfd-in2.h: Regenerate.
2426
2427         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2428         BFD_RELOC_ARM_PCREL_BLX.
2429
2430         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2431         XScale machine numbers.
2432
2433         * config.bfd (xscale-elf): Add target.
2434         (xscale-coff): Add target.
2435
2436         * cpu-arm.c: Add xscale machine name.
2437         Add v5t, v5te and XScale machine numbers.
2438
2439 2000-11-23  Kazu Hirata  <kazu@hxi.com>
2440
2441         * aix386-core.c: Fix formatting.
2442
2443 2000-11-22  Jim Wilson  <wilson@redhat.com>
2444
2445         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2446         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2447         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2448         (ins_imms_scaled): Initialize sign_bit at function entry.
2449         (elf64_ia64_operands): Add missing initializers.
2450         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2451         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2452         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2453         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2454         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2455         parameters.
2456         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2457         and free_extsyms at function entry.
2458         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2459         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2460         (get_got): Delete unused local srel.
2461         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2462         (elfNN_ia64_relocate_section): Delete unused local dynindx.
2463
2464 2000-11-21  Kazu Hirata  <kazu@hxi.com>
2465
2466         * coff-a29k.c: Fix formatting.
2467         * coff-h8500.c: Likewise.
2468         * coff-i960.c: Likewise.
2469         * coff-ppc.c: Likewise.
2470         * coff-rs6000.c: Likewise.
2471         * coff-stgo32.c: Likewise.
2472         * coff-tic54x.c: Likewise.
2473         * coff-w65.c: Likewise.
2474         * cpu-h8500.c: Likewise.
2475         * cpu-hppa.c: Likewise.
2476         * cpu-ns32k.c: Likewise.
2477         * ecoff.c: Likewise.
2478         * ecofflink.c: Likewise.
2479
2480 2000-11-21  Nick Clifton  <nickc@redhat.com>
2481
2482         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2483         remove possibility of infinite loop.
2484
2485 2000-11-20  Kazu Hirata  <kazu@hxi.com>
2486
2487         * aix386-core.c: Fix formatting.
2488         * aout-adobe.c: Likewise.
2489         * aout-arm.c: Likewise.
2490         * aout-encap.c: Likewise.
2491         * aout-ns32k.c: Likewise.
2492         * aout-target.h: Likewise.
2493         * aout-tic30.c: Likewise.
2494         * aoutf1.h: Likewise.
2495         * aoutx.h: Likewise.
2496         * archive.c: Likewise.
2497         * bfd-in.h: Likewise.
2498         * bfd-in2.h: Likewise.
2499         * bfd.c: Likewise.
2500         * bout.c: Likewise.
2501
2502 2000-11-17  H.J. Lu  <hjl@gnu.org>
2503
2504         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2505         pltoff entries for DT_INIT and DT_FINI.
2506         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2507         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2508         entries.
2509
2510 2000-11-16  Richard Henderson  <rth@redhat.com>
2511
2512         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2513         (allocate_dynrel_entries): Likewise.
2514         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
2515         (set_pltoff_entry): Likewise.
2516         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2517         (elfNN_ia64_reloc_type_lookup): Likewise.
2518         (elfNN_ia64_install_value): Likewise.
2519         (elfNN_ia64_relocate_section): Likewise.
2520         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2521         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2522
2523 2000-11-16  Kazu Hirata  <kazu@hxi.com>
2524
2525         * cpu-a29k.c: Fix formatting.
2526         * cpu-alpha.c: Likewise.
2527         * cpu-arm.c: Likewise.
2528         * cpu-avr.c: Likewise.
2529         * cpu-d10v.c: Likewise.
2530         * cpu-h8500.c: Likewise.
2531         * cpu-hppa.c: Likewise.
2532         * cpu-i370.c: Likewise.
2533         * cpu-i386.c: Likewise.
2534         * cpu-i960.c: Likewise.
2535         * cpu-ia64-opc.c: Likewise.
2536         * cpu-ia64.c: Likewise.
2537         * cpu-m32r.c: Likewise.
2538         * cpu-m68hc11.c: Likewise.
2539         * cpu-m68hc12.c: Likewise.
2540         * cpu-m68k.c: Likewise.
2541         * cpu-m88k.c: Likewise.
2542         * cpu-mips.c: Likewise.
2543         * cpu-ns32k.c: Likewise.
2544         * cpu-pj.c: Likewise.
2545         * cpu-powerpc.c: Likewise.
2546         * cpu-sh.c: Likewise.
2547         * cpu-sparc.c: Likewise.
2548         * cpu-tic54x.c: Likewise.
2549         * cpu-v850.c: Likewise.
2550         * cpu-vax.c: Likewise.
2551         * cpu-w65.c: Likewise.
2552         * cpu-we32k.c: Likewise.
2553         * cpu-z8k.c: Likewise.
2554         * dwarf1.c: Likewise.
2555         * dwarf2.c: Likewise.
2556
2557 2000-11-15  Kazu Hirata  <kazu@hxi.com>
2558
2559         * coff-arm.c: Fix formatting.
2560         * coff-ppc.c: Likewise.
2561         * coff-rs6000.c: Likewise.
2562         * coff-sh.c: Likewise.
2563         * coff-sparc.c: Likewise.
2564         * coff-tic30.c: Likewise.
2565         * coff-tic54x.c: Likewise.
2566         * coff-tic80.c: Likewise.
2567         * coff-w65.c: Likewise.
2568         * coff-we32k.c: Likewise.
2569         * coff-z8k.c: Likewise.
2570
2571 2000-11-15  Richard Henderson  <rth@redhat.com>
2572
2573         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2574         section with the same ALLOC|LOAD flags as the source section.
2575
2576 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
2577
2578         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2579         by STO_ALPHA constants.
2580
2581 2000-11-14  Kazu Hirata  <kazu@hxi.com>
2582
2583         * coff-pmac.c: Fix formatting.
2584         * coff-ppc.c: Likewise.
2585
2586 2000-11-13  H.J. Lu  <hjl@gnu.org>
2587
2588         * elflink.h (elf_link_add_object_symbols): Also add indirect
2589         symbols for common symbols with the default version.
2590
2591 2000-11-09  Philip Blundell  <pb@futuretv.com>
2592
2593         * section.c (STD_SECTION): Set gc_mark flag.
2594
2595 2000-11-11  Kazu Hirata  <kazu@hxi.com>
2596
2597         * coff-i960.c: Likewise.
2598         * coff-m68k.c: Likewise.
2599         * coff-m88k.c: Likewise.
2600         * coff-mcore.c: Likewise.
2601         * coff-mips.c: Likewise.
2602
2603 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
2604
2605         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2606
2607 2000-11-10  Kazu Hirata  <kazu@hxi.com>
2608
2609         * coff-h8300.c: Fix formatting.
2610         * coff-h8500.c: Likewise.
2611         * coff-i386.c: Likewise.
2612         * coff-i860.c: Likewise.
2613         * coff-i960.c: Likewise.
2614         * coff-ia64.c: Likewise.
2615
2616 2000-11-09  Kazu Hirata  <kazu@hxi.com>
2617
2618         * archive.c: Fix formatting.
2619         * archures.c: Likewise.
2620
2621 2000-11-07  Richard Henderson  <rth@redhat.com>
2622
2623         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2624         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
2625         * section.c (bfd_set_section_contents): Call memcpy if
2626         section->contents set and location not equal to contents plus offset.
2627
2628 2000-11-08  Kazu Hirata  <kazu@hxi.com>
2629
2630         * bfd-in.h: Fix formatting.
2631         * bfd-in2.h: Likewise.
2632         * bfd.c: Likewise.
2633         * binary.c: Likewise.
2634         * bout.c: Likewise.
2635         * coff-a29k.c: Likewise.
2636         * coff-alpha.c: Likewise.
2637         * coff-apollo.c: Likewise.
2638         * coff-aux.c: Likewise.
2639
2640 2000-11-07  Kazu Hirata  <kazu@hxi.com>
2641
2642         * aix386-core.c: Fix formatting.
2643         * aoutf1.h: Likewise.
2644         * aoutx.h: Likewise.
2645         * archures.c: Likewise.
2646         * armnetbsd.c: Likewise.
2647
2648 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
2649
2650         * coff-h8300.c (special): Adjust reloc address.
2651
2652 2000-11-06  Steve Ellcey <sje@cup.hp.com>
2653
2654         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
2655         to differentiate elf32 and elf64 on ia64.
2656         * bfd-in2.h: Regenerate.
2657         * config.bfd: Add target for "ia64*-*-hpux*".
2658         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
2659         * configure: Regenerate.
2660         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
2661         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
2662
2663         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
2664         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
2665         * Makefile.in: Regnerate.
2666         * elf64-ia64.c: Deleted.
2667         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2668
2669 2000-11-06  Kazu Hirata  <kazu@hxi.com>
2670
2671         * aout-adobe.c: Fix formatting.
2672         * aout-arm.c: Likewise.
2673         * aout-cris.c: Likewise.
2674         * aout-encap.c: Likewise.
2675         * aout-ns32k.c: Likewise.
2676         * aout-target.h: Likewise.
2677         * aout-tic30.c: Likewise.
2678
2679 2000-11-05  Philip Blundell  <philb@gnu.org>
2680
2681         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2682         BFDs containing no sections to be merged, regardless of their flags.
2683
2684 2000-11-04  Philip Blundell  <philb@gnu.org>
2685
2686         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2687         if a relocation for an undefined symbol also results in an
2688         overflow.
2689
2690 2000-11-06  Christopher Faylor <cgf@cygnus.com>
2691
2692         * config.bfd: Add support for Sun Chorus.
2693
2694 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
2695
2696         * configure.in: Recognize alpha-*-freebsd*.
2697         * configure: Regenerate.
2698
2699 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
2700
2701         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2702         (Chunk): New global variable set by a parameter in objcopy.c.
2703         (S3Forced): New global variable set by a parameter in
2704         objcopy.c.
2705         (srec_set_section_contents): If S3Forced is true, always generate
2706         S3 records.
2707         (srec_write_section): Use 'Chunk' to limit maximum length of S
2708         records.
2709
2710 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
2711
2712         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2713         * Makefile.in: Regenerate.
2714         * bfd-in2.h: Regenerate.
2715         * po/bfd.pot: Regenerate.
2716
2717 2000-10-31  Philip Blundell  <philb@gnu.org>
2718
2719         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2720         EF_SOFT_FLOAT if it is defined.
2721
2722 2000-10-27  Philip Blundell  <philb@gnu.org>
2723
2724         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2725         attempts to mix PIC code with non-PIC, just mark the output as
2726         being position dependent.
2727         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
2728         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
2729         all mismatches, not just the first one.
2730
2731 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
2732
2733         * ieee.c (ieee_archive_p): Plug one of many possible
2734         memory leaks in error handling.
2735
2736 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
2737
2738         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2739         elf32_sparc_object_p, elf32_sparc_final_write_processing):
2740         Support v8plusb.
2741         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2742         sparc64_elf_object_p): Support v9b.
2743         * archures.c: Declare v8plusb and v9b machines.
2744         * bfd-in2.h: Ditto.
2745         * cpu-sparc.c: Ditto.
2746
2747 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
2748
2749         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2750         of a GOT reloc.
2751
2752         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2753         (SYMBOL_CALLS_LOCAL): New macro.
2754         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2755         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2756         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2757         (ppc_elf_relocate_section): Use flag variable to determine
2758         whether the relocation refers to a local symbol.
2759         Test whether a PLTREL24 reloc will produce a reloc by looking
2760         to see whether a PLT entry was made.
2761
2762 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
2763
2764         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
2765         entries that could serve as a definition for a weak symbol.
2766
2767 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
2768
2769         From  Ralf Baechle  <ralf@gnu.org>
2770
2771         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
2772         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
2773         against local symbols.
2774         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2775
2776 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
2777
2778         * section.c (struct sec): Add kept_section.
2779         (struct bfd_comdat_info): Remove sec, we can use above.
2780         (STD_SECTION): Add initializer.
2781         (bfd_make_section_anyway): Init here too.
2782
2783         * bfd-in2.h: Regenerate.
2784
2785         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
2786         zeroing of `flags'.
2787         (elf_link_input_bfd): Set all asection->symbol->value's here, and
2788         fudge values for discarded link-once section symbols.
2789
2790         * elf64-hppa.c: Include alloca-conf.h
2791
2792 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
2793
2794         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
2795
2796         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
2797
2798 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
2799
2800         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
2801
2802 2000-10-10  Tom Rix <trix@redhat.com>
2803
2804         * section.c (bfd_make_section_anyway): Release newsect ptr when
2805         newsect->symbol fails to alloc.  Use bfd_release instead of free.
2806
2807 2000-10-09  Richard Henderson  <rth@cygnus.com
2808
2809         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
2810         (elf64_ia64_unwind_entry_compare): New.
2811         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2812
2813 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
2814
2815         * elflink.h (size_dynamic_sections): Don't create various tags if
2816         .dynstr is excluded from the link.  Don't set first dynsym entry
2817         if dynsymcount is zero.
2818         (elf_bfd_final_link): Don't try to swap out dynamic syms if
2819         .dynsym excluded from the link.  Don't try to write any dynamic
2820         sections excluded from the link.
2821
2822         * elf.c (swap_out_syms): Handle global section symbols.
2823
2824 2000-10-05  DJ Delorie  <dj@redhat.com>
2825
2826         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
2827         * coffcode.h (coff_set_alignment_hook): read extended reloc count
2828         (coff_write_relocs): write extended reloc count
2829         (coff_write_object_contents): account for extended relocs
2830
2831 2000-10-05  Jim Wilson  <wilson@cygnus.com>
2832
2833         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
2834         field.
2835         * elf.c (_bfd_elf_make_section_from_shdr): Call the
2836         elf_backend_section_flags function.
2837         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
2838         code.
2839         (elf64_ia64_section_flags): New function containing flag conversion
2840         code.
2841         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
2842         * elfxx-target.h (elf_backend_section_flags): Define.
2843         (elfNN_bed): Initialize elf_backend_section_flags field.
2844
2845 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
2846
2847         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
2848         _bfd_elf32_gc_record_vtable.  Correct a comment.
2849
2850 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
2851
2852         From  Ralf Baechle  <ralf@gnu.org>
2853
2854         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
2855         produces binaries with got[1] = 0x80000001 to differenciate them
2856         for the dynamic linker from the broken binaries produced by old
2857         versions.
2858
2859 2000-09-30  Petr Sorfa <petrs@sco.com>
2860
2861         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
2862         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
2863         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
2864         * configure: Regenerate.
2865
2866 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
2867
2868         Define two bfd_targets for absence and presence of leading
2869         underscore on symbols.  Make sure to only link same kind.
2870         * elf32-cris.c (cris_elf_object_p,
2871         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
2872         cris_elf_merge_private_bfd_data): New.
2873         (elf_backend_object_p, elf_backend_final_write_processing,
2874         bfd_elf32_bfd_print_private_bfd_data,
2875         bfd_elf32_bfd_merge_private_bfd_data): Define.
2876         <Target vector definition>: Include elf32-target.h twice with
2877         different macro settings:
2878         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
2879         bfd_elf32_us_cris_vec.
2880         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
2881         (elf_symbol_leading_char): First as 0, then '_'.
2882         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
2883         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
2884         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
2885         * configure: Regenerate.
2886         * targets.c: Declare bfd_elf32_us_cris_vec.
2887         * po/bfd.pot: Regenerate.
2888
2889 2000-09-29  Momchil Velikov  <velco@fadata.bg>
2890
2891         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
2892         R_ARM_THM_PC22 relocations.
2893
2894 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
2895
2896         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
2897
2898 2000-09-29  Momchil Velikov <velco@fadata.bg>
2899
2900         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
2901         is has the SEC_HAS_CONTENTS flag set.
2902
2903 2000-09-28  \81Örjan Friberg  <orjanf@axis.com>
2904             Hans-Peter Nilsson  <hp@axis.com>
2905
2906         * aout-cris.c (N_TXTADDR): Define.
2907
2908 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
2909
2910         * som.c: Include alloca-conf.h.
2911         * Makefile.am: "make dep-am"
2912         * Makefile.in: Regenerate.
2913
2914 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
2915
2916         * elf32-hppa.c (plt_stub): New.
2917         (PLT_STUB_ENTRY): Define.
2918         (elf32_hppa_link_hash_table): Change multi_subspace to packed
2919         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
2920         (elf32_hppa_link_hash_table_create): Init to suit.
2921         (elf32_hppa_check_relocs): Set has_12bit_branch and
2922         has_17bit_branch as appropriate.
2923         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
2924         non-local functions.
2925         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
2926         Add space for plt_stub as needed.
2927         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
2928         functions at plt_stub.
2929         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
2930         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
2931
2932         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
2933         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
2934         of fixed size, and if negative, disable handling of input sections
2935         before stub section.  Set up default stub group size depending
2936         on detected branch relocs.
2937         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
2938         ensure different offsets from sym_value aren't rounded to
2939         different 2k blocks.  Use lrsel and rrsel for other stubs too for
2940         consistency rather than necessity.
2941         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
2942         (final_link_relocate): Likewise.
2943         (elf32_hppa_relocate_section): Likewise.
2944
2945         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
2946         (_bfd_elf_hppa_gen_reloc_type): Generate them.
2947         (elf_hppa_final_link_relocate): Handle them.
2948         (elf_hppa_relocate_insn): Likewise.
2949         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
2950
2951 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
2952
2953         * elfcode.h (elf_object_p): Preserve and clear abfd section
2954         information.  Restore at error.
2955
2956 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
2957
2958         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
2959         is empty, make sure that its rva also 0. NT loader dislikes
2960         having otherwise.
2961
2962 2000-09-26  Steve Ellcey <sje@cup.hp.com>
2963
2964         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
2965         global by default.
2966
2967 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
2968
2969         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
2970         currently unused RELATIVE_DYNAMIC_RELOCS code.
2971         (hppa_discard_copies): Likewise.
2972         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
2973         comments.  Don't check non-code output sections for stub grouping.
2974
2975 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
2976
2977         * section.c (bfd_get_unique_section_name): Return NULL if
2978         bfd_malloc fails.
2979
2980 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2981
2982         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
2983         instruction sequence to actually work.
2984         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
2985         accordingly.
2986
2987 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
2988
2989         * elf32-sh.c (sh_elf_relocate_section): Use
2990         _bfd_final_link_relocate to apply the relocation against a section
2991         symbol, when doing relocatable links.
2992
2993 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
2994
2995         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
2996         to id_sec.
2997         (stub_hash_newfunc): Here too.
2998         (hppa_add_stub): And here.
2999         (elf32_hppa_link_hash_table): Remove stub_section_created,
3000         reloc_section_created, first_init_sec and first_fini_sec.  Add
3001         stub_group.
3002         (elf32_hppa_link_hash_table_create): Init to suit.
3003         (hppa_get_stub_entry): Add support for grouping stub sections.
3004         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
3005         section code.  Index stub vars by section->id.
3006         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
3007         exit paths.  Zap allocation of above removed vars.  Refine
3008         link-once test.
3009
3010         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
3011         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3012         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
3013         rather than pointer to bfd_link_info.
3014         (hppa_add_stub): Likewise.
3015         (final_link_relocate): Likewise.
3016
3017 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
3018
3019         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
3020         link-once sections.
3021
3022 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
3023
3024         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
3025         ld/emulparams/shelf.sh.
3026
3027 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3028
3029         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
3030         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
3031         * bfd-in2.h: Regenerate.
3032
3033 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
3034
3035         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
3036         LITUSE relocations incorrectly if -relax is specified on the ld
3037         command line and the displacement field of the load or store
3038         instruction is non-zero. (Patch by paul.winalski@compaq.com)
3039
3040 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
3041
3042         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
3043         first_fini_sec here.
3044         (elf32_hppa_size_stubs): Instead correctly find the first .init
3045         and .fini section here.
3046
3047 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
3048
3049         * elf32-hppa.c (clobber_millicode_symbols): New function.
3050         (elf32_hppa_size_dynamic_sections): Call it.
3051
3052 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
3053
3054         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
3055         packed.  Add plabel, plt_abs packed booleans.
3056         (hppa_link_hash_newfunc): Init new fields.
3057         (PLABEL_PLT_ENTRY_SIZE): Define.
3058         (hppa_stub_name): Use size_t len vars.
3059         (hppa_add_stub): Likewise.
3060         (elf32_hppa_build_stubs): Likewise.
3061         (hppa_build_one_stub): Kill some compiler warnings.
3062         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
3063         if dynamic linking.  Munge the local plt offsets into
3064         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
3065         size_t len vars.  Add assert for plabel addend.
3066         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
3067         (elf32_hppa_hide_symbol): New function.
3068         (elf_backend_hide_symbol): Define.
3069         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
3070         with h->plabel set.  Don't make plt entries to have dynamic syms
3071         when they have been forced local.  If plt entry is used by a
3072         plabel, make it PLABEL_PLT_ENTRY_SIZE.
3073         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
3074         Set up .plt offsets for local syms.
3075         (elf32_hppa_relocate_section): Initialise plt entries for local
3076         syms.  Leave weak undefined plabels zero.  Make global plabel
3077         relocs against function symbol, and leave the addend zero.
3078         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
3079         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
3080         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
3081         relocs instead of SEGREL32 for dynamic got relocs.
3082         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
3083         (elf_backend_got_header_size): Adjust.
3084         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
3085
3086         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
3087         (hppa_type_of_stub): Use it instead of #if 0
3088         (hppa_discard_copies): Use it here too.
3089         (elf32_hppa_size_dynamic_sections): And here.
3090
3091         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
3092         (elf32_hppa_link_hash_table_create): And here.
3093         (hppa_build_one_stub): And here.  Instead keep track of stub
3094         offset using _raw_size.
3095         (elf32_hppa_size_stubs): Likewise.
3096         (elf32_hppa_build_stubs): Likewise.
3097         (hppa_size_one_stub): Likewise.  Resize reloc section too.
3098
3099         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
3100         first_fini_sec handling.  Don't search for reloc section or set
3101         hplink->reloc_section_created here.
3102         (elf32_hppa_size_stubs): Instead search for reloc sections, and
3103         set reloc_section_created here.
3104         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
3105         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
3106         and DT_FINI.
3107         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
3108
3109         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
3110         with `hplink->root.'.
3111         (elf32_hppa_check_relocs): Likewise.
3112         (elf32_hppa_gc_sweep_hook): Likewise.
3113         (elf32_hppa_adjust_dynamic_symbol): Likewise.
3114         (hppa_handle_PIC_calls): Likewise.
3115         (elf32_hppa_size_dynamic_sections): Likewise.
3116         (elf32_hppa_set_gp): Likewise.
3117         (elf32_hppa_relocate_section): Likewise.
3118         (elf32_hppa_finish_dynamic_symbol): Likewise.
3119         (elf32_hppa_finish_dynamic_sections): Likewise.
3120
3121         From  David Huggins-Daines  <dhd@linuxcare.com>
3122         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
3123         defined weak symbols in shared links.
3124         (final_link_relocate): Calls to defined weak symbols in shared
3125         objects must go via import stubs, as the target might not be known
3126         at link time.
3127
3128 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
3129
3130         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
3131         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
3132         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
3133         the original entries with EMPTY_HOWTOs, and added new ones to fill
3134         in the gap.
3135         (sh_elf_info_to_howto): Make sure the new gap isn't used.
3136         (sh_elf_relocate_section): Likewise.
3137
3138 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
3139
3140         * cpu-mips.c (arch_info_struct): Add mips:4K
3141         * bfd-in2.h (bfd_mach_mips4K): New define.
3142         * archures.c: Add bfd_mach_mips4K to comment.
3143         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
3144         E_MIPS_ARCH_2 for bfd_mach_mips4K.
3145
3146 2000-09-13  Marco Franzen <marcof@thyron.com>
3147
3148         * som.c (som_write_symbol_strings): Do not used fixed buffers,
3149         use size_t as a counter.
3150         (som_write_space_strings): Similarly.
3151
3152 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
3153
3154         * elf32-i860.c (elf32_i860_relocate_pc26): New function
3155         and prototype.
3156         (elf32_i860_relocate_section): Invoke new function from here.
3157
3158 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3159
3160         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
3161         static.
3162
3163 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3164
3165         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
3166         target section name instead of dumping core when the target symbol is
3167         undefined.
3168
3169 2000-09-09  Kazu Hirata  <kazu@hxi.com>
3170
3171         * riscix.c: Remove DEFUN.
3172
3173 2000-09-08  Nick Clifton  <nickc@redhat.com>
3174
3175         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3176         initialise flags in output bfd if the input bfd is the default
3177         architecture with the default flags.
3178
3179 2000-09-08  Kazu Hirata  <kazu@hxi.com>
3180
3181         * archive.c: Fix formatting.
3182         * coff-arm.c: Likewise.
3183         * doc/chew.c: Likewise.
3184
3185 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
3186
3187         * section.c (bfd_get_unique_section_name): Put a dot before the
3188         numeric suffix.
3189
3190 2000-09-07  Kazu Hirata  <kazu@hxi.com>
3191
3192         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3193         * elf.c: Fix formatting.
3194
3195 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
3196
3197         * config.bfd (sh-*-linux*): Added.
3198         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3199         * targets.c: Declare them.
3200         * elf32-sh-lin.c: New file.
3201         * Makefile.am: Compile it.
3202         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3203         * configure, Makefile.in: Rebuilt.
3204
3205 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
3206
3207         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3208         pseduo-section when determining where the TOC ends.
3209
3210         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3211         output x_tvndx as it is only two bytes wide.
3212
3213         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3214         reloc is 26 or 32 bits wide.
3215
3216         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3217         for relocs that don't change anything.  Also look at the full
3218         6 bits of bitsize.
3219
3220 2000-09-06  Philip Blundell  <philb@gnu.org>
3221
3222         * config.bfd (arm*-*-uclinux*): New target.
3223
3224 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
3225
3226         * configure: Rebuilt with new libtool.m4.
3227
3228 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
3229
3230         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3231         word for variable name.
3232         * bfd-in2.h: Regenerate.
3233
3234 2000-09-05  Nick Clifton  <nickc@redhat.com>
3235
3236         * config.in: Regenerate.
3237         * libbfd.h: Regenerate.
3238         * po/bfd.pot: Regenerate.
3239         * doc/bfdint.texi: Remove CVS date string - it foils compares with
3240         local versions.
3241
3242 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
3243
3244         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
3245
3246 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
3247
3248         Shared library and PIC support.
3249         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3250         (GOT_ENTRY_SIZE): New.
3251         (ELF_DYNAMIC_INTERPRETER): New.
3252         (STUB_SUFFIX): Define.
3253         (LONG_BRANCH_PIC_IN_SHLIB): Define.
3254         (RELATIVE_DYNAMIC_RELOCS): Define.
3255         (enum elf32_hppa_stub_type): New.
3256         (struct elf32_hppa_stub_hash_entry): Rename offset to
3257         stub_offset.  Add a number of new fields.
3258         (struct elf32_hppa_link_hash_entry): New.
3259         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
3260         global_value.
3261         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3262         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3263         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
3264         new fields.
3265         (hppa_link_hash_newfunc): New function.
3266         (elf32_hppa_link_hash_table_create): Use above function. Init new
3267         fields.
3268         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
3269         instead of addend, and remove sym_name from args.  Don't use
3270         symbol name for local syms, instead use sym index.
3271         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3272         stub type rather than size.  Pass in hash and handle import stub
3273         case.  Also pass in reloc instead of offset so we can calculate
3274         PCREL22F and PCREL12F branches properly.
3275         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
3276         import and export stubs too.
3277         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
3278         import and export stub sizing.
3279         (elf32_hppa_check_relocs): New function.
3280         (elf32_hppa_adjust_dynamic_symbol): New function.
3281         (hppa_discard_copies): New function.
3282         (elf32_hppa_size_dynamic_sections): New function.
3283         (elf_backend_size_dynamic_sections): Define.
3284         (elf32_hppa_finish_dynamic_symbol): New function.
3285         (elf_backend_finish_dynamic_symbol): Define.
3286         (elf32_hppa_size_stubs): Stash params in link hash table, and move
3287         some local vars into the link hash table too.  For shared links,
3288         trundle over function syms, generating export stubs.  Handle
3289         PCREL22F branches.  Break out stub creation code from here..
3290         (hppa_add_stub): .. to here.  New function.
3291         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3292         call the bfd linker.  Use elf_gp to record global pointer.
3293         Calculate a value from sections if $global$ is missing.
3294         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3295         (elf32_hppa_gc_mark_hook): New function.
3296         (elf_backend_gc_mark_hook): Define.
3297         (elf32_hppa_gc_sweep_hook): New function.
3298         (elf_backend_gc_sweep_hook): Define.
3299         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3300         Add rel to args, and remove howto, input_bfd, offset, addend,
3301         sym_name as we can recalculate these locally.  Handle calls to
3302         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
3303         handling of undefined weak syms.  Check that stubs are in range.
3304         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
3305         message on hitting a DPREL21L reloc that needs fixing.  Subtract
3306         off PC for PCREL14F.  Break out code that does a stub lookup from
3307         here..
3308         (hppa_get_stub_entry): ..to here.  New function.
3309         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3310         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3311         relocs, etc. etc.
3312         (elf32_hppa_finish_dynamic_sections): New function.
3313         (elf_backend_finish_dynamic_sections): Define.
3314         (elf_backend_final_write_processing) Define.
3315         (hppa_handle_PIC_calls): New function.
3316         (elf32_hppa_build_stubs): Call it.  Pass link_info to
3317         hppa_build_one_stub.
3318         (elf32_hppa_create_dynamic_sections): New function
3319         to create .plt and .got then set .plt flags correctly.
3320         (elf_backend_create_dynamic_sections): Define.
3321         (elf32_hppa_object_p): New function.
3322         (elf_backend_object_p): Define.
3323         (elf32_hppa_elf_get_symbol_type): New function.
3324         (elf_backend_get_symbol_type): Define.
3325         (elf_backend_can_gc_sections): Define.
3326         (elf_backend_want_got_plt): Define.
3327         (elf_backend_plt_alignment): Set to 2.
3328         (elf_backend_plt_readonly): Define.
3329         (elf_backend_want_plt_sym): Define.
3330         (elf_backend_got_header_size): Reserve one entry.
3331
3332         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3333         (elf32_hppa_size_stubs): Pass in multi_subspace.
3334         (elf32_hppa_set_gp): Declare.
3335
3336         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3337         (bfd_get_unique_section_name): New function.
3338         * bfd-in2.h: Regenerate.
3339
3340         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3341         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3342         comment.
3343
3344         From  David Huggins-Daines  <dhd@linuxcare.com>
3345         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3346         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3347         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3348         been updated in finish_dynamic_symbol before modifying function
3349         symbol.
3350
3351         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3352         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
3353         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3354         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
3355         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
3356         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3357         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
3358         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3359
3360         From David Huggins-Daines  <dhd@linuxcare.com>
3361         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3362         style of local labels as well.
3363
3364 2000-09-03  Philip Blundell  <philb@gnu.org>
3365
3366         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3367         references to undefined symbols in debugging sections.
3368
3369 2000-09-02  H.J. Lu  <hjl@gnu.org>
3370
3371         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3372         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3373         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3374         section.
3375
3376 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
3377
3378         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3379         (elf32_i860_is_local_label_name): New function and prototype.
3380
3381 2000-09-02  Nick Clifton  <nickc@redhat.com>
3382
3383         * configure.in: Increase version number to 2.10.91.
3384         * configure: Regenerate.
3385         * aclocal.m4: Regenerate.
3386         * config.in: Regenerate.
3387         * po/bfd.pot: Regenerate.
3388
3389 2000-09-02  Daniel Berlin <dberlin@redhat.com>
3390
3391         * elf.c (_bfd_elf_make_section_from_shdr): Add
3392         .gnu.linkobce.wi. to the list of debug section names.
3393
3394 2000-09-02  Nick Clifton  <nickc@redhat.com>
3395
3396         * dwarf2.c (find_debug_info): New function: Locate a section
3397         containing dwarf2 debug information.
3398         (bfd_dwarf2_find_nearest_line): Find all sections containing
3399         debug information and include them in the stash.
3400
3401 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
3402
3403         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3404         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3405         (sh_reloc_map): Add new relocs.
3406         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3407         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3408         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3409         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3410         functions.
3411         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3412         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3413         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3414         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3415         New array constants.
3416         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3417         New variables.
3418         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3419         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3420         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3421         elf_sh_plt_reloc_offset): Define.
3422         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3423         elf_sh_link_hash_table): New structs.
3424         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3425         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3426         relocation types.
3427         (elf_backend_create_dynamic_sections,
3428         bfd_elf32_bfd_link_hash_table_create,
3429         elf_backend_adjust_dynamic_symbol,
3430         elf_backend_size_dynamic_sections,
3431         elf_backend_finish_dynamic_symbol,
3432         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3433         elf_backend_plt_readonly, elf_backend_want_plt_sym,
3434         elf_backend_got_header_size, elf_backend_plt_header_size):
3435         Define.
3436         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3437         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3438         New relocs.
3439         * bfd-in2.h, libbfd.h: Rebuilt.
3440
3441 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
3442
3443         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3444         change.
3445
3446 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
3447
3448         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3449         not initialized, set them to indicate the SH1 instruction set.
3450
3451 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
3452
3453         * acinclude.m4: Include libtool and gettext macros from the
3454         top level.
3455         * aclocal.m4, configure: Rebuilt.
3456
3457 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
3458
3459         * elf.c: Eliminate references to __sparcv9 macro; replace with
3460         autoconf variables HAVE_PSINFO32_T etc.
3461         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3462         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3463         * config.in: Ditto.
3464         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3465         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3466         * aclocal.m4: Ditto.
3467         * configure: Regenerate.
3468
3469 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
3470
3471         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3472         for any shared link, not just shared -Bsymbolic.
3473         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3474         any shared link, and pass link info to it.
3475         (elf_i386_size_dynamic_sections): Update comment.
3476         (elf_i386_discard_copies): Modify to discard relocs for symbols
3477         that have been forced local.
3478         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3479         that have been forced local.
3480
3481 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
3482
3483         * elflink.h (elf_link_add_object_symbols): Allow common
3484         symbols to have an alignment of 1 if explicitly requested, and
3485         not overridden by other definitions.
3486
3487 2000-08-22  Doug Kwan <dkwan@transmeta.com>
3488
3489         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3490         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3491
3492 2000-08-22  H.J. Lu  <hjl@gnu.org>
3493
3494         * elf-bfd.h (elf_link_hash_table): Add runpath.
3495
3496         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3497         * bfd-in2.h: Rebuilt.
3498
3499         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3500         "runpath" field to NULL.
3501         (bfd_elf_get_runpath_list): New function.
3502
3503         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3504         DT_RUNPATH entries.
3505
3506 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
3507
3508         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3509         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3510         explicitly.  Improve validation of r_type.
3511
3512 2000-08-21  H.J. Lu  <hjl@gnu.org>
3513
3514         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3515         dynamic allocated content space.  Add a comment to remind us that
3516         one day this ought to be fixed.
3517         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3518         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3519         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3520
3521 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
3522
3523         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3524         field with the newly relocated value instead of adding it to the
3525         existing immediate field.
3526         (elf32_i860_relocate_splitn): Likewise.
3527         (elf32_i860_relocate_highadj): Likewise.
3528
3529 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
3530
3531         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3532         was previously just a stub).
3533
3534 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
3535
3536         * elflink.c (_bfd_elf_create_got_section): Don't abort().
3537         Formatting fixes.
3538         (_bfd_elf_create_dynamic_sections): Likewise.
3539
3540 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
3541
3542         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3543         for undefined symbols to be the beginning of the section.
3544
3545         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3546         four extra entries at the beginning of the .rela.plt section.
3547         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3548         section to account for the four reserved entries in the .plt section.
3549
3550 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
3551
3552         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3553         to the list of NOPs we recognize after a branch-and-link.
3554         Use the ori NOP when one is needed.
3555
3556         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3557         for large archives.
3558
3559 2000-08-14  Jim Wilson  <wilson@cygnus.com>
3560
3561         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3562         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3563         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
3564         EF_IA_64_ABSOLUTE.
3565
3566 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
3567
3568         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3569
3570 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
3571
3572         * elf32-i860.c (elf32_i860_relocate_section): New function.
3573         (i860_final_link_relocate): New function.
3574         (elf32_i860_relocate_splitn): New function.
3575         (elf32_i860_relocate_pc16): New function.
3576         (elf32_i860_relocate_highadj): New function.
3577         (elf32_i860_howto): Minor adjustments to some relocations.
3578         (elf_info_to_howto_rel): Define.
3579         (elf_backend_relocate_section): Define.
3580
3581 2000-08-10  Nick Clifton  <nickc@cygnus.com>
3582
3583         * elf32-arm.h: Fix formatting.
3584
3585 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
3586
3587         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3588
3589 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
3590
3591         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3592
3593 2000-08-07  Kazu Hirata  <kazu@hxi.com>
3594
3595         * ieee.c (ieee_write_debug_part): Rewrite a comment.
3596         * elf64-ia64.c: Fix a typo.
3597
3598 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
3599
3600         * elf32-i860.c (elf32_i860_howto_table): New structure.
3601         (lookup_howto): New function.
3602         (elf32_i860_reloc_type_lookup): New function.
3603         (elf32_i860_info_to_howto_rela): New function.
3604         (elf_code_to_howto_index): New structure.
3605         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3606         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3607         elf32_i860_reloc_type_lookup.
3608
3609 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
3610
3611         * som.c (struct fixup_format): Constify `format'.
3612         (som_hppa_howto_table): Use SOM_HOWTO macro.
3613         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3614         (som_bfd_reloc_type_lookup): Likewise.
3615         (compare_subspaces): Remove unused `count1', `count2'.
3616         (som_begin_writing): Remove unused `total_reloc_size'.
3617         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3618         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3619         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3620         (som_find_nearest_line): Decorate unused parameter(s).
3621         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3622         (som_bfd_link_split_section): Likewise.
3623
3624 2000-08-03  Nick Clifton  <nickc@cygnus.com>
3625
3626         * section.c: Restore backed out code.
3627         * elf.c: Restore backed out code.
3628         (copy_private_bfd_data): Fix bug preventing stipped dynamic
3629         binaries from working.
3630         * bfd-in2.h: Regenerate.
3631
3632 2000-08-03  H.J. Lu  <hjl@gnu.org>
3633
3634         * section.c: Back out the change made by Nick Clifton
3635         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
3636         binaries.
3637         * bfd-in2.h: Likewise.
3638         * elf.c: Likewise.
3639
3640 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
3641
3642         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
3643
3644 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
3645
3646         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
3647         * bfd-in2.h, libbfd.h: Regenerate.
3648
3649 2000-07-31  Nick Clifton  <nickc@cygnus.com>
3650
3651         * section.c (struct sec): Add new boolean field 'segment_mark'.
3652         (STD_SECTION): Initialise new field to zero.
3653
3654         * bfd-in2.h: Regenerate.
3655
3656         * elf.c (copy_private_bfd_data): Reorganise section to segment
3657         mapping to cope with moved sections requiring new segments,
3658         and overlapping segments.
3659         (SEGMENT_END): New macro: Return the end address of a segment.
3660         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
3661         contains a section by comparing their VMA addresses.
3662         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
3663         contains a section by comparing their LMA addresses.
3664         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
3665         section should be included in a segment.
3666         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
3667         follows another in memory.
3668         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3669         segments overlap.
3670
3671 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
3672
3673         * cpu-i860.c: Added comments.
3674
3675         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3676         bfd_elf32_i860_little_vec.
3677         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3678         (ELF_MAXPAGESIZE): Changed to 4096.
3679
3680         * targets.c (bfd_elf32_i860_little_vec): Declaration of
3681         new target.
3682         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3683
3684         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3685         config for little endian elf32 i860.
3686         (targ_defvec): Define for the new config above
3687         as "bfd_elf32_i860_little_vec".
3688         (targ_selvecs): Define for the new config above
3689         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3690
3691         * configure.in (bfd_elf32_i860_little_vec): Added recognition
3692         of new target vec.
3693
3694         * configure: Regenerated.
3695
3696 2000-07-27  H.J. Lu  <hjl@gnu.org>
3697
3698         * elflink.h (elf_merge_symbol): Take one more argument,
3699         dt_needed, to indicate if the symbol comes from a DT_NEEDED
3700         entry. Don't overide the existing weak definition if dt_needed
3701         is true.
3702         (elf_link_add_object_symbols): Pass dt_needed to
3703         elf_merge_symbol ().
3704
3705 2000-07-27  Nick Clifton  <nickc@cygnus.com>
3706
3707         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3708         allocated contents.
3709
3710 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
3711
3712         * configure.host (*-*-aix*): AIX has 'long long' always.
3713
3714         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3715         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3716         (xcoff_write_archive_contents_big): Don't update the offset
3717         of the symbol table, xcoff_write_armap will do it.
3718
3719 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
3720
3721         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3722         of dynobj for SGI_COMPAT checks.
3723
3724 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3725
3726         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3727         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3728         * bfd-in2.h: Regenerate.
3729
3730 2000-07-21  Nick Clifton  <nickc@cygnus.com>
3731
3732         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3733         range symbol indices in relocs and issue an error message.
3734
3735 2000-07-20  H.J. Lu  <hjl@gnu.org>
3736
3737         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3738         info->new_dtags when setting DT_FLAGS_1. It will only be set
3739         by the new linker options. It shouldn't break anything.
3740
3741 2000-07-20  H.J. Lu  <hjl@gnu.org>
3742
3743         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3744         only if info->new_dtags is true.
3745
3746 2000-07-20  H.J. Lu  <hjl@gnu.org>
3747
3748         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3749         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3750
3751 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
3752
3753         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3754         (ALL_MACHINES_CFILES): Add cpu-cris.c.
3755         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3756         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3757         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3758         * Makefile.in: Rebuild.
3759         * aclocal.m4: Rebuild.
3760         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
3761         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
3762         (bfd_cris_arch): Declare.
3763         (bfd_archures_list): Add bfd_cris_arch.
3764         * bfd-in2.h: Rebuild.
3765         * config.bfd: (cris-*-*): New target.
3766         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
3767         * configure: Rebuild.
3768         * elf.c (prep_headers): Add bfd_arch_cris.
3769         * libbfd.h: Rebuild.
3770         * libaout.h (enum machine_type): Add M_CRIS.
3771         * reloc.c: Add CRIS relocations.
3772         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
3773         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
3774         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
3775         * po/POTFILES.in, po/bfd.pot: Regenerate.
3776
3777 2000-07-19  H.J. Lu  <hjl@gnu.org>
3778
3779         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
3780         DF_TEXTREL if DT_TEXTREL is set.
3781         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3782         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3783         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3784         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
3785         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3786         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3787         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3788         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3789         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
3790         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
3791
3792         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
3793         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
3794         DT_RPATH is set.
3795         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
3796
3797 2000-07-19  H.J. Lu  <hjl@gnu.org>
3798
3799         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
3800         * bfd-in2.h: Rebuild.
3801
3802         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
3803         (elf_dt_soname): New.
3804
3805         * elf.c (bfd_elf_set_dt_needed_soname): New.
3806
3807         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
3808         entry if the shared object loaded by DT_NEEDED is used to
3809         resolve the reference in a regular object.
3810
3811 2000-07-19  H.J. Lu  <hjl@gnu.org>
3812
3813         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
3814         DT_DEPAUDIT and DT_AUDIT as strings.
3815
3816 2000-07-19  Nick Clifton  <nickc@cygnus.com>
3817
3818         * format.c: Fix formatting.
3819
3820 2000-07-19  H.J. Lu  <hjl@gnu.org>
3821
3822         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
3823
3824 2000-07-19  H.J. Lu  <hjl@gnu.org>
3825
3826         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
3827         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
3828         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
3829         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
3830         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
3831         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
3832         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
3833
3834 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
3835
3836         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
3837         renamed functions from here...
3838         (assign_section_numbers): Use renamed functions.
3839         (prep_headers): Use renamed functions.
3840
3841         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
3842         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
3843         * bfd-in2.h: Regenerate.
3844
3845 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
3846
3847         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
3848         parenthesis in if statement.
3849
3850 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
3851
3852         Enable the support for Traditional MIPS.
3853         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
3854         return ict_none appropriately for traditional mips targets.
3855         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
3856         (STUB_MOVE): Conditionalize for traditonal mips.
3857         (STUB_LI16): Likewise.
3858         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
3859         room for RTPROC header.
3860         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
3861         the permission for the PT_DYNAMIC as read, write and execute.
3862         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
3863         for traditonal mips.
3864         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
3865         _DYNAMIC_LINKING for traditonal mips.
3866         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
3867         in case of traditonal mips.
3868         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
3869         entry is required. For a function if PLT is not required then set the
3870         corresponding hash table entry to 0.
3871         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
3872         traditonal mips.
3873         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
3874         shared object set the value to 0.
3875         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
3876         _DYNAMIC_LINKING for traditonal mips.
3877         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
3878         for traditonal mips.
3879
3880 2000-07-15  H.J. Lu  <hjl@gnu.org>
3881
3882         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
3883
3884 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
3885
3886         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
3887         out a structure that is BFD_IN_MEMORY.
3888
3889 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
3890
3891         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
3892         bfd pointer.  Print section id instead of bfd pointer for local
3893         syms.  Prefix addend with `+' for global syms as well as local.
3894         Correct calculation of name component lengths.
3895         (elf64_hppa_check_relocs): Update call to get_dyn_name.
3896
3897         From David Huggins-Daines  <dhd@linuxcare.com>
3898         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
3899         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
3900         (elf64_hppa_modify_segment_map): Likewise.
3901
3902 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
3903
3904         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
3905         addresses to be "naturally" sign extended.  Return -1 if unknown.
3906         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
3907         * bfd-in2.h: Regenerate.
3908
3909 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
3910
3911         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
3912         and ECOF_SIGNED_64 to list ways to extract an offset.
3913         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
3914         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
3915         Update.
3916         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
3917         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
3918
3919 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
3920
3921         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
3922         bfd_get_start_address.
3923         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
3924         (elf_swap_ehdr_out): Ditto.
3925
3926 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
3927
3928         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
3929         compatibility with older binutils.
3930
3931 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
3932
3933         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
3934         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
3935
3936         From Ryan Bradetich  <rbradetich@uswest.net>
3937         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
3938         (parse_line_table): Ditto.
3939         (_bfd_dwarf1_find_nearest_line): Ditto.
3940         * syms.c (cmpindexentry): Remove extra `*' from params.
3941
3942 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
3943
3944         * elf32-mips.c (sort_dynamic_relocs): New Function.
3945         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
3946         via qsort to sort the dynamic relocations in increasing r_symndx
3947         value.
3948
3949 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
3950
3951         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
3952         ATTRIBUTE_UNUSED to unused args.
3953         (get_opd): Likewise.
3954         (get_plt): Likewise.
3955         (get_dlt): Likewise.
3956         (get_stub): Likewise.
3957         (elf64_hppa_adjust_dynamic_symbol): Likewise.
3958         (elf64_hppa_link_output_symbol_hook): Likewise.
3959         (elf64_hppa_check_relocs): Delete unused var.
3960         (elf64_hppa_size_dynamic_sections): Likewise.
3961         (elf64_hppa_finalize_opd): Likewise.
3962         (elf64_hppa_finalize_dynreloc): Likewise.
3963         (elf64_hppa_modify_segment_map): Likewise.
3964         (elf64_hppa_finish_dynamic_sections): Likewise.
3965
3966         * elf-hppa.h (elf_hppa_final_write_processing): Add
3967         ATTRIBUTE_UNUSED to unused args.
3968         (elf_hppa_final_link_relocate): Likewise.
3969         (elf_hppa_record_segment_addrs): Add paretheses.
3970         (elf_hppa_relocate_section): Constify dyn_name.
3971
3972         From  David Huggins-Daines  <dhd@linuxcare.com>
3973         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
3974         rearrange case statement so that it gets preferred to 32-bit ones.
3975
3976         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
3977         asection->id instead of address of asection structure.
3978         (elf32_hppa_size_stubs): Likewise.
3979
3980         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
3981         for .init* and .fini*.
3982
3983         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
3984         and addends used in stub names to 32 bits.
3985         (elf32_hppa_size_stubs): Likewise.
3986
3987         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
3988         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
3989         not bfd_put_64.  Fix minor comment typo and formatting.
3990
3991         Changes to create multiple linker stubs, positioned immediately
3992         before the section where they are required.
3993         * elf32-hppa.c: Don't include hppa_stubs.h.
3994         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
3995         (elf32_hppa_stub_hash_table): Delete.
3996         (elf32_hppa_link_hash_entry): Delete.
3997         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
3998         stub_hash_table, and store the struct here rather than a pointer.
3999         Delete output_symbol_count.  Add offset array.  Change
4000         global_value to a bfd_vma.
4001         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
4002         (elf32_hppa_stub_hash_traverse): Delete.
4003         (elf32_hppa_name_of_stub): Delete.
4004         (elf32_hppa_link_hash_lookup): Delete.
4005         (elf32_hppa_link_hash_traverse): Delete.
4006         (elf32_hppa_stub_hash_table_init): Delete.
4007         (elf32_hppa_size_of_stub): Pass input section and offset rather
4008         than location and calculate location here.  Don't pass name as all
4009         stubs are now the same size.
4010         (elf32_hppa_stub_hash_newfunc): Init new fields.
4011         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
4012         too.
4013         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
4014         comparing against ints.  Rewrite stub handling code.
4015         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
4016         Case enums to int before comparing against ints.  Remove
4017         bfd_reloc_dangerous case.
4018         (elf32_hppa_build_one_stub): Rewrite.
4019         (elf32_hppa_size_one_stub): New function.
4020         (elf32_hppa_build_stubs): Rewrite.
4021         (elf32_hppa_size_stubs): Pass in linker call-back functions.
4022         Rewrite stub-handling specific code.
4023
4024         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
4025
4026         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
4027
4028         * hppa_stubs.h: Delete.
4029         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
4030         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
4031         * Makefile.in: Regenerate.
4032
4033         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
4034         e_nlrsel.
4035
4036         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
4037
4038         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
4039         and section name for bfd_reloc_notsupported error message.
4040         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
4041         bfd_reloc_notsupported.
4042         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
4043
4044         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
4045         undefined weak symbols for all relocs.
4046         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
4047         offsets are relative to one past the delay slot.
4048         (elf32_hppa_size_stubs): Account for reloc addend when calculating
4049         branch destination.  Put addend into stub name too.
4050         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
4051         adjust by 8 when deciding whether a linker stub is needed.  Put
4052         addend into stub name as for above.
4053
4054         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
4055         various args and vars.
4056         (elf32_hppa_bfd_final_link_relocate): Here too.
4057         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
4058         inner block var to avoid shadowing.
4059
4060         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
4061         unsigned.
4062         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
4063         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
4064         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
4065
4066         * libhppa.h: Change practically all unsigned ints to plain ints.
4067         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
4068         prototypes.
4069
4070         From Ryan Bradetich  <rbradetich@uswest.net>
4071         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
4072         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
4073         suit above.
4074         From  David Huggins-Daines  <dhd@linuxcare.com>
4075         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
4076         to the new OP_* ones.
4077
4078         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
4079         error exit.  Bail out earlier on plabel relocs that we aren't
4080         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
4081         string, and then don't free our copy.
4082         (elf32_hppa_build_one_stub): Make insn unsigned int.
4083
4084         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
4085         available with BL, not BE and BLE.
4086
4087         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
4088         code for elf arg relocs.
4089         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
4090         argument with elf_link_hash_entry h.  Handle undefined weak
4091         symbols.  Move $global$ lookup from here...
4092         (elf32_hppa_relocate_section): ...to here.  Return correct error
4093         message for non-handled relocs.
4094         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
4095         wrong test was -0x3ffff to +0x40000.
4096
4097         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
4098         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
4099         Handle them as such.
4100         (elf_hppa_relocate_insn): Fix a typo.
4101
4102         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
4103         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4104         assemble_17, assemble_21): Delete.
4105         Supply defines for all 64 possible opcodes.
4106         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
4107         formats.  Handle COMICLR.
4108         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
4109         -10, -16, 16, 22.
4110
4111         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
4112         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
4113         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
4114         to suit.
4115         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
4116         the local syms - did this code get deleted accidentally?  Ignore
4117         undefined and undefweak syms.
4118
4119         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
4120         block.  Use it instead of elf64_hppa_hash_table (info).
4121         (elf_hppa_final_link_relocate): Use hppa_info instead of
4122         elf64_hppa_hash_table (info).
4123
4124         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4125         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4126         (hppa_rebuild_insn): Mask immediate bits here instead.
4127         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4128
4129 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
4130
4131         * section.c (struct sec): Add id field.  Tidy comment formatting.
4132         (bfd_make_section_anyway): Set id.
4133         (STD_SECTION): Init id too.
4134         Change CONST to const throughout.
4135         * archures.c (bfd_arch_info): Tidy comment.
4136         (bfd_arch_list): Change a CONST to const.
4137         * libbfd-in.h: Tidy comments and replace CONST with const.
4138         * elf-bfd.h: Likewise.
4139         * libbfd.h: Regenerate.
4140         * bfd-in2.h: Regenerate.
4141         * libcoff.h: Regenerate.
4142
4143 2000-07-07  DJ Delorie  <dj@redhat.com>
4144
4145         * archive.c (_bfd_write_archive_contents): Add an informative
4146         comment.
4147
4148 2000-07-06  Kazu Hirata  <kazu@hxi.com>
4149
4150         * srec.c: Fix formatting.
4151
4152 2000-06-05  DJ Delorie  <dj@redhat.com>
4153
4154         * MAINTAINERS: new
4155
4156 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
4157
4158         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
4159         value of PC-relative offsets.
4160
4161 2000-07-03  Jim Wilson  <wilson@cygnus.com>
4162
4163         * elf64-alpha.c (alpha_elf_size_info): New.
4164         (elf_backend_size_info): Define to alpha_elf_size_info.
4165         * elfcode.h (elf_size_info): Change hash bucket size to 4.
4166
4167 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
4168
4169         * elf32-mips.c: Include elf32-target.h again for the traditional
4170         MIPS targets.
4171
4172 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
4173
4174         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4175         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4176         (avr_info_to_howto_rela): Likewise.
4177         (elf32_avr_gc_mark_hook): Likewise.
4178         (elf32_avr_gc_sweep_hook): Likewise.
4179         (elf32_avr_relocate_section): Likewise.
4180
4181 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
4182
4183         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4184         an external symbol for a non-shared, non-relocatable link.
4185
4186 2000-07-03  Nick Clifton  <nickc@redhat.com>
4187
4188         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4189         is an external symbol.
4190         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4191         external symbol.
4192
4193 2000-07-03  Kazu Hirata  <kazu@hxi.com>
4194
4195         * reloc16.c: Fix formatting.
4196
4197 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
4198
4199         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4200         to add a new target for traditional mips i.e
4201         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4202         * configure.in: Likewise.
4203         * configure: Rebuild.
4204         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4205         bfd_target_vector.
4206         (bfd_elf32_tradlittlemips_vec): Likewise.
4207         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4208         to see that elfNN_bed does not get redefined even if the target file
4209         is included twice for a chip. See elf32-mips.c.
4210
4211 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
4212
4213         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
4214         (CLEANFILES): Add DEPA.
4215         * Makefile.in: Regenerate.
4216
4217 2000-06-30  DJ Delorie  <dj@cygnus.com>
4218
4219         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4220         can't assume the PE header is at 0x80.
4221
4222 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
4223
4224         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4225
4226 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
4227
4228         * go32stub.h: Update stub.
4229
4230 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
4231
4232         * archures.c (bfd_mach_avr5): Define.
4233         * bfd-in2.h (bfd_mach_avr5): Define.
4234         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4235         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
4236         (compatible): Update comment.  Add missing test.
4237         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4238         for avr2 and avr4.  Simplify 8K wrap code.
4239         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4240         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4241
4242 2000-06-26  Kazu Hirata  <kazu@hxi.com>
4243
4244         * coff-h8300.c: Fix formatting.
4245         * cpu-h8300.c: Likewise.
4246
4247 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
4248
4249         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4250         for local symbols whose names are unknown.
4251
4252 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
4253
4254         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4255         find one.
4256         * Makefile.in: Regenerate.
4257         * doc/Makefile.in: Regenerate.
4258
4259 2000-06-20  H.J. Lu  <hjl@gnu.org>
4260
4261         * Makefile.am: Rebuild dependency.
4262         * Makefile.in: Rebuild.
4263
4264 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4265
4266         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4267         (elf_backend_copy_indirect_symbol): Map to the new function.
4268
4269 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
4270
4271         * archive.c (normalize): Correct pointer comparison when checking
4272         for backslashes.
4273         (bfd_bsd_truncate_arname): Likewise.
4274         (bfd_gnu_truncate_arname): Likewise.
4275
4276 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
4277
4278         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4279         sections elf_{text,data}_{section,symbol}.
4280         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4281         (_bfd_mips_elf_hide_symbol): New function.
4282         (elf_backend_hide_symbol): Map to the new function.
4283         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4284         definitions of mips_elf_{text,data}_{section,symbol}.
4285         (mips_elf_local_relocation_p): Try to find the direct symbol
4286         based on new check_forced argument.
4287         (mips_elf_calculate_relocation): Use new version of
4288         mips_elf_local_relocation_p.
4289         (mips_elf_relocate_section): Likewise.
4290         (_bfd_mips_elf_relocate_section): Likewise.
4291         (mips_elf_sort_hash_table): Only assert that have enough GOT
4292         space.
4293         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4294         entry if the relocation based on the new external argument.
4295         (mips_elf_create_dynamic_relocation): Assert that we have a
4296         section contents allocated where we can swap out the dynamic
4297         relocations.
4298         (mips_elf_calculate_relocation): Find the real hash-table entry
4299         correctly by using h->root.root.type.  Only create a dynamic
4300         relocation entry if the symbol is defined in a shared library.
4301         Create an external GOT entry for the GOT16 relocation if the
4302         symbol was forced local.
4303         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4304         dynamic index if the symbol was forced local.
4305
4306 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4307
4308         * elf32-mips.c: Fix typos in comments.
4309
4310 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
4311
4312         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4313         CORE_VERSION_1.
4314
4315 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
4316
4317         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4318         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4319         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4320         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4321         (bfd_elf32_m68hc11_vec): Likewise.
4322         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4323         Supports 68hc11 & 68hc12  at the same time.
4324         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4325         bfd_target_vector.
4326         (bfd_elf32_m68hc11_vec): Likewise.
4327         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4328         * archures.c (bfd_m68hc12_arch): Define and register in global list
4329         (bfd_m68hc11_arch): Likewise.
4330         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4331         BFD_RELOC_M68HC11_3B): Define.
4332         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4333         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4334
4335 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
4336
4337         * elf_bfd.h (struct elf_backend_data): Add info argument to
4338         elf_backend_hide_symbol.
4339         (_bfd_elf_link_hash_hide_symbol): Likewise.
4340         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4341         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4342         * elflink.h (elf_link_add_object_symbols): Likewise.
4343         (elf_link_assign_sym_version): Likewise.
4344
4345 2000-06-18  H.J. Lu  <hjl@gnu.org>
4346
4347         * coff-i386.c (coff_i386_reloc): Don't return in case of
4348         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4349         Compensate PE relocations when linking with non-PE object
4350         files to generate a non-PE executable.
4351
4352 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
4353
4354         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4355         GOT entries if we're doing a static link or -Bsymbolic link.
4356
4357 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
4358
4359         * elflink.h (elf_link_adjust_relocs): Check for and call backend
4360         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4361         available.
4362         (elf_link_output_relocs): Likewise.
4363         (elf_reloc_link_order): Likewise.
4364
4365 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4366
4367         * archures.c (enum bfd_architecture): #define constants for
4368         PowerPc and RS6000 machine numbers.
4369         * bfd-in2.h: Regenerate.
4370         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4371         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
4372         and RS6000 machine numbers using #defined constants from
4373         archures.c.
4374         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4375         machine numbers using #defined constants from archures.c.  Add
4376         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
4377         64-bit words in 620 entry.
4378         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4379         RSC, and RS2.
4380         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4381
4382 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
4383
4384         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4385         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4386         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4387
4388 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4389
4390         * bfd-in.h (bfd_family_coff): Define.
4391         * bfd-in2.h: Regenerate.
4392         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4393         coff_find_nearest_line): Check COFFness using bfd_family_coff()
4394         instead of bfd_target_coff_flavour.
4395         * cofflink.c (_bfd_coff_final_link): Likewise.
4396         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4397         exclude XCOFF files.
4398         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4399         Likewise.
4400         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4401         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4402         * xcofflink.c (XCOFF_XVECP): Delete.
4403         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4404         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4405         bfd_xcoff_record_link_assignment,
4406         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4407         check for bfd_target_xcoff_flavour.
4408
4409 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4410
4411         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4412         files on AIX 4.3.
4413         (read_hdr): New function.
4414         (rs6000coff_core_p): Store mstsave or __context64 struct instead
4415         of trying to extract individual registers.  Set abfd->arch_info
4416         to match the architecture that created the core file.
4417         (rs6000coff_get_section_contents): Delete.
4418         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4419
4420 2000-06-14  H.J. Lu  <hjl@gnu.org>
4421
4422         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4423         is NULL.
4424
4425 2000-06-13  H.J. Lu  <hjl@gnu.org>
4426
4427         * configure: Regenerate.
4428
4429 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
4430
4431         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4432         armpei_little_vec.
4433
4434 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
4435
4436         * configure.in (VERSION): Update to show this is the CVS mainline.
4437
4438 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
4439
4440         * elf32-d10v.c: Include elf/d10v.h
4441         (enum reloc_type): Delete.
4442         * elf32-d30v.c: Include elf/d30v.h
4443         (enum reloc_type): Delete.
4444
4445         * Makefile.am: Run "make dep-am" to regenerate dependencies.
4446         * Makefile.in: Regenerate.
4447
4448         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4449         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4450         move HOWTOs into elf_howto_table.
4451         (R_386_standard, R_386_ext_offset): Define.
4452         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4453         (elf_i386_reloc_type_lookup): Modify calculation of index into
4454         elf_howto_table since we've removed the padding.
4455         (elf_i386_info_to_howto_rel): Likewise.
4456         (elf_i386_relocate_section): Likewise.
4457
4458 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
4459
4460         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4461
4462 2000-06-05  H.J. Lu  <hjl@gnu.org>
4463
4464         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4465         an error when seeing an undefined symbol with hidden/internal
4466         attribute. It is handled in *_relocate_section ().
4467
4468 2000-06-05  H.J. Lu  <hjl@gnu.org>
4469
4470         * elflink.h (elf_fix_symbol_flags): Follow the link for the
4471         indirect symbol for the ELF_LINK_NON_ELF bit.
4472         (elf_link_output_extsym): Don't output the indirect symbol even
4473         if the ELF_LINK_NON_ELF bit is set.
4474
4475 2000-06-01  J.T. Conklin  <jtc@redback.com>
4476
4477         * config.bfd (i[3456]86-*-netbsdelf*): New target.
4478         (i[3456]86-*-netbsdaout*): New target.
4479         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4480         (i[3456]86-*-openbsd*): Likewise.
4481
4482 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
4483
4484         * trad-core.c: From hpux-core.c, include <dirent.h> or
4485         <sys/ndir.h> when possible.
4486
4487 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
4488
4489         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4490         definitions.  We must not assume they are sorted in the file
4491         according to their index numbers.
4492
4493 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
4494
4495         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4496         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
4497         R_PARISC_DIR17F are for absolute branches; Handle them as such.
4498
4499 2000-05-30  Nick Clifton  <nickc@cygnus.com>
4500
4501         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4502         80960CA, 80960MC as valid machine names.
4503
4504 2000-05-30  H.J. Lu  <hjl@gnu.org>
4505
4506         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4507         visibility bits if the symbol is undefined. Correctly handle
4508         weak undefined symbols with hidden and internal attributes.
4509
4510         * elflink.h (elf_link_add_object_symbols): Always turn the
4511         symbol into local if it has the hidden or internal attribute.
4512
4513 2000-05-29  Philip Blundell  <philb@gnu.org>
4514
4515         * ppcboot.c:  Add packed attribute if compiling with GCC.
4516
4517 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
4518
4519         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4520
4521 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
4522
4523         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4524         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4525         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
4526         a few old comments.
4527
4528 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
4529
4530         * Makefile.am: Update dependencies with "make dep-am"
4531         * Makefile.in: Regenerate.
4532
4533         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4534         bindtextdomain): Replace defines with those from intl/libgettext.h
4535         to quieten gcc warnings.
4536
4537 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
4538
4539         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4540
4541         * archive.c (normalize, bfd_bsd_truncate_arname,
4542         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4543         file names with backslashes.
4544
4545         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4546         before opening it.
4547
4548         * sysdep.h: Include filenames.h.
4549
4550 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
4551
4552         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4553
4554 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
4555
4556         * elf64-sparc.c (sparc64_elf_relax_section): New.
4557         (sparc64_elf_relocate_section): Optimize tail call into branch always
4558         if possible.
4559         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4560         (elf32_sparc_relax_section): New.
4561
4562 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
4563
4564         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4565         Remove unusued variables.
4566         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4567         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4568         previous fix, so that shared libs really don't influence targets
4569         extension mask and memory model.
4570
4571 2000-05-23  H.J. Lu  <hjl@gnu.org>
4572
4573         * elf64-alpha.c (elf64_alpha_relocate_section): Check
4574         h->root.other not h->other.
4575         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4576
4577         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4578
4579 2000-05-23  H.J. Lu  <hjl@gnu.org>
4580
4581         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4582         undefined symbol with the non-default visibility attributes.
4583         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4584         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4585         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4586         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4587         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4588         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4589         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4590         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4591         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4592         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4593         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4594
4595 2000-05-22  Richard Henderson  <rth@cygnus.com>
4596
4597         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4598         PCREL22, PCREL64I.  Zero size of special relocs.
4599         (elf64_ia64_reloc_type_lookup): Likewise.
4600         (USE_BRL, oor_brl, oor_ip): New.
4601         (elf64_ia64_relax_section): New.
4602         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4603         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4604         (elf64_ia64_relocate_section): Likewise.
4605         (bfd_elf64_bfd_relax_section): New.
4606         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4607         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4608         * bfd-in2.h, libbfd.h: Regenerate.
4609
4610 2000-05-22  Nick Clifton  <nickc@cygnus.com>
4611
4612         * configure.in : Add peigen.lo to MIPS PE targets.
4613         * configure: Regenerate.
4614
4615 2000-05-22  Momchil Velikov  <velco@fadata.bg>
4616
4617         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4618         only if it is known for both input and output bfds. Separate
4619         error message strings as in some languages, it may be necessary
4620         to change more than one place in the string to change between
4621         'big' and 'little'.
4622
4623         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4624         endianess checks, call _bfd_generic_verify_endian_match() instead.
4625
4626         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
4627
4628         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
4629
4630         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
4631         endianess before checking bfd flavours.
4632
4633 2000-05-22  H.J. Lu  <hjl@gnu.org>
4634
4635         * elflink.h (elf_link_output_extsym): Clear the visibility
4636         field for symbols not defined locally.
4637
4638 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
4639
4640         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4641         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4642         (hppa_rebuild_insn): Mask immediate bits here instead.
4643         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4644
4645 2000-05-18  Momchil Velikov <velco@fadata.bg>
4646
4647         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
4648         relocs for an executable, ensure that they are virtual addresses.
4649
4650 2000-05-18  Jeffrey A Law  (law@cygnus.com)
4651
4652         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
4653
4654 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
4655             Rick Gorton             <gorton@scrugs.lkg.dec.com>
4656
4657         * elflink.h: Add emitrelocations support: when enabled, relocation
4658         information and relocation sections are put into final output
4659         executables.  If the emitrelocations flag is set, do the following:
4660         (elf_bfd_final_link): Emit relocation sections.
4661         (elf_link_input_bfd): Compute relocation section contents.
4662         (elf_gc_sections): Don't clean relocation sections.
4663
4664 2000-05-16  Catherine Moore  <clm@cygnus.com>
4665
4666         * som.c (som_decode_symclass):  Recognize weak symbols.
4667
4668 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
4669
4670         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4671         read idata section only from dataoff.
4672         (pe_print_edata): Correctly check for valid eat_member.
4673
4674 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
4675
4676         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4677
4678 2000-05-14  Philip Blundell  <philb@gnu.org>
4679
4680         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4681
4682 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
4683
4684         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4685
4686         * peigen.c (pe_print_idata): Look for .idata section and print
4687         info even if data directory has zero entries.  Read idata section
4688         starting from dataoff, and adjust all data offsets to suit.  Cast
4689         all bfd_vma vars to unsigned long before passing to fprintf.
4690         * peigen.c (pe_print_edata): Similarly, look for .edata section
4691         and print info even if data directory has zero entries.  Cast
4692         all bfd_vma vars to unsigned long before passing to fprintf.
4693
4694         From Szabolcs Szakacsits <szaka@F-Secure.com>
4695         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4696         directory size which may be bogus.
4697         * peigen.c (pe_print_edata): Similarly.
4698
4699 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
4700
4701         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4702         section is empty.
4703         (copy_private_bfd_data): Allow for space possibly taken up by elf
4704         headers when calculating segment physical address from lma.
4705
4706 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
4707
4708         * versados.c (versados_scan): Init stringlen and pass_2_done.
4709
4710         * trad-core.c (trad_unix_core_file_p): Return
4711         bfd_error_wrong_format rather than bfd_error_file_truncated.
4712
4713         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4714         add_data_entry.  DataDirectory virtual address is relative.
4715         (pe_print_idata): Account for relative DataDirectory virtual
4716         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
4717         (pe_print_edata): Similarly.
4718
4719         From Szabolcs Szakacsits <szaka@F-Secure.com>
4720         * peigen.c (dir_names): Add Delay Import Directory.
4721         (pe_print_idata):  Always search for bfd section containing
4722         idata address rather than looking up section name.  Print this
4723         section name rather than .idata.
4724         (pe_print_edata): Similarly.  Also print some fields as %08lx.
4725         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4726         Win32Version.
4727
4728 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
4729
4730         * xcoff.h: Rename to xcoff-target.h
4731         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4732         * coff-rs6000.c: Ditto.
4733         * coff64-rs6000.c: Ditto.
4734         * coff-pmac.c: Ditto.
4735         * Makefile.in: Regenerate.
4736
4737 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
4738
4739         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4740         Change U802TOC64MAGIC to U803XTOCMAGIC.
4741
4742 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
4743
4744         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4745         * bfd-in.h: Prototype bfd_elf_get_arch_size.
4746         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4747
4748 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
4749
4750         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4751
4752 2000-05-03  Martin v. L\81öwis  <loewis@informatik.hu-berlin.de>
4753
4754         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4755         hidden and internal symbols.
4756         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4757         visibility.
4758         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4759         assign a PLT or GOT entry to symbols with hidden and
4760         internal visibility.
4761
4762 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
4763
4764         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
4765         the .bss section.
4766         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4767
4768 2000-05-02  H.J. Lu  <hjl@gnu.org>
4769
4770         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
4771         ELFOSABI_SYSV.
4772
4773 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
4774
4775         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
4776         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
4777         dependencies.
4778         * Makefile.in: Regenerate.
4779
4780 2000-05-01  Jim Wilson  <wilson@cygnus.com>
4781
4782         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
4783         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
4784         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
4785         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
4786         * Makefile.in: Rebuild.
4787
4788 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
4789
4790         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
4791         doesn't work very well.
4792
4793         * elf-hppa.h (elf_hppa_internal_shdr): Define.
4794         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
4795         Set hdr->s_type to 1 if ARCH_SIZE == 32.
4796         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
4797         (elf_hppa_info_to_howto): Likewise.
4798         (elf_hppa_info_to_howto_rel): Likewise.
4799         (elf_hppa_reloc_type_lookup): Likewise.
4800         (elf_hppa_is_local_label_name): Likewise.
4801         (elf_hppa_fake_sections): Likewise.
4802         (elf_hppa_final_write_processing): Likewise.
4803         (elf_hppa_howto_table): Fully initialise all entries.
4804         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
4805         (elf_hppa_info_to_howto): Likewise.
4806         (elf_hppa_info_to_howto_rel): Likewise.
4807         (elf_hppa_reloc_type_lookup): Likewise.
4808         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
4809         elf_hppa_unmark_useless_dynamic_symbols,
4810         elf_hppa_remark_useless_dynamic_symbols,
4811         elf_hppa_record_segment_addrs, elf_hppa_final_link,
4812         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
4813         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
4814         elf32-hppa.c mess is cleaned up.
4815         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
4816         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
4817         r_field then call hppa_field_adjust inline func with variable
4818         r_field arg, instead call hppa_field_adjust with fixed arg.
4819         In case R_PARISC_PCREL22F, don't set r_field.
4820         (elf_hppa_relocate_insn): Change args and return type to unsigned
4821         int.  Call re_assemble_* funcs to do the work.
4822
4823         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
4824         sign extending.
4825
4826         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
4827         extending.
4828         (sign_extend): Mask first before sign extending.
4829         (low_sign_extend): Rewrite without condition expression.
4830         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
4831         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
4832         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4833         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
4834         result as function return value rather than through pointer arg.
4835         Accept unsigned int args, and return unsigned int.
4836         (re_assemble_3): New.  Combines function of dis_assemble_3 with
4837         re-assembly of opcode and immediate.
4838         (re_assemble_12): Likewise.
4839         (re_assemble_16): Likewise.
4840         (re_assemble_17): Likewise.
4841         (re_assemble_21): Likewise.
4842         (re_assemble_22): Likewise.
4843         (hppa_field_adjust): Rewrite and document, paying attention to
4844         size of types and signed/unsigned issues.
4845         (get_opcode): Shift before masking.
4846         (FDLW): Rename to FLDW.
4847         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
4848         (hppa_rebuild_insn): Change args and return value to unsigned
4849         int.  Make use of re_assemble_*.  Correct case 11.
4850
4851         * dep-in.sed: Handle ../opcodes/.
4852         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
4853         elf64-hppa.h, hppa_stubs.h, xcoff.h.
4854         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
4855         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
4856         elfarm-nabi.lo dependencies outside of auto-dependency area.
4857         Regenerate dependencies.
4858         * Makefile.in: Regenerate.
4859
4860         * configure.in (TRAD_HEADER): Test non-null before
4861         AC_DEFINE_UNQUOTED.
4862         * configure: Regenerate.
4863
4864         * reloc.c: Fix mis-spelling in comment.
4865
4866 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
4867
4868         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
4869         * vms.c (vms_openr_next_archived_file): Return NULL.
4870
4871 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
4872
4873         * coffcode.h Copy changes mistakenly done to libcoff.h in
4874         4/24/2000 patch.
4875
4876 2000-04-29  Andreas Jaeger  <aj@suse.de>
4877
4878         * libbfd-in.h: Correctly check GCC version.
4879         * bfd-in.h: Likewise.
4880         * libhppa.h: Likewise.
4881         * libbfd.h: Regenerate.
4882         * bfd-in2.h: Regenerate.
4883
4884 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
4885
4886         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
4887         coffdu-rs6000.{lo,c}.
4888         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
4889         on xcoff.h
4890         * Makefile.in: Regenerate.
4891         * xcoff.h: New file.
4892         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
4893         * coff-rs6000.c: Move all declarations and defines that are
4894         common to the xcoff backends into xcoff.h
4895         * coff64-rs6000.c: Ditto,
4896
4897 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
4898
4899         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
4900         _bfd_coff_force_symnames in strings and
4901         _bfd_coff_debug_string_prefix_length to their default values.
4902         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
4903
4904 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
4905
4906         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
4907         _bfd_coff_force_symnames in strings and
4908         _bfd_coff_debug_string_prefix_length to their default values.
4909
4910 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
4911
4912         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
4913         Check local_got_refcounts before dereferencing.
4914
4915         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
4916         before deciding we don't need R_PPC_PLT32 relocation.
4917         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
4918         dereferencing.
4919
4920         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
4921
4922         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
4923         .plt entries.
4924         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
4925         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
4926         (elf_i386_relocate_section): Allow for .plt to go missing.
4927         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
4928         can use a relative reloc for got as elf_i386_relocate_section.
4929         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
4930
4931 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
4932
4933         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
4934
4935 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
4936
4937         * Makefile.am (coff64-rs6000.lo): New rule.
4938         * Makefile.in: Regenerate.
4939         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
4940         xcoff_is_local_label_name, xcoff_rtype2howto,
4941         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
4942         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
4943         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
4944         (NO_COFF_SYMBOLS): Define.
4945         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
4946         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
4947         internally.
4948         (MINUS_ONE): New macro.
4949         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
4950         relocation.
4951         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
4952         coff_SWAP_aux_out): Map to the new functions.
4953         * coff64-rs6000.c: New file.
4954         * libcoff.h (bfd_coff_backend_data): Add new fields
4955         _bfd_coff_force_symnames_in_strings and
4956         _bfd_coff_debug_string_prefix_length.
4957         (bfd_coff_force_symnames_in_strings,
4958         bfd_coff_debug_string_prefix_length): New macros for above fields.
4959         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
4960         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
4961         of using coff_swap_sym_in directly.
4962         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
4963         (coff_set_flags) Set magic for XCOFF64.
4964         (coff_compute_section_file_positions): Add symbol name length to
4965         string section length if bfd_coff_debug_string_prefix_length is
4966         true.
4967         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
4968         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
4969         using coff_swap_lineno_in directly.
4970         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
4971         and _bfd_coff_debug_string_prefix_length fields.
4972         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
4973         symbol names into strings table when
4974         bfd_coff_force_symnames_in_strings is true.
4975         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
4976         SET_RELOC_VADDR): New macros.
4977         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
4978         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
4979         code.
4980         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
4981         changes within RS6000COFF_C specific code.
4982         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
4983         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
4984         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4985         Extend existing hack on target name.
4986         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
4987         target name.
4988         * coff-tic54x.c (ticof): Keep up to date with new fields
4989         in bfd_coff_backend_data.
4990         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
4991         targ_selvecs to include rs6000coff64_vec for rs6000.
4992         * configure.in: Add rs6000coff64_vec case.
4993         * cpu-powerpc.c: New bfd_arch_info_type.
4994
4995 2000-04-24  Jeffrey A Law  (law@cygnus.com)
4996
4997         * config.bfd: Only disable elf32-hppa vectors, not all of the
4998         BSD and OSF configuration support.  Provide (disabled) clauses
4999         for PA64 support.
5000         * configure.in: Add clause for PA64 support.
5001         * configure: Rebuilt.
5002
5003         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
5004         (bfd_elf64_hppa_vec): Declare.
5005
5006         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
5007         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
5008         (elf64-hppa.lo): Add dependencies.
5009         * Makefile.in: Rebuilt.
5010
5011         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
5012
5013 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
5014
5015         * libhppa.h (dis_assemble_16): New function.
5016         (pa_arch): Added pa20w element.
5017
5018 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
5019
5020         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
5021         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
5022         bfd_elf64_slurp_reloc_table.
5023
5024         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
5025         definitions to get external names.
5026         (elf_write_relocs): Renamed from write_relocs and make global.
5027         (elf_slurp_reloc_table): Make global.
5028         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
5029
5030         * archive.c (hpux_uid_gid_encode): New function.
5031         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
5032         defined and the ID is greater than 99999.
5033         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
5034         special uid/gid fields into 32 bit values.
5035
5036 2000-04-21  Matthew Green  <mrg@cygnus.com>
5037
5038         * config.bfd: Add NetBSD/sparc64 support.
5039
5040 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
5041                           David Mosberger  <davidm@hpl.hp.com>
5042                           Timothy Wall <twall@cygnus.com>
5043                           Jim Wilson  <wilson@cygnus.com>
5044
5045         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
5046         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
5047         (BFD64_BACKENDS): Add elf64-ia64.lo.
5048         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
5049         (cpu-ia64.lo, elf64-ia64.lo): New rules.
5050         * Makefile.in: Rebuild.
5051         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
5052         (bfd_ia64_arch): Declare.
5053         (bfd_archures_list): Add bfd_ia64_arch.
5054         * bfd-in2.h: Rebuild.
5055         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
5056         * configure: Rebuild.
5057         * configure.host: (ia64-*-linux*): New host.
5058         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
5059         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
5060         * elf.c (prep_headers): Add bfd_arch_ia64.
5061         * libbfd.h: Rebuild.
5062         * reloc.c: Add IA-64 relocations.
5063         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
5064         Declare.
5065         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
5066         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
5067
5068 2000-04-21  Richard Henderson  <rth@cygnus.com>
5069
5070         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
5071         contents when performing a partial link.
5072         (bfd_elf_d30v_reloc_21): Likewise.
5073
5074 2000-04-20  H.J. Lu  <hjl@gnu.org>
5075
5076         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
5077         patch to symbols defined by a shared object.
5078         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
5079
5080 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5081
5082         K&R compiler fixes.
5083         * dwarf2.c (concat_filename): Avoid string literal concatenation.
5084         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
5085
5086 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
5087
5088         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
5089         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
5090         (coff-ia64.lo): Add dependency.
5091         * Makefile.in: Regenerate.
5092         * coff-ia64.c: New file.
5093         * efi-app-ia32.c: Ditto.
5094         * efi-app-ia64.c: Ditto.
5095         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
5096         (coff_set_flags): Ditto.
5097         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
5098         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
5099         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
5100         * configure: Regenerate.
5101         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
5102         (PUT_OPTHDR_IMAGE_BASE): Ditto.
5103         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5104         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5105         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5106         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5107         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5108         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5109         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5110         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5111         (GET_PDATA_ENTRY): Ditto.
5112         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
5113         data_start.  Use above macros to read fields that are 64 bit wide for
5114         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
5115         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
5116         FileAlignment and SectionAlignment to minimum alignment if they
5117         are zero.
5118         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
5119         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
5120         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
5121         Use above macros to write fields that are 64 bit wide for
5122         COFF_WITH_PEP64.
5123         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
5124         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
5125         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
5126         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
5127         begin address, end address, and unwind info address only.  Use
5128         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
5129         print addresses.
5130         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
5131         HIGH3ADJ relocation names.
5132         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
5133         * targets.c: Declare bfd_efi_app_ia32_vec and
5134         bfd_efi_app_ia64_vec.
5135         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
5136         bfd_efi_app_ia64_vec.
5137
5138 2000-04-17  Timothy Wall  <twall@cygnus.com>
5139
5140         * bfd-in2.h: Add prototypes for tic54x load page access.
5141         * bfd-in.h: Regenerate.
5142         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
5143         in customized _set_arch_mach function.
5144         * coffcode.h (coff_set_alignment_hook): Set section load page if
5145         the appropriate macro is defined.
5146         (write_object_contents): Read section load page.
5147
5148 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
5149
5150         * elf32-hppa.h: Update copyright date.
5151
5152         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
5153         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
5154
5155         * elf32-d30v.c (MAX32): Don't use LL suffix.
5156         (MIN32): Define in terms of MAX32.
5157         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
5158
5159         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
5160         expression.
5161
5162         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
5163
5164 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
5165
5166         * dep-in.sed: Match space before file name, not after.
5167         * Makefile.am: Regenerate dependencies.
5168         * Makefile.in: Regenerate.
5169
5170         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
5171         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
5172         extend without an if statement.
5173
5174 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
5175
5176         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5177         signed quantites.
5178         * elf32-mips.c (gprel16_with_gp): Likewise.
5179         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5180         here using -0x40000, not (int)0xfffc0000.
5181         (elf32_hppa_size_of_stub): Likewise.
5182
5183 2000-04-11  Timothy Wall  <twall@cygnus.com>
5184
5185         * coff-tic54x.c: Now builds with all targets.
5186         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5187         * Makefile.in: Regenerate.
5188         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5189         unitialized variable.
5190
5191 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5192
5193         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
5194         --enable-build-warnings option.
5195         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5196         * Makefile.in, configure: Re-generate.
5197
5198 2000-04-07  Nick Clifton  <nickc@cygnus.com>
5199
5200         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5201         BFD_RELOC_THUMB_PCREL_BLX.
5202
5203         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5204         R_ARM_XPC25 and R_ARM_THM_PC22.
5205
5206         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5207         R_ARM_XPC25 and R_ARM_THM_XPC22.
5208         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5209         R_ARM_[XPC25|THM_XPC22].
5210
5211         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5212         elf/arm-oabi.h to elf/arm.h
5213
5214         * Makefile.am: Fix dependency for elfarm-oabi.c
5215         * Makefile.in: Regenerate.
5216
5217         * bfd-in2.h: Regenerate.
5218         * libbfd.h: Regenerate.
5219
5220 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
5221
5222         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5223         and restore it on failure.  Release newly allocated tdata on
5224         failure.
5225
5226 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
5227
5228         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5229         (decode_line_info): Set it.  Report error if unit->line_offset is
5230         equal to or larger than it.
5231
5232 2000-04-07  Timothy Wall  <twall@cygnus.com>
5233
5234         * targets.c: Added vecs for tic54x.
5235         * reloc.c: Added relocs for tic54x.
5236         * libbfd.h: Regenerated.
5237         * configure: Add TI COFF vecs for tic54x.
5238         * configure.in: Ditto.
5239         * config.bfd (targ_cpu): Recognize new tic54x target.
5240         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5241         * bfd-in2.h: Add tic54x target and relocations.
5242         * Makefile.am, Makefile.in: Add tic54x target.
5243         * archures.c (bfd_archures_list): Add tic54x target.
5244         * coff-tic54x.c: New.
5245         * cpu-tic54x.c: New.
5246
5247 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
5248
5249         * elfcore.h (elf_core_file_p): call backend_object_p which
5250         thereby gets an opportunity to update the arch/machine type.
5251
5252 2000-04-06  Timothy Wall  <twall@cygnus.com>
5253
5254         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5255         class.  Handle SEC_CLINK and SEC_BLOCK flags.
5256         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5257         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5258
5259 2000-04-06  Nick Clifton  <nickc@cygnus.com>
5260
5261         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5262         EF_INTERWORK if this is an unknown EABI.
5263         (elf32_arm_merge_private_bfd_data): Check EABI version
5264         numbers.  Only check EF_xxx flags if the EABI version number
5265         is unknown.
5266         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5267         if the EABI version number is unknown.
5268         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5269         if the EABI version number is unknown.
5270
5271 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
5272
5273         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5274         BFD_RELOC_SH_LOOP_END.
5275         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5276         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5277         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5278         (sh_elf_reloc_loop): New function.
5279         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5280         any more.
5281         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5282         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5283         * bfd-in2.h, libbfd.h: Regenerate.
5284
5285 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
5286
5287         * po/bfd.pot: Regenerate.
5288
5289         * Makefile.am: Remove extraneous mkdep comment.
5290         (MKDEP): Use gcc -MM rather than mkdep.
5291         (DEP): Quote when passing vars to sub-make.  Add warning
5292         message to end.
5293         (DEP1): Rewrite for "gcc -MM".
5294         (CLEANFILES): Add DEP2.
5295         Update dependencies.
5296         * Makefile.in: Regenerate.
5297
5298 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
5299
5300         * configure.in: Added corefile support for AIX 4.3.  In particular,
5301         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5302         compiling rs6000-core.c.
5303         * configure: Regenerated.
5304
5305 2000-04-03  H.J. Lu  <hjl@gnu.org>
5306
5307         * cache.c (bfd_open_file): Unlink the output file only if
5308         it has non-zero size.
5309
5310 2000-04-01  Ken Block USG  <block@zk3.dec.com>
5311
5312         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5313         relative relocations for non-loaded sections in shared objects.
5314         (elf64_alpha_check_relocs): Similarly.
5315
5316 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
5317
5318         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5319         BFD_RELOC_16 to switch for extended relocs.
5320         (MY_swap_ext_reloc_in): New.
5321         (MY_swap_ext_reloc_out): New.
5322         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5323         than NAME(aout,swap_ext_reloc_in) for extended relocs.
5324         (NAME(aout,squirt_out_relocs)): Similarly use
5325         MY_swap_ext_reloc_out.
5326         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5327
5328 2000-04-03  Kazu Hirata  <kazu@hxi.com>
5329
5330         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5331         the R_PCRWORD_B case.
5332
5333 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
5334
5335         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5336         on some targets.
5337         * ihex.c : Ditto.
5338
5339 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
5340
5341         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
5342         HOWTO references to bfd_elf_generic_reloc, that have
5343         partial_inplace == true, now use the new function.  The function
5344         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5345         extends its fixes to the R_M32R_{16,24,32} relocs.
5346         The new logic in m32r_elf_lo16_reloc() has been removed, and
5347         it instead calls the new routine to obtain that functionality.
5348
5349 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
5350
5351         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5352         elf32_avr_check_relocs, avr_final_link_relocate,
5353         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5354         elf32_avr_object_p): Add prototypes.
5355         (elf32_avr_gc_mark_hook): Add default for h->root.type.
5356         (bfd_elf_avr_final_write_processing): Make static.
5357
5358 2000-03-27  Denis Chertykov  <denisc@overta.ru>
5359
5360         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
5361         * archures.c (bfd_architecture): Add AVR architecture.
5362         (bfd_archures_list): Add reference to AVR architecture info.
5363         * elf.c (prep_headers): Handle bfd_arch_avr.
5364         * reloc.c: Add various AVR relocation enums.
5365         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5366         list.
5367         * Makefile.am: Add support for AVR elf.
5368         * configure.in: Likewise.
5369         * config.bfd: Likewise.
5370         * Makefile.in: Regenerate.
5371         * configure: This too.
5372         * bfd-in2.h: And this.
5373         * libbfd.h: And this.
5374
5375 2000-03-24  H.J. Lu  <hjl@gnu.org>
5376
5377         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5378         (elf64_alpha_find_reloc_at_ofs): Likewise.
5379
5380 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
5381
5382         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5383         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
5384         allowable range used to be -2**(n-1) to 2**n-1.
5385         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
5386         "boolean overflow" with "bfd_reloc_status_type flag".
5387
5388 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
5389
5390         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5391
5392 2000-03-14  Kazu Hirata  <kazu@hxi.com>
5393
5394         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5395         of shrinks properly, including the last reloc.
5396
5397 2000-03-13  Kazu Hirata  <kazu@hxi.com>
5398
5399         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5400         check for R_MOVL2.
5401
5402 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
5403
5404         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5405         a format mismatch rather than an "error" from bfd_read such as
5406         bfd_error_file_truncated.
5407
5408 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
5409
5410         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5411         sign-extension and big-endian compensation for
5412         R_MIPS_64 even in ld -r.
5413
5414 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
5415
5416         * elf32-mips.c (mips_elf_next_relocation): Rename from
5417         mips_elf_next_lo16_relocation, and generalize to look
5418         for any relocation type.
5419         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5420         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5421         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5422         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5423         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5424         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5425         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5426         (mips_rtype_to_howto): Likewise.
5427         (mips_elf_calculate_relocation): Handle new relocs.
5428         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5429         are paired.  The addend for R_MIPS_GNU_REL16_S2
5430         is shifted right two bits.
5431
5432 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
5433
5434         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5435         comment, and ensure it doesn't happen again.
5436         (bfd_install_relocation): Same here.
5437         (_bfd_relocate_contents): Don't bother assigning unused signmask
5438         shift result.  Fix typos in comments.
5439         Remove trailing whitespace throughout file.
5440
5441 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
5442
5443         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5444         * bfd-in2.h: Rebuild.
5445
5446 2000-03-06  Nick Clifton  <nickc@cygnus.com>
5447
5448         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5449         sym_ptr_ptr fields.
5450         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5451         (SIZEOF_ILF_STRINGS): Redefine.
5452         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
5453         relative reloc, as opposed to a section relative reloc.
5454         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5455         not C_LABEL.
5456         Add length of symbol's prefix to string pointer.
5457         Store a pointer to the symbol in the symbol pointer table.
5458         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5459         Initialise the symbol pointer table.
5460         Store the hint in the Hint/Name table.
5461         Make the jump reloc be symbol realtive, not section relative.
5462         Create an import symbol for imported code.
5463
5464 2000-03-06  Catherine Moore  <clm@cygnus.com>
5465
5466         * elf.c (swap_out_syms):  Check for null type_ptr.
5467
5468 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
5469
5470         * aout-target.h (MY(write_object_contents)): Remove unused
5471         and unusable "#if CHOOSE_RELOC_SIZE".
5472         * pc532-mach.c (MY(write_object_contents)): Ditto.
5473         * netbsd.h (MY(write_object_contents)): Ditto.
5474         * hp300hpux.c (MY(write_object_contents)): Ditto.
5475         * freebsd.h (MY(write_object_contents)): Ditto.
5476         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5477
5478 2000-02-29  H.J. Lu  <hjl@gnu.org>
5479
5480         * peicode.h (jtab): Make it static.
5481
5482         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5483         defined and COFF_IMAGE_WITH_PE is not defined.
5484         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5485         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5486
5487 2000-03-01  Nick Clifton  <nickc@cygnus.com>
5488
5489         * coff-arm.c (bfd_arm_process_before_allocation): Make
5490         'symndx' signed to prevent compile time warning.
5491
5492         * coff-mcore.c: Remove unused prototype for pe_object_p.
5493
5494         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5495         functions that are not used when COFF_IMAGE_WITH_PE is
5496         defined.
5497         (struct sh_opcode): Change type of 'flags' field to unsigned
5498         long so that it can hold the USESAS flag.
5499
5500         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5501
5502         * elf-m10300.c (mn10300_elf_relax_section): Initialise
5503         'sym_sec'.
5504
5505         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5506         parameters.
5507         Remove unusued variables and code.
5508         (elf_backend_add_symbol_hook): Fix prototype.
5509
5510         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5511         'srelgot'.
5512
5513         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5514         'oldinst'.
5515
5516         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5517         parameters.
5518         Remove unusued variables and code.
5519         (elf_backend_add_symbol_hook): Fix prototype.
5520
5521         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5522
5523         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5524         to unused function parameter.
5525
5526         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5527         parameters.
5528         Use EMPTY_HOWTO to initialise empty howto slots.
5529         Remove unused variables.
5530
5531         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5532
5533 2000-03-01  H.J. Lu  <hjl@gnu.org>
5534
5535         * aoutx.h (aout_link_input_section_std): Pass "true" to
5536         the undefined_symbol callback.
5537         (aout_link_input_section_ext): Likewise.
5538         * bout.c (get_value): Likewise.
5539         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5540         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5541         Likewise.
5542         (alpha_relocate_section): Likewise.
5543         * coff-arm.c (coff_arm_relocate_section): Likewise.
5544         * coff-i960.c (coff_i960_relocate_section): Likewise.
5545         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5546         * coff-mips.c (mips_relocate_section): Likewise.
5547         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5548         * coff-sh.c (sh_relocate_section): Likewise.
5549         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5550         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5551         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5552         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5553         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5554         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5555         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5556         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5557         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5558         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5559         * elf32-sh.c (sh_elf_relocate_section): Likewise.
5560         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5561         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5562         * elflink.h (elf_link_output_extsym): Likewise.
5563         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5564         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5565         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5566
5567         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5568         undefined_symbol callback when building shared library with
5569         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5570         "true".
5571         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5572         * elf32-i386.c (elf_i386_relocate_section): Likewise.
5573         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5574         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5575         (elf32_mips_get_relocated_section_content): Likewise.
5576         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5577         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5578         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5579         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5580
5581 2000-02-28  Nick Clifton  <nickc@cygnus.com>
5582
5583         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5584         * Makefile.in: Regenerate.
5585
5586         * configure.in: Add support for mips and sh pe vectors.
5587         * configure: regenerate.
5588
5589         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5590         targets.
5591
5592         * targets.c: Add mips and sh pe vectors.
5593
5594         * libpei.h (coff_final_link_postscript): Only define if not
5595         already defined.
5596
5597         * coffcode.h: Add support for WinCE magic numbers.
5598
5599         * peigen.c (pe_print_reloc): Update comment and rearrange
5600         appending of newline character.
5601
5602         * peicode.h: Add support for Image Library Format.
5603         (pe_ILF_vars): Structure containing data used by ILF code.
5604         (pe_ILF_make_a_section): New function.  Create a section based
5605         on ILF data.
5606         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
5607         ILF data.
5608         (pe_ILF_make_a_symbol): New function.  Create a symbol based
5609         on ILF data.
5610         (pe_ILF_save_relocs): New function.  Store the relocs created
5611         by pe_ILF_make_a_reloc in a section.
5612         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
5613         an ILF object.
5614         (pe_ILF_object_p): New function.  Return a bfd_target pointer
5615         for an ILF object.
5616         (pe_bfd_object_p): If an ILF object is detected call
5617         pe_ILF_object_p on it.
5618
5619         * coff-arm.c: Add support for WinCE relocs which are different
5620         from normal ARM COFF relocs.
5621         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5622
5623         * coff-sh.c: Add support for sh-pe target.
5624         * pe-sh.c: New file.  Support code for sh-pe target.
5625         * pei-sh.c: New file.  Support code for sh-pe target.
5626
5627         * pe-mips.c: New file.  Support code for mips-pe target.
5628         * pei-mips.c: New file.  Support code for mips-pe target.
5629
5630 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
5631
5632         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
5633         architecture if the object causing the bump is dynamic.
5634         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
5635         and also don't it for memory ordering.
5636         (sparc64_elf_write_relocs): Take src_rela out of the loop.
5637
5638 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
5639
5640         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
5641         calling bfd_get_section_size_before_reloc.
5642         (decode_line_info): Likewise.
5643         (_bfd_dwarf2_find_nearest_line): Likewise.
5644
5645 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
5646
5647         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
5648         name of the libtool directory.
5649         * Makefile.in: Rebuild.
5650
5651 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
5652
5653         * som.c (SOM_HOWTO): Define.
5654         (som_hppa_howto_table): Use it.
5655
5656 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
5657
5658         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
5659
5660         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
5661
5662 2000-02-24  Catherine Moore  <clm@cygnus.com>
5663
5664         * som.c (som_misc_symbol_info):  Add field
5665         secondary_def.
5666         (som_bfd_derive_misc_symbol_info):  Initialize
5667         secondary_def.
5668         (som_build_and_write_symbol_table): Keep track
5669         of secondary_def field.
5670         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5671         if secondary_def field is set.
5672         (som_bfd_ar_write_symbol_stuff): Initialize
5673         secondary_def.
5674
5675 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
5676
5677         * dwarf2.c (read_address): Read 16-bits addresses.
5678         (parse_comp_unit): Accept addr_size == 2.
5679
5680 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
5681
5682         * bfd-in.h: Update copyright date.
5683
5684 2000-02-23  Linas Vepstas <linas@linas.org>
5685
5686         * cpu-i370.c: New file.
5687         * elf32-i370.c:  New file.
5688         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5689         (bfd_i370_arch): New.
5690         (bfd_archures_list): Add bfd_i370_arch.
5691         * elf.c (prep_headers): Add bfd_arch_i370.
5692         * Makefile.am: Add support for IBM 370 elf.
5693         * config.bfd: Likewise.
5694         * configure.in: Likewise.
5695         * libbfd.h (bfd_reloc_code_real_names): Likewise.
5696         * reloc.c (bfd_reloc_code_type): Likewise.
5697         * targets.c: Likewise.
5698
5699         * Makefile.in: Regenerate.
5700         * configure: Regenerate.
5701         * bfd-in2.h: Regenerate.
5702
5703 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
5704
5705         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5706         invalid relocation types, and change them to R_386_NONE.
5707
5708 2000-02-22  H.J. Lu  <hjl@gnu.org>
5709
5710         * elflink.h (elf_link_add_object_symbols): If a version symbol is
5711         not defined, don't add a second ELF_VER_CHR.
5712
5713         * elflink.h (elf_bfd_final_link): Call output_extsym for global
5714         symbols converted to local symbols even when stripping all
5715         symbols.
5716         (elf_link_output_extsym): Process global symbols converted to
5717         local symbols even if they are being stripped.
5718
5719 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
5720
5721         * archures.c (bfd_octets_per_byte): Return unsigned int.
5722         (bfd_arch_mach_octets_per_byte): Ditto.
5723         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5724         comparison warning.
5725         * section.c (bfd_get_section_size_before_reloc): Quell signed
5726         vs. unsigned comparison warning.
5727         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
5728         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5729         change.  What was I thinking?
5730         * bfd-in2.h: Regenerate.
5731
5732         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5733         (elf_gc_sections): Same here.
5734         (elf_gc_common_finalize_got_offsets): And here.
5735
5736 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
5737
5738         ELF HPPA doesn't work at present; remove it until it does.
5739         * config.bfd: Comment out setting targ_defvec to
5740         bfd_elf32_hppa_vec.
5741         * Makefile.am: Rebuild dependencies.
5742         (BFD32_BACKENDS): Remove elf32-hppa.lo.
5743         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5744         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5745         * Makefile.in: Rebuild.
5746         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5747
5748 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
5749
5750         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5751         is no bfd_free().  Revert bfd_free part of previous change.
5752
5753 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
5754
5755         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5756         arrays.
5757         (coff_compute_section_file_positions): Use bfd_free to pair
5758         bfd_malloc.
5759         (coff_write_object_contents): Likewise.
5760
5761         * coff-rs6000.c (xcoff_howto_table_16): New variable.
5762         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
5763
5764 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
5765
5766         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
5767         (xcoff_ar_file_hdr_big): New structure.
5768         (SIZEOF_AR_FILE_HDR_BIG): New macro.
5769         (xcoff_ar_hdr_big): New structure.
5770         (SIZEOF_AR_HDR_BIG): New macro.
5771         (xcoff_big_format_p): New macro.
5772         (xcoff_ardata_big): New macro.
5773         (arch_xhdr_big): New macro.
5774         (xcoff_slurp_armap): Handle large archives.
5775         (xcoff_archive_p): Detect large archives.
5776         (xcoff_read_ar_hdr): Handle large archives.
5777         (xcoff_openr_next_archived_file): Handle large archives.
5778         (xcoff_generic_stat_arch_elt): Handle large archives.
5779         (xcoff_write_armap_old): Rename from xcoff_write_armap.
5780         (xcoff_write_armap_big): New function.
5781         (xcoff_write_armap): New function, dispatch to _old or _big.
5782         (xcoff_write_archive_contents_old): Rename from
5783         xcoff_write_archive_contents.
5784         (xcoff_write_archive_contents_big): New function.
5785         (xcoff_write_archive_contents): New function, dispatch to _old or
5786         _big.
5787
5788 2000-02-18  Richard Henderson  <rth@cygnus.com>
5789
5790         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
5791         and hide_symbol members.
5792         (elf_link_hash_copy_indirect): Remove.
5793         (elf_link_hash_hide_symbol): Remove.
5794         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
5795         and elf_backend_hide_symbol.
5796         (_bfd_elf_link_hash_copy_indirect): Declare.
5797         (_bfd_elf_link_hash_hide_symbol): Declare.
5798         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
5799         (_bfd_elf_link_hash_hide_symbol): Likewise.
5800         (_bfd_elf_link_hash_table_init): Don't init killed members.
5801         * elflink.h (elf_link_add_object_symbols): Use the bed function
5802         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
5803         (elf_link_assign_sym_version): Likewise.
5804         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
5805         (elf_backend_hide_symbol): Likewise.
5806         (elfNN_bed): Update for new members.
5807
5808 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
5809
5810         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
5811         STACK_END_ADDR): Define for new core file format.
5812         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
5813         for handling the vagaries of the various core file structures used
5814         by AIX over the years.
5815         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
5816         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
5817         core_dumpx structure.
5818
5819 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
5820
5821         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
5822         (bfd_mach_sh3_dsp): Likewise.
5823         (bfd_mach_sh4): Reinstate.
5824         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
5825         * bfd-in2.h: Regenerate.
5826         * coff-sh.c (struct sh_opcode): flags is no longer short.
5827         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
5828         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
5829         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
5830         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
5831         (sh_opcodes): No longer const.
5832         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
5833         (sh_insn_uses_reg): Check for USESAS and USESR8.
5834         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
5835         (_bfd_sh_align_load_span): Return early for SH4.
5836         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
5837         Take into account that field b of a parallel processing insn
5838         could be mistaken for a separate insn.
5839         * cpu-sh.c (arch_info_struct): New array elements for
5840         sh2, sh-dsp and sh3-dsp.
5841         Reinstate element for sh4.
5842         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
5843         (SH4_NEXT): Reinstate.
5844         (SH3_NEXT, SH3E_NEXT): Adjust.
5845         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
5846         * elf32-sh.c (sh_elf_set_private_flags): New function.
5847         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
5848         (sh_elf_merge_private_data): New function.
5849         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
5850         (bfd_elf32_bfd_copy_private_bfd_data): Define.
5851         (bfd_elf32_bfd_merge_private_bfd_data): Change to
5852         sh_elf_merge_private_data.
5853
5854 2000-02-13  Richard Henderson  <rth@cygnus.com>
5855
5856         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
5857         hide_symbol members.
5858         (elf_link_hash_copy_indirect): New.
5859         (elf_link_hash_hide_symbol): New.
5860         * elflink.h (elf_link_add_object_symbols): Break out copy from
5861         indirect new new symbol to elf.c.
5862         (elf_link_assign_sym_version): Break out privatization of
5863         non-exported symbol to elf.c.
5864         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
5865         (_bfd_elf_link_hash_hide_symbol): New.
5866         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
5867
5868 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
5869
5870         * section.c (_bfd_strip_section_from_output): Add info parameter.
5871         If it passed as non-NULL, use it to check whether any input BFD
5872         has an input section which uses this output section.  Change all
5873         callers.
5874         * bfd-in2.h: Rebuild.
5875
5876         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
5877         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
5878         1999-11-29.
5879         * bfd-in2.h: Rebuild.
5880
5881 2000-02-10  Timothy Wall  <twall@cygnus.com>
5882
5883         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
5884         allow final modifications of swapped-in symbol.
5885         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
5886         * coffcode.h (coff_write_relocs): Use macro
5887         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
5888         symbol index should be set to -1.
5889
5890 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
5891
5892         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
5893         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
5894         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
5895         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
5896         sh_insns_uses_or_sets_freg): New functions.
5897         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
5898         * (sh_insns_conflict): Use new functions and new macros to
5899         detect conflicts when two instructions both set same integer registers,
5900         both set same fp register, and both set special register.
5901
5902 2000-02-09  Timothy Wall  <twall@cygnus.com>
5903
5904         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
5905         swapping in sections, so that the swapping routines have access to
5906         the arch/mach info.
5907
5908 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
5909
5910         * coff-go32.c: Update comment. Update copyright.
5911
5912 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
5913
5914         * syms.c (bfd_decode_symclass)
5915         Two new class characters were added - 'V' and 'v'.  The
5916         meaning of 'W' is now restricted to just weak non-object
5917         symbols.  This allows differentiation between, for example,
5918         weak functions vs weak objects.  nm for example now dumps:
5919         'W' = weak global
5920         'w' = weak unresolved
5921         'V' = weak global object
5922         'v' = weak unresolved object
5923
5924         (bfd_is_undefined_symclass): New function.  Return true if the
5925         given symbol class represents and undefined/unresolved symbol.
5926
5927         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
5928         unresolved symbols.
5929
5930         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
5931
5932         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
5933         STT_ARM_16BIT flag set, but it is not attached to a data object
5934         return STT_ARM_16BIT so that it will be treated as code by the
5935         disassembler.
5936
5937 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
5938
5939         * coff-i386.c (i3coff_object_p): Remove prototype.
5940         Update copyright.
5941
5942         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
5943         to name.  Update copyright.
5944
5945         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
5946         assignment to avoid warning.  Update copyright.
5947
5948 2000-01-24  Robert Lipe  (robertl@sco.com)
5949
5950         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
5951         instead of using GNU C extension.
5952
5953 2000-01-21  Nick Clifton  <nickc@cygnus.com>
5954
5955         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
5956         amount from a bfd_in_memory structure.
5957         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
5958         structure.
5959
5960 2000-01-14  Nick Clifton  <nickc@cygnus.com>
5961
5962         * linker.c (default_indirect_link_order): oops - fix incorrectly
5963         applied patch from Tim Wall.
5964
5965 2000-01-13  Timothy Wall (twall@tiac.net>
5966
5967         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
5968         = scnhsz, filhsz, relsz, aoutsz, etc)
5969
5970         * coffswap.h: Ditto.
5971
5972 2000-01-13  Nick Clifton  <nickc@cygnus.com>
5973
5974         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
5975         interwork thumb to arm stub.
5976
5977 2000-01-13  Timothy Wall (twall@tiac.net>
5978
5979         * archures.c (bfd_octets_per_byte): New function: Return
5980         target byte size.
5981         (bfd_arch_mach_octets_per_byte): New function: Return target
5982         byte size.
5983
5984         * section.c: Distinguish between octets and bytes for usage of
5985         _cooked_size,  _raw_size, and output_offset.  Clarify
5986         description of bfd_set_section_contents.
5987
5988         * bfd-in2.h: Regenerate.
5989
5990         * coffgen.c: Indicate that the offset parameter is in bytes, not
5991         octets.
5992
5993         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
5994         where appropriate to get the octet offset when calling
5995         bfd_set_section_contents.
5996         (bfd_coff_reloc_link_order): Ditto.
5997
5998         * linker.c (bfd_generic_reloc_link_order): Ditto.
5999         (_bfd_default_link_order): Ditto.
6000
6001         * reloc.c (bfd_perform_relocation):  Distinguish between octets
6002         and bytes.  Use octets when indexing into octet data; use bytes
6003         when calculating target addresses.
6004         (bfd_install_relocation): Ditto.
6005
6006         * srec.c (srec_write_section): Ditto.
6007
6008 2000-01-13  Nick Clifton  <nickc@cygnus.com>
6009
6010         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
6011         3 to 2.  This allows 4 byte sized sections, which is necessary for
6012         dlltool to build functioning DLLs.
6013
6014 2000-01-10  Philip Blundell  <pb@futuretv.com>
6015
6016         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
6017         (arm*-*-conix*): New target.
6018
6019 2000-01-10  Egor Duda  <deo@logos-m.ru>
6020
6021         * config.bfd: Include elf32_i386 vector to target list for cygwin
6022         and mingw.
6023
6024         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
6025         * configure.in: Test for structure win32_pstatus_t in
6026         <sys/procfs.h>
6027         * configure: Regenerate.
6028
6029         * elf.c (elfcore_grok_win32pstatus): New function: process
6030         win32_pstatus_t notes in elf core file.
6031         (elfcore_grok_note): Detect win32_pstatus notes.
6032
6033 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
6034
6035         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
6036         visibility.
6037         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
6038         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
6039
6040 For older changes see ChangeLog-9899
6041 \f
6042 Local Variables:
6043 mode: change-log
6044 left-margin: 8
6045 fill-column: 74
6046 version-control: never
6047 End: