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