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