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