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