* rddbg.c (read_section_stabs_debugging_info): Also recognize
[binutils.git] / bfd / ChangeLog
blobbeaa04a6b2dfd00889baf4bae791e2087b1e8ac1
1 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
3         * coff-h8300.c: Fix formatting.
4         * elf32-h8300.c: Likewise.
5         * reloc16.c: Likewise.
7 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
9         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
10         section when dynamic section unused;  _bfd_strip_section_from_output
11         instead.
13 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
15         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
16         and sym_vec.
18         * dwarf2.c: Revert last change.
20 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
22         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
23         _bfd_dwarf2_find_nearest_line): Use
24         bfd_simple_get_relocated_section_contents() instead of
25         bfd_get_section_contents().
26         * reloc.c (bfd_perform_relocation): Add sanity check.
27         * simple.c (simple_get_relocated_section_contents): If the section
28         does not have any relocs associated with it, just return the
29         unadjusted contents.
31 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
33         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
34         case R_CRIS_32_GOT>: Correct test for filling in constant .got
35         contents, enabling for a non-DSO, for symbols defined in the
36         program with --export-dynamic.
38 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
40         * elf64-ppc.c: Comment typo fixes.
41         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
43 2002-11-07  Nick Clifton  <nickc@redhat.com>
45         * po/da.po: Updated Danish translation.
47 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
49         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
50         exactly three internal relocs per external reloc.  Set reloc_count
51         to the external reloc count.
53 2002-11-06  Klee Dienes  <kdienes@apple.com>
55          * coff-stgo32.c (stub_bytes): Mark as const.
56          Fix comment formatting.
58 2002-11-06  Klee Dienes  <kdienes@apple.com>
60         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and 
61         xsym.lo.
62         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
63         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
64         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
65         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
66         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
67         sym.
68         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
69         * Makefile.in: Regenerate.
70         * doc/Makefile.in: Regenerate.
71         * bfd-in2.h: Regenerate.
72         * xsym.c: New file.  Contains support for the Apple/Metrowerks
73         xSYM debugging format.
74         * xsym.h: New file.
75         * pef.c: New file.  Contains support for the Apple Code Fragment
76         Manager Preferred Executable Format
77         * pef.h: New file.
78         * pef-traceback.h: New file.  Contains support for parsing PowerPC
79         traceback tables as used by PEF executables (and perhaps other
80         systems as well).
81         * mach-o.c: New file.  Contains support for the Mach-O object file
82         format.
83         * mach-o.h: New file.
84         * mach-o-target.c: New file.  Declares the mach-o targets
85         themselves.  Included three times by mach-o.c; each time with a
86         different set of macros set.
87         
88 2002-11-06  Graeme Peterson  <gp@qnx.com>
90         * Makefile.am: Remove entries for elf32-qnx.[ch].
91         * Makefile.in: Regenerate.
92         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
93         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
94         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
95         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
96         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
97         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
98         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
99         * configure: Regenerate.
100         * elf32-qnx.c: Remove.
101         * elf32-qnx.h: Remove.
102         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
103         is_contained_by_filepos, and copy_private_bfd_data_p.
104         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
105         is_contained_by_filepos, and copy_private_bfd_data_p.
106         * elf32-i386.c: Remove QNX extended bfd support.
107         * elf32-ppc.c: Remove QNX extended bfd support.
108         * elf32-sh.c: Remove QNX extended bfd support.
109         * elfarm-nabi.c: Remove QNX extended bfd support.
110         * targets.c: Remove qnx vectors.
111         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
112         (elf_backend_is_contained_by_filepos): Remove.
113         (elf_backend_copy_private_bfd_data_p): Remove.
114         * po/SRC-POTFILES.in: Regenerate.
116 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
117             Alan Modra  <amodra@bigpond.net.au>
119         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
120         dynamic relocs against section symbols for the output section vma.
122 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
124         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
125         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
127 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
128             Alan Modra  <amodra@bigpond.net.au>
130         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
131         vectors in target_selvecs.
132         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
133         in target_selvecs.
134         (sh-*-netbsdelf*): Likewise.
135         * configure.in (assocvecs): New variable.  Handle assocvecs like
136         selvecs.
137         * configure: Regenerate.
138         * format.c (bfd_check_format_matches): Store bfd_target pointers
139         in matching_vector instead of target names.  Select first target
140         from bfd_associated_vector that matches a list of ambiguous targets.
141         * targets.c (_bfd_associated_vector): New array.
142         (bfd_associated_vector): New variable.
143         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
144         * libbfd-in.h (bfd_associated_vector): Declare.
145         * libbfd.h: Regenerate.
147 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
149         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
150         non-NULL before dereferencing.
152 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
154         * vms.c (vms_object_p): Restore the start address when returning
155         NULL.
157 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
158             Hans-Peter Nilsson  <hp@axis.com>
160         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
161         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
162         Set up a larger symshndxbuf, and write it out.  Free it on
163         exit rather than freeing symbuf twice.  Correct section index
164         on output section symbol loop.
165         (elf_link_output_sym): Accumulate symbol extension section
166         indices, reallocating symshndxbuf rather than writing it out.
167         (elf_link_flush_output_syms): Don't flush symshndxbuf.
168         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
169         Use bfd_zalloc to clear i_shdrp[0] too.
171 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
173          * elf32-sh64-com.c (sh64_address_in_cranges): Use
174         _raw_size of cranges section if _cooked_size not yet set.
176 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
178         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
179         for bfd_elf32_swap_symbol_out.
181 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
183         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
184         signed and unsigned in comparison.
186 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
188         * coffcode.h: Remove extraneous '\'.
190 2002-10-28  H.J. Lu <hjl@gnu.org>
192         * Makefile.am (targets.lo): Depend on Makefile instead of
193         config.status.
194         (archures.lo): Likewise.
195         * Makefile.in: Regenerated.
197 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
199         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
200         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
201         targ_selvecs.
203 2002-10-25  Jim Wilson  <wilson@redhat.com>
205         * elf64-sh64.c (sh_elf64_relocate_section): Call
206         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
207         of SHF_MERGE section.
209 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
211         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
213 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
215         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
216         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
217         unsigned int.
218         (NAME(aout,final_link)): Cast enum used in assignment.
219         (aout_link_write_symbols): Cast enums in comparisons, int values to
220         boolean, enums in assignments to int.
221         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
222         (aout_link_input_section_ext): Likewise.  Cast enums used in comparisons
223         with unsigned ints.
224         (aout_link_reloc_link_order): Cast enum to int in assignment.
225         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
226         calls to char *.
227         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
228         assignment.
229         * bfd-in2.h (bfd_set_section_vma): Likewise.
230         * bfd.c (bfd_record_phdr): Cast enums in assignments.
231         * binary.c (bfd_alloc): Cast enum to long.
232         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
233         * dwarf2.c (read_abbrevs): Add casts to enum types.
234         (read_attribute_value): Likewise.
235         (arange_add): Cast result of bfd_zalloc call.
236         (comp_unit_contains_address): Return true and false.
237         (comp_unit_find_nearest_line): Cast return to boolean.
238         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
239         * gen-aout.c: define macro '_' if not defined.
240         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
241         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
242         (bfd_write_bigendian_4byte_int): Cast return to boolean.
243         (bfd_seek): Cast bfd_realloc to bfd_byte *.
244         (bfd_generic_is_local_label_name): Cast return to boolean.
245         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
246         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
247         struct bfd_hash_entry *.
248         (_bfd_generic_link_hash_newfunc): likewise.
249         (_bfd_generic_final_link): Cast enum to unsigned int.
250         * merge.c (sec_merge_emit): Cast return to boolean.
251         (merge_strings): Add casts to const unsigned char *.
252         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
253         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
254         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
255         struct bfd_hash_entry *.
256         (bfd_set_section_content): Add cast to PTR in comparison.
257         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
258         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
259         simple_dummy_unattached_reloc,
260         bfd_simple_get_relocated_section_contents): Add K&R declarations and
261         function definitions.
262         * srec.c (S3Forced): Initialize to false.
263         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
264         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
265         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
266         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
267         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
268         comparisons.
270 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
272         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
273         relocs into shared lib non-allocated reloc sections.
275 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
277         * dwarf2.c (add_line_info): Ensure that the line_info_table is
278         sorted even when given an out-of-order line sequence.
279         (lookup_address_in_line_info_table): When an exact VMA match is
280         not found, return line information with the closest VMA.
282 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
284         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
285         HPUX 11.00 patch PHSS_26559.
287 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
289         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
290         the options section into a separate section unless IRIX 6
291         compatibility is enabled.
293 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
295         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
296         into arrays.
297         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
298         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
299         into account.
300         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
301         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
303 2002-10-21  Graeme Peterson  <gp@qnx.com>
305         * targets.c (_bfd_target_vector): Add missing qnx vectors.
307 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
309         * targets.c (bfd_target_list): Don't return the default target twice.
311 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
313         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
314         perror with bfd_perror.
316 2002-10-19  H.J. Lu <hjl@gnu.org>
318         * elflink.h (elf_link_add_object_symbols): Correctly handle
319         DT_RPATH and DT_RUNPATH.
321 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
323         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
325 2002-10-17  Denis Chertykov  <denisc@overta.ru>
327         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
328         for ip2k port.
330 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
332         * elfxx-target.h (USE_REL): Don't define as 1.
333         * elf32-arm.h (USE_REL): Provide a default define of 0.
334         Use #if rather than #ifdef when testing USE_REL.
335         * elf32-m32r.c: Likewise.
337         * elf32-arc.c (USE_REL): Define as 1.
338         * elf32-d10v.c (USE_REL): Likewise.
339         * elf32-m32r.c (USE_REL): Likewise.
340         * elf32-m68hc11.c (USE_REL): Likewise.
341         * elf32-m68hc12.c (USE_REL): Likewise.
342         * elf32-or32.c (USE_REL): Likewise.
343         * elfarm-nabi.c (USE_REL): Likewise.
345 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
347         * config.bfd (s390-*-linux*): Add targ64_selvecs.
348         (s390x-*-linux*): Add targ_selvecs.
350 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
352         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
353         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
354         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
355         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
356         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
357         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
358         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
359         (SOURCE_HFILES): Add elf32-qnx.h.
360         (BUILD_HFILES): Add bfdver.h.
361         Run "make dep-am".
362         * Makefile.in: Regenerate.
363         * configure.in Update bfd vector dependencies.
364         * configure: Regenerate.
365         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
366         * elf32-i386qnx.c: Likewise.
367         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
368         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
369         * elf32-sh-lin.c: Likewise.
370         * elf32-shqnx.c: Likewise.
371         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
372         * elf32-sh64-nbsd.c: Likewise.
373         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
374         * elf64-sh64-nbsd.c: Likewise.
375         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
376         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
377         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
378         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
379         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
380         (elf_backend_is_contained_by_filepos): Likewise.
381         (elf_backend_copy_private_bfd_data_p): Likewise.
382         Globalize and move functions to..
383         * elf32-qnx.c: ..here.  New file.
384         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
385         emit target vectors when INCLUDE_SHMEDIA.
386         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
387         end of file.
388         * elf64-sh64.c: Remove ELF_ARCH test.
389         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
390         * po/BLD-POTFILES.in: Regenerate.
391         * po/SRC-POTFILES.in: Regenerate.
393 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
395         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
396         loaded with --just-symbols.
398         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
399         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
400         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
401         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
403 2002-10-15  Richard Henderson  <rth@redhat.com>
405         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
406         (BFD64_BACKENDS_CFILES): Likewise.
407         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
408         * elf64-alpha-fbsd.c: Remove file, move code ...
409         * elf64-alpha.c: ... here.
410         * Makefile.in, configure: Rebuild.
412 2002-10-14  Richard Henderson  <rth@redhat.com>
414         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
415         VALUE, not ADDEND.
417 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
419         * elf32-sh.c (elf_sh_link_hash_entry): Replace
420         datalabel_got_offset with union of datalabel_got
421         offset and refcount.
422         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
423         (allocate_dynrelocs): Delete unnecessary code for
424         STT_DATALABEL type.  Create entry in got for
425         datalabel version of symbol if datalabel_got.refcount > 0.
426         (sh_elf_relocate_section): Use datalabel_got union.
427         (sh_elf_gc_sweep_hook): Pull common code to initialize
428         h and eh out of switch statement.  Declare seen_stt_datalabel.
429         Initialize it.  Decrement datalabel_got.refcount for
430         got relocs when seen_stt_datalabel is true.
431         Decrement local_got_refcounts entry for datalabel got relocs
432         of local symbols.
433         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
434         (sh_elf_check_relocs): Declare seen_stt_datalabel.
435         Initialize it.  When seen_stt_datalabel is true, increment
436         datalabel_got refcount rather than got.refcount.
437         (sh_elf_finish_dynamic_symbol): Create relocs to
438         initialize got entry for datalabel version of symbol.
440 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
442         * Makefile.am: Run "make dep-am".
443         (BFD_H_FILES): Remove version.h.
444         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
445         * version.h: ..to here.
446         * configure.in (bfd_version_date): Remove.
447         (AC_OUTPUT): Make bfdver.h from version.h.
448         * bfd.c: #include "bfdver.h".
449         * vms-hdr.c: Likewise.
450         * Makefile.in: Regenerate.
451         * bfd-in2.h: Regenerate.
452         * configure: Regenerate.
453         * po/SRC-POTFILES.in: Regenerate.
455 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
457         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
458         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
459         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
460         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
461         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
462         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
463         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
464         bfd_mach_ip2022, bfd_mach_ip2022ext,
465         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
466         * bfd-in2.h: Regenerate.
468 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
470         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
471         endian vector to targ_selvecs.
473 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
475         * elfxx-mips.c (mips_elf_calculate_relocation): Take
476         save_addend argument.  Don't apply the 32-bit mask to a
477         GPREL32 value if it's to be used in another relocation.  Don't
478         use forced-check computation of local_p to decide whether to
479         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
480         of the addend of a non-in-place GPREL16 relocation.
481         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
482         mips_elf_calculate_relocation().
484 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
486         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
487         with symbols in other sections if we relaxed something;  the sections
488         output offsets must be re-computed before.
490 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
492         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
493         handling to use Elf_Internal_Sym.
494         (m68hc11_elf_relax_delete_bytes): Likewise.
496 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
498         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
499         sh_elf_object_p, dtpoff_base): New functions.
500         (sh_elf_howto_table): Add TLS relocs.
501         (sh_reloc_map): Likewise.
502         (sh_elf_info_to_howto): Support TLS relocs.
503         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
504         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
505         New macros.
506         (sh_elf_obj_tdata): New.
507         (elf_sh_link_hash_table): Add tls_ldm_got.
508         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
509         (allocate_dynrelocs): Support TLS relocs.
510         (sh_elf_size_dynamic_sections): Likewise.
511         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
512         .rela.got section when found already.  Return false after printing
513         error about unresolvable relocation.
514         (sh_elf_gc_sweep_hook): Support TLS relocs.
515         (sh_elf_check_relocs): Likewise.
516         (sh_elf_finish_dynamic_symbol): Likewise.
517         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
518         * reloc.c: Add SH TLS relocs.
519         * bfd-in2.h, libbfd.h: Regenerate.
521 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
523         * Makefile.in: Regenerated.
525 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
527         * Makefile.am: Run dep-am.
528         (BFD_H_DEP): Add simple.c and linker.c.
529         (BFD32_LIBS): Add simple.lo.
530         (BFD32_LIBS_CFILES): Add simple.c.
531         * Makefile.in: Regenerated.
532         * bfd-in2.h: Regenerated.
533         * simple.c: New file.
535 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
537         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
538         (record_thumb_to_arm_glue): Likewise.
539         * ecoff.c (ecoff_link_add_externals): Likewise.
540         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
541         (record_thumb_to_arm_glue): Likewise.
542         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
543         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
544         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
545         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
546         * elf64-ppc.c (func_desc_adjust): Likewise.
547         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
548         (sh64_elf64_create_dynamic_sections): Likewise.
549         * elflink.c (_bfd_elf_create_got_section): Likewise.
550         (_bfd_elf_create_dynamic_sections): Likewise.
551         (_bfd_elf_create_linker_section): Likewise.
552         * elflink.h (elf_add_default_symbol): Likewise.
553         (elf_link_create_dynamic_sections): Likewise.
554         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
555         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
556         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
557         (_bfd_mips_elf_add_symbol_hook): Likewise.
558         (_bfd_mips_elf_create_dynamic_sections): Likewise.
559         * linker.c (generic_link_add_symbol_list): Likewise.
560         * xcofflink.c (xcoff_link_add_symbols): Likewise.
562         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
564         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
565         completely removed.  Correct local sym adjustment.
567 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
569         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
570         Correct mistake in calculation of address of .got.
571         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
572         elf_sh64_pic_plt_entry_le): Likewise.
574 2002-10-09  Richard Shann <richard.shann@superh.com>
575             Stephen Clarke <stephen.clarke@superh.com>
577         * Makefile.am: Add entries for elf32-sh64-lin.c and
578         elf64-sh64-lin.c. Regenerate.
579         * Makefile.in: Regenerate.
580         * config.bfd:  Change sh64eb-*-linux* and sh64-*-linux*
581         to use sh64 vectors rather than sh vectors.
582         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
583         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
584         * configure: Regenerate.
585         * elf32-sh64-lin.c: New file.
586         * elf64-sh64-lin.c: New file.
587         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
588         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
590 2002-10-08  H.J. Lu <hjl@gnu.org>
592         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
593         IE->LE transition for R_386_TLS_IE.
595 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
597         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
599 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
601         * cofflink.c (mark_relocs): Don't mark relocations in excluded
602         sections.
604 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
606         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
607         code.
609         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
611 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
613         * opncls.c: Formatting.
614         (_bfd_new_bfd): Use a smaller section hash table.
616 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
618         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
619         of the other two relocations packed with a REL32 to NONE.
621 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
623         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
624         (sh_elf_link_hash_newfunc): Initialize it.
625         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
626         to got.refcount for symbols that are forced local or when
627         we have direct got refs.
628         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
629         to correctly adjust got.refcount and plt.refcount.
630         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
631         (sh_elf_check_relocs): Increment gotplt_refcount.
633 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
635         * elf32-i386.c (elf_i386_relocate_section): Fix
636         movl foo@indntpoff, %eax IE->LE transition.
638 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
640         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
641         sequence and its transitions.
643 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
645         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
646         to st_value + addend in non-code sections.
647         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
648         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
650 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
651             Ken Raeburn  <raeburn@cygnus.com>
652             Aldy Hernandez  <aldyh@redhat.com>
653             Eric Christopher  <echristo@redhat.com>
654             Richard Sandiford  <rsandifo@redhat.com>
656         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
657         (bfd_mach_mips5500): New.
658         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
659         (arch_info_struct): Add corresponding entries here.
660         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
661         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
662         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
663         bfd_mach_mips5400 and bfd_mach_mips5500.
664         (_bfd_mips_elf_mach_extends_p): New function.
665         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
666         the EF_MIPS_MACH flags.
667         * bfd-in2.h: Regenerate.
669 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
671         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
672         .got sections.
674 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
676         * elf.c (map_sections_to_segments): Correct test for start of
677         writable section in the same page as end of read-only section.
679 2002-09-27  Matt Thomas  <matt@3am-software.com>
681         * elf32-vax.c (elf_vax_check_relocs): Remove unused
682         local_got_refcounts usage.  Remove allocation of got slot.
683         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
684         Remove de-allocation of got slot.
685         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
686         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
687         sections to be GC'ed.
688         (elf_vax_instantiate_got_entries): New function.
689         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
690         tests that are now handled by elf_vax_instantiate_got_entries.
691         Assert GOT entry falls within .got section size.  Remove redundant
692         comparisions.  Fix comments.
694 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
696         * reloc.c: Add x86-64 TLS relocs.
697         * bfd-in2.h, libbfd.h: Rebuilt.
698         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
699         relocs.  Add TLS relocs.
700         (x86_64_reloc_map): Add TLS relocs.
701         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
702         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
703         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
704         (elf64_x86_64_hash_entry): Define.
705         (struct elf64_x86_64_obj_tdata): New.
706         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
707         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
708         (link_hash_newfunc): Initialize tls_type.
709         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
710         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
711         (elf64_x86_64_mkobject): New.
712         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
713         (elf64_x86_64_tls_transition): New.
714         (elf64_x86_64_check_relocs): Add r_type variable and use it.
715         Handle TLS relocs.
716         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
717         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
718         (elf64_x86_64_size_dynamic_sections): Likewise.
719         (dtpoff_base, tpoff): New.
720         (elf64_x86_64_relocate_section): Handle TLS relocs.
721         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
722         entries.
723         (bfd_elf64_mkobject): Define.
725         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
726         DF_STATIC_TLS if shared.
728 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
730         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
731         empty relocation sections.
733 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
735         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
736         (ppc64_elf_build_stubs): Build them here instead.
738 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
740         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
741         addend into r_addend, not *r_offset.
742         (elf32_sparc_finish_dynamic_symbol): Likewise.
743         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
744         R_SPARC_RELATIVE's r_offset.
746 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
748         * dwarf2.c (decode_line_info): Update to correctly decode
749         the (non-standard DWARF2) out-of-order address sequences
750         generated by the Intel C++ 6.0 compiler for ia64-Linux.
752 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
754         * config.bfd: For DJGPP targets, match with any cpu and any machine.
756 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
758         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
759         for discarded FDEs.  Remove redundant assignment.
760         * elflink.h (elf_bfd_discard_info): Save edited relocs.
762 2002-09-22  H.J. Lu <hjl@gnu.org>
764         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
765         the relocation count between different .reloc sections.
767 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
769         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
770         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
771         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
772         R_PPC_EMB_RELSDA.
774         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
775         unsigned.  Move "symcount" assignment out of loop.
776         * Makefile.am: Run "make dep-am".
777         * Makefile.in: Regenerate.
778         * configure: Regenerate.
779         * po/SRC-POTFILES.in: Regnerate.
781 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
783         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
784         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
785         (e.g. IRIX64).
787 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
789         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
790         even if generating R_PPC_RELATIVE reloc.
791         (ppc_elf_relocate_section): Make sure relocation is performed
792         if skip == -2.  Clear memory at r_offset when creating dynamic
793         relocation.
795 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
797         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
798         BFD_RELOC_386_TLS_GOTIE): Add.
799         * bfd-in2.h, libbfd.h: Rebuilt.
800         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
801         and R_386_TLS_GOTIE.
802         (elf_i386_reloc_type_lookup): Handle it.
803         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
804         char instead of enum, change GOT_* into defines.
805         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
806         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
807         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
808         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
809         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
810         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
811         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
812         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
813         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
814         tls_type is GOT_TLS_IE_BOTH.
815         (elf_i386_size_dynamic_sections): Likewise.
816         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
817         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
818         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
819         all 4 GOT_TLS_* TLS types.
821 2002-09-19  Nick Clifton  <nickc@redhat.com>
823         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
824         follow indirect links.
826 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
828         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
829         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
830         on 64 bit machines.
831         (ecoff_swap_sym_in) <iss>: Likewise.
832         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
833         ECOFF information: 'ioptMax' refers to the actual *size*
834         of the optimization symtab, not the number of entries.
836 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
838         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
839         ELF_LINK_HASH_NEEDS_PLT logic.
841 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
843         * elfcode.h (elf_slurp_reloc_table_from_section): Check
844         correct relocation count.
846 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
848         * bfd-in.h (bfd_get_dynamic_symcount): Define.
849         * bfd.c (struct _bfd): Add dynsymcount.
850         * bfd-in2.h: Regenerated.
851         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
852         abfd->dynsymcount.
853         * elfcode.h (elf_slurp_reloc_table_from_section): Check
854         for overflow.
856 2002-09-17  Stan Cox <scox@redhat.com>
858         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
859         (mips_elf64_final_gp): Don't make up gp value.
860         * elfn32-mips.c (mips_elf_final_gp): Likewise.
861         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
862         .MIPS.options/.options section.
864 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
866         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
867         It is benign for FreeBSD < 4.1.  Minor reformatting.
868         * elf64-alpha-fbsd.c: Likewise.
870 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
872         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
873         addend.
875 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
877         * elf64-alpha.c (alpha_elf_size_info): Make static.
879 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
881         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
882         * cpu-tic4x.c: Ditto.
884 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
886         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
887         duplicate define.
889 2002-09-16  Bruno Haible  <bruno@clisp.org>
891         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
892         by a target variant implementation.
893         * elf64-alpha.c: Likewise.
894         * elf32-i386-fbsd.c: New file.
895         * elf64-alpha-fbsd.c: New file.
896         * targets.c: Support bfd_elf32_i386_freebsd_vec and
897         bfd_elf64_alpha_freebsd_vec.
898         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
899         bfd_elf64_alpha_freebsd_vec.
900         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
901         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
902         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
903         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
904         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
905         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
906         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
908 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
910         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
911         NULL.
912         (elf_i386_relocate_section): Return false after printing error about
913         unresolvable relocation.
915 2002-09-12  Nick Clifton  <nickc@redhat.com>
917         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
918         R_ARM_THM_PC11.
920 2002-09-11  Jeffrey Law  <law@redhat.com>
922         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
924 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
926         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
927         line_ptr before deciding we've found a symbol.
929 2002-09-11  Nick Clifton  <nickc@redhat.com>
931         * po/da.po: New Danish translation file.
932         * configure.in (LINGUAS): Add 'da'.
933         * configure: Regenerate.
935 2002-09-10  Michael Snyder  <msnyder@redhat.com>
937         * irix-core.c (do_sections, do_sections64): New functions.
938         (irix_core_core_file_p): Call new functions do_sections,
939         do_sections64, depending on corefile (32-bit or 64-bit).
941 2002-09-09  Richard Henderson  <rth@redhat.com>
943         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
944         and PCREL21F like PCREL21B.
946 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
948         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
949         vector.
951 2002-09-02  Nick Clifton  <nickc@redhat.com>
953         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
954         names instead of cryptically overloaded bfd_reloc error
955         codes.
956         (v850_elf_relocate_section): Likewise.
957         (v850_elf_relax_section): Replace caching of external symbols
958         with caching of internal symbols obtained from calling
959         bfd_elf_get_elf_syms().
960         Fixup problems with freeing cached allocated memory blocks.
962 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
964         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
965         (bfd_pj_arch): Use bfd_default_scan.
966         * cpu-v850.c (scan): Remove.
967         (N): Use bfd_default_scan.
968         * cpu-z8k.c (scan_mach): Remove.
969         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
970         first.  Use bfd_default_scan.
972         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
973         bfd_mach constants.
974         (ecoff_get_magic): Likewise.
975         * elf32-v850.c (v850_elf_object_p): Likewise.
976         (v850_elf_final_write_processing): Likewise.
977         * mipsbsd.c (MY(set_arch_mach)): Likewise.
978         (MY(write_object_contents)): Likewise.
979         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
980         * coffcode.h (coff_write_object_contents): Likewise.
981         (coff_set_arch_mach_hook): Add comment describing machine == 0.
982         Remove unnecessary "machine" assignments.
983         (coff_write_relocs): Test for the absolute section sym by testing
984         section and flags.
986         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
987         and bfd_mach_i386_i386_intel_syntax.
988         * pdp11.c (NAME(aout,machine_type)): Likewise.
990 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
992         * bfd-in.h (align_power): Cast constants to bfd_vma type.
993         * bfd-in2.h (align_power): Likewise.
995 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
997         * Makefile.am: Run "make dep-am".
998         * Makefile.in: Regenerate.
1000         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
1001         * cpu-powerpc.c (powerpc_compatible): Likewise.
1002         * cpu-rs6000.c (rs6000_compatible): Likewise.
1004 2002-08-28  Catherine Moore  <clm@redhat.com>
1006         * elf32-v850.c (v850_elf_reloc_map):  Add new relocs.
1007         (v850-elf-reloc): Don't resolve pc relative relocs.
1008         (v850_elf_ignore_reloc): New routine.
1009         (v850_elf_final_link_relocate): Handle new relocs.
1010         (v850_elf_relax_delete_bytes ): New routine.
1011         (v850_elf_relax_section): New routine.
1012         (bfd_elf32_bfd_relax_section): Define.
1013         (HOWTO): New entries for new relocs.
1014         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
1015         (BFD_RELOC_V850_LONGJUMP): New reloc.
1016         (BFD_RELOC_V850_ALIGN): New reloc.
1017         * archures.c: Remove redundant v850ea architecture.
1018         * cpu-v850.c: Remove redundant v850ea support.
1019         * libbfd.h: Regenerate.
1020         * bfd-in2.h: Regenerated.
1022 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
1024         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
1025         * configure.in: Add tic4x_coff vector files.
1026         * configure: Regenerate.
1027         * Makefile.am: Add tic4x target.
1028         * Makefile.in: Regenerate.
1030 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1032         * archures.c: Add the BFD arch type tic4x.
1033         * bfd-in.h: Add BFD_IN_MEMORY flag.
1034         * coff-tic4x.c: New file.
1035         * coffswap.h (coff_swap_sym_out): Add preadjuster.
1036         * cpu-tic4x.c: New file.
1037         * targets.c: Added tic4x- in list of xvecs.
1038         * ticoff.h: New file.
1039         * bfd-in2.h: Regenerate.
1041 2002-08-27  Adam Nemet  <anemet@lnxw.com>
1043         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
1044         bit of DT_INIT and DT_FINI for Thumb functions.
1046 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
1048         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
1050 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
1052         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
1054 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1056         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
1057         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
1058         Likewise.
1059         (struct elf_sh_pcrel_relocs_copied): Removed.
1060         (struct elf_sh_dyn_relocs): New.
1061         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
1062         field with dyn_relocs.
1063         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
1064         sections and sym_sec.
1065         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
1066         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
1067         (sh_elf_create_dynamic_sections): Use create_got_section instead
1068         of _bfd_elf_create_got_section.
1069         (sh_elf_check_relocs): Likewise.
1070         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
1071         sections.
1072         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
1073         sh_elf_relocate_section, sh_elf_check_relocs,
1074         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
1075         Likewise.
1076         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
1077         dynamic relocations and avoiding the copy relocation when we
1078         didn't find any dynamic relocations in the section which has
1079         contents or is read-only.
1080         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1081         (sh_elf_size_dynamic_sections): Don't reset the size of
1082         .rela.got section even if dynamic_sections_created flag is off.
1083         Don't use sh_elf_discard_copies. Scan all input bfd and use
1084         allocate_dynrelocs. Call readonly_dynrelocs to determine
1085         whether we need DT_TEXTREL.
1086         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
1087         whether the symbol was never referred to.
1088         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
1089         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
1090         (sh_elf_check_relocs): Call create_got_section if the short-cut
1091         to .got is null. Increment reference counters only instead of
1092         allocating space on dynamic sections here. Don't conditionalize
1093         uninitialized got.offset value when marking the symbol as a
1094         global offset table entry. Keep relocations for symbols satisfied
1095         by a dynamic library to avoid copy relocations for the symbol.
1096         Set dynobj field of an elf hash table if needed.
1097         (sh_elf_finish_dynamic_sections): Handle null section pointer
1098         correctly.
1099         (elf_backend_copy_indirect_symbol): Defined.
1100         (elf_backend_can_refcount): Defined.
1102 2002-08-23  Nick Clifton  <nickc@redhat.com>
1104         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
1105         previous change.  Add comment explaining why.
1107 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
1109         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
1110         contents of .got.plt[2] to tr0, not address of .got.plt.
1111         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
1112         patching absolute plt entry. For shmedia plt entry, set bottom bit
1113         of branch to plt0 as this is a branch to an shmedia instruction.
1114         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
1115         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
1116         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
1117         branch to plt0.
1118         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
1119         patching absolute plt entry. For shmedia plt entry, branch to
1120         plt0 is now ptrel, so use relative offset.  Set bottom bit of
1121         branch target as it is a branch to an shmedia instruction.
1123 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
1124             Richard Shann <richard.shann@superh.com>
1126         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
1127         value if .init is an SHmedia function.  Similarly for DT_FINI.
1128         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
1130 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
1132         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
1133         dynamic section.
1134         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1136 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
1138         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
1139         byte read when reading the return address register column.
1141 2002-08-22  Nick Clifton  <nickc@redhat.com>
1143         * config.bfd: Add powepc64-*-*bsd* target.
1145 2002-08-22  Graeme Peterson  <gp@qnx.com>
1147         * Makefile.am: Add entries for elf32-shqnx.c
1148         * Makefile.in: Regenerate.
1149         * config.bfd: Add support sh-*-nto* target.
1150         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
1151         * configure: Regenerate.
1152         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
1153         * elf32-sh.c: Do not include elf32-target.h if
1154         ELF32_SH_C_INCLUDED is defined.
1155         * elf32-shqnx.c: New file: Support for QNX.
1156         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
1158 2002-08-22  Nick Clifton  <nickc@redhat.com>
1160         * po/tr.po: Updated Turkish translation.
1162         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
1163         symbols are not read.
1165 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1167         * elf32-m68hc11.c: Formatting fixes.
1168         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
1169         * elf32-m68hc12.c: Formatting fixes.
1170         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
1172 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1174         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
1175         SEC_DATA.
1176         (pmac_xcoff_vec): Likewise.
1177         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1178         (aix5coff64_vec): Likewise.
1180 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1182         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
1183         param to elf_backend_copy_indirect_symbol.
1184         (_bfd_elf_link_hash_copy_indirect): Likewise.
1185         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
1186         calls to copy_indirect_symbol.
1187         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1188         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1189         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1190         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1191         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1192         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
1193         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1194         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1195         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1196         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
1197         test refcounts for "used" values.
1199 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1201         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
1202         argument declaration.
1204 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
1206         * archures.c (bfd_mach_ppc_e500): Added.
1207         * bfd-in2.h: Rebuilt.
1208         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
1210 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
1212         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
1214 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
1216         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
1217         `bfd_byte'.
1219 2002-08-17  Stan Cox  <scox@redhat.com>
1221         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
1222         IRIX 6 segment layout for NEWABI.
1224 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
1226         * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
1227         symbols when looking for section referred to by a relocation.
1228         * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
1230 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
1232         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
1234 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
1236         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
1237         missing check for whether the symbol is referenced by DSO before
1238         unexporting it as an unneeded dynamic symbol.
1240 2002-08-14  H.J. Lu <hjl@gnu.org>
1242         * libbfd.h: Regenerate.
1244 2002-08-14  H.J. Lu <hjl@gnu.org>
1246         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
1248 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
1250         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
1251         instructions.
1252         (m68hc11_direct_relax): New to define table of relaxable instructions.
1253         (find_relaxable_insn): New, find a relaxable insn.
1254         (compare_reloc): New to compare two relocs.
1255         (m68hc11_elf_relax_section): New, relax text sections.
1256         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
1257         (elf32_m68hc11_check_relocs): New function for GC support.
1258         (elf32_m68hc11_relocate_section): New function for GC support.
1259         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
1260         (elf_backend_check_relocs): Likewise.
1261         (elf_backend_relocate_section): Likewise.
1263 2002-08-13  H.J. Lu <hjl@gnu.org>
1265         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
1266         definitions in shared objects when checking symbol with
1267         undefined version.
1269 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1271         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
1272         (elf32_m68hc11_gc_sweep_hook): Likewise.
1273         (elf_backend_gc_mark_hook): Define for GC section support.
1274         (elf_backend_gc_sweep_hook): Likewise.
1275         (elf_backend_can_gc_sections): Likewise.
1277         * elf32-m68hc12.c: Likewise.
1279 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1281         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
1282         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
1283         (_bfd_m68hc11_elf_set_private_flags): New function.
1284         Use them to set/check/print ELF flags specific to 68HC11.
1286         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
1287         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
1288         (_bfd_m68hc12_elf_set_private_flags): New function.
1289         Use them to set/check/print ELF flags specific to 68HC12.
1291 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1293         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
1294         fix masks for PC-rel relocs.
1295         (m68hc11_elf_ignore_reloc): New function.
1297         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
1298         68HC12 banked addressing relocs.
1299         (m68hc12_phys_addr): New to compute physical address of banked memory.
1300         (m68hc12_phys_page): Likewise for page.
1301         (m68hc12_addr_is_banked): New to see if address is in banked area.
1302         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
1304 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1306         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
1307         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
1308         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
1309         * bfd-in2.h: Regenerate.
1311 2002-08-12  H.J. Lu <hjl@gnu.org>
1313         * elflink.h (elf_add_default_symbol): Preserve section across
1314         elf_merge_symbol.
1316 2002-08-09  Graeme Peterson  <gp@qnx.com>
1318         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
1319         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
1320         * Makefile.in: Regenerate.
1321         * config.bfd: Add support for powerpc{le}-*-nto targets.
1322         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
1323         * configure: Regenerate.
1324         * elf32-i386qnx.c: Moved backend functions into a QNX specific
1325         common file "elf32-qnx.h", and now include that file.
1326         * elf32-qnx.h: New file: QNX specific common elf backend.
1327         * elf32-ppc.c: Do not include elf32-target.h if
1328         ELF32_PPC_C_INCLUDED is defined.
1329         * elf32-ppcqnx.c: New file: Support for QNX.
1330         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
1331         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
1333 2002-08-09  Nick Clifton  <nickc@redhat.com>
1335         * po/sv.po: Updated Swedish translation.
1337 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1339         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
1340         g->global_gotsym is NULL.
1342 2002-08-08  H.J. Lu <hjl@gnu.org>
1344         * elflink.h (elf_add_default_symbol): Don't warn if a definition
1345         overrides an indirect versioned symbol.
1347 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
1349         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1350         for R_386_TLS_TPOFF32 relocs against symndx 0.
1352 2002-08-07  H.J. Lu <hjl@gnu.org>
1354         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
1355         with undefined version if needed.
1356         (elf_link_assign_sym_version): Match a default symbol with a
1357         version without definition. No need to hide the default
1358         definition separately.
1360 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
1362         * elflink.h (elf_link_output_extsym): Don't output symbols from
1363         SEC_EXCLUDE sections.
1365         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
1367 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
1369         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
1370         entries.
1372 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1374         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
1375         mismatch.
1377 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1379         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
1381 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1383         * elf32-mips.c (mips_reloc_map): Fix typo.
1385 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1387         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
1389 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1391         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
1393 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1395         * libxcoff.h: Use PARAMS on function declarations.
1396         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
1397         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1399         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
1400         addend.
1401         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
1403 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1405         * coff-rs6000.c: Formatting fixes.
1406         (xcoff_calculate_relocation): Use PARAMS in declaration.
1407         (xcoff_complain_overflow): Likewise.
1408         (xcoff_ppc_relocate_section): Use old-style function pointer call.
1409         (bfd_xcoff_backend_data): Remove useless comments.
1410         (rs6000coff_vec): Likewise.
1411         (bfd_pmac_xcoff_backend_data): Likewise.
1412         (pmac_xcoff_vec): Likewise.
1414         * coff64-rs6000.c: Formatting fixes.
1415         (xcoff64_calculate_relocation): Use PARAMS in declaration.
1416         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
1417         (bfd_xcoff_backend_data): Remove useless comments.
1418         (rs6000coff64_vec): Likewise.
1419         (bfd_xcoff_aix5_backend_data): Likewise.
1420         (aix5coff64_vec): Likewise.
1422 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1424         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
1425         mask entries.  Use complain_overflow_dont for R_REF.
1426         (xcoff_reloc_type_ba): Revert last change.
1427         (xcoff_reloc_type_br): Likewise.
1428         (xcoff_reloc_type_crel): Likewise.
1429         (xcoff_ppc_relocate_section): Likewise.
1430         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
1431         (xcoff64_ppc_relocate_section): Likewise.
1432         (xcoff64_howto_table): Revert some of last change to mask entries.
1433         Use complain_overflow_dont for R_REF.
1435         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
1436         relocs with bitsize == 16 have size = 1.
1437         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
1438         (xcoff_reloc_type_br): Likewise.
1439         (xcoff_reloc_type_crel): Likewise.
1440         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1441         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
1442         dst_mask adjustment.
1443         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1444         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
1445         bitsize == 16 have size = 1.
1447 2002-08-01  Denis Chertykov  <denisc@overta.ru>
1449         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
1450         (struct misc): New field isymbuf. All free_* fields removed.
1451         (symbol_value): Pass in internal syms. No need to swap syms in.
1452         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
1453         possibly cached info.
1454         (tidyup_after_error): Removed.
1455         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
1456         misc. Use new field.
1457         (adjust_all_relocations): Use internal syms. No need to swap syms
1458         in and out.
1459         (add_page_insn): Don't use removed fields of struct misc.
1461 2002-08-01  Nick Clifton  <nickc@redhat.com>
1463         * elf32-arm.h: Revert previous delta.
1465 2002-08-01  Nick Clifton  <nickc@redhat.com>
1467         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
1468         * configure: Regenerate.
1470 2002-07-31  H.J. Lu <hjl@gnu.org>
1472         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
1473         selected.
1475 2002-07-31  H.J. Lu <hjl@gnu.org>
1477         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
1478         is selected.
1480 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
1482         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
1483         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
1485 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
1487         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
1488         There is no 8 byte relocation type for this architecture.
1489         (do_ns32k_reloc): Use bfd_vma instead of native types.
1490         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
1491         returns void.
1492         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
1493         rely on generic code to do that.
1494         * aout-ns32k.c (howto_table): Add appropriate overflow detection
1495         to all table entries.
1496         (_bfd_ns32k_relocate_contents): put_data returns void.
1497         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
1498         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
1499         return void.
1501 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
1503         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1504         archive object is target dependant.
1506 2002-07-31  Adam Nemet  <anemet@lnxw.com>
1508         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1509         (THUMB_PLT_ENTRY_SIZE): New macro.
1510         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1511         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1512         ARM_PLT_ENTRY_SIZE.
1513         (elf32_arm_plt_entry): Likewise.
1514         (elf_backend_plt_header_size): Likewise.
1515         (elf32_thumb_plt0_entry): New global.
1516         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
1517         into .plt.thumb.
1518         (elf32_thumb_plt_entry): New global.
1519         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
1520         Thumb entries.  Set the bottom bit of the corresponding GOT entry
1521         for a Thumb PLT entry.
1522         (struct elf32_arm_plt_entry_info): New structure.
1523         (struct elf32_arm_link_hash_entry, plt_info): New member of this
1524         type.
1525         (elf32_arm_link_hash_newfunc): Initialize new member.
1526         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
1527         relocations against the PLT.
1528         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
1529         first_rel_type if this is the first time we encounter the symbol.
1530         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
1531         Determine if relocation needs a PLT entry.  Set first_rel_type if
1532         this is the first time we encounter the symbol
1533         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
1534         functions as well.
1535         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
1536         (elf32_arm_create_dynamic_sections): New function.  Create the
1537         .plt.thumb section.
1538         (elf_backend_create_dynamic_sections): Call it.
1540 2002-07-31  Nick Clifton  <nickc@redhat.com>
1542         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
1543         'alternative' in order to avoid shadowing global symbol of the
1544         same name.
1545         * bfd-in2.h: Regenerate.
1546         * libbfd.h: Regenerate.
1547         * libcoff.h: Regenerate.
1549 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1551         * Makefile.am: Add n32 ABI support.
1552         * Makefile.in: Regenerate.
1553         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
1554         bit vectors for mips*-*-linux targets as optional.
1555         * configure.in: Add n32 ABI vectors.
1556         * configure: Regenerate.
1557         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
1558         * elfn32-mips.c: New file, n32 ABI support.
1559         * targets.c: Add n32 ABI vectors.
1561 2002-07-30  Graeme Peterson  <gp@qnx.com>
1563         * elfarmqnx-nabi.c: New file: Support for QNX.
1564         * config.bfd: Add support for arm-*-nto target.
1565         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
1566         * configure: Regenerate.
1567         * Makefile.am: Add entries for elfarmqnx-nabi.c.
1568         * Makefile.in: Regenerate.
1569         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
1570         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
1571         * elfarm-nabi.c: Do not include elf32-arm.h if
1572         ELFARM_NABI_C_INCLUDED is defined.
1573         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
1575 2002-07-30  Nick Clifton  <nickc@redhat.com>
1577         * po/sv.po: Updated Swedish translation.
1579 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
1581         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
1583 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
1585         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
1586         * archive.c (bfd_generic_archive_p): Likewise.
1587         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
1588         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
1589         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1590         (xcoff64_archive_p): Likewise.
1591         (xcoff64_openr_next_archived_file): Likewise.
1592         (xcoff64_archive_p): Clean up tdata properly on error.
1593         * coffgen.c (coff_real_object_p): Likewise.
1594         (coff_object_p): Release filehdr and opthdr.
1595         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
1596         * ieee.c (ieee_archive_p): Likewise.
1597         * ihex.c (ihex_object_p): Likewise.
1598         (ihex_mkobject): Always allocate tdata.
1599         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
1600         * srec.c (srec_mkobject): Always allocate tdata.
1601         (srec_object_p): Clean up tdata properly on error.
1602         (symbolsrec_object_p): Likewise.
1603         * versados.c (versados_object_p): Likewise.
1604         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
1605         and bfd_realloc instead of realloc.
1606         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
1607         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
1608         place of bfd_malloc, simplifying error freeing.  Free hash table too.
1609         (vms_object_p): Clean up tdata on error.
1610         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
1611         (vms_close_and_cleanup): Adjust for bfd_alloc use.
1613 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
1615         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
1617 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
1619         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
1620         flags into resulting BFD.
1622 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
1624         From John Reiser <jreiser@BitWagon.com>
1625         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
1626         tls_ldm_got.refcount.
1628 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1630         * elf64-mips.c: Update TODO comment.
1631         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
1632         mips_elf64_gprel16_reloca): Remove prototypes.
1633         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
1634         (UNUSED_RELOC): Replace by EMPTY_RELOC.
1635         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
1636         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
1637         R_MIPS_HIGHEST.
1638         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
1639         R_MIPS_GOT16. Remove wrong comments.
1640         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
1641         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
1642         from elf32-mips.c.
1643         (mips_elf64_hi16_reloc): Fix formatting.
1644         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
1645         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
1646         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
1647         (mips_elf64_gprel16_reloc): Make static. Add check for
1648         partial_inplace.
1649         (mips_elf64_gprel16_reloca): Remove.
1650         (mips_elf64_literal_reloc): New function.
1651         (mips_elf64_gprel32_reloc): Fix formatting.
1652         (mips_elf64_shift6_reloc): Fix comment. Make static.
1653         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
1654         elf32-mips.c.
1655         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
1656         elf32-mips.c
1657         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
1658         specific relocations.
1659         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
1660         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
1661         (ELF_MAXPAGESIZE): Add comment.
1663 2002-07-25  Nick Clifton  <nickc@redhat.com>
1665         * po/sv.po: Updated Swedish translation.
1666         * po/es.po: Updated Spanish translation.
1667         * po/fr.po: Updated French translation.
1669 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
1671         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
1672         as elf_link_record_local_dynamic_symbol.
1673         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
1674         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
1675         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
1676         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
1677         attempt is made to record a symbol in a discarded section, and
1678         return `2' in that case.
1680 2002-07-24  Nick Clifton  <nickc@redhat.com>
1682         * po/sv.po: Updated Swedish translation.
1683         * po/es.po: Updated Spanish translation.
1685 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
1687         * po/SRC-POTFILES.in: Regenerate.
1689         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
1690         immediately.  Remove code handling relocatable linking.
1691         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1692         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1693         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
1694         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1695         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1696         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1697         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1698         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1699         * elf32-v850.c (v850_elf_relocate_section): Likewise.
1700         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1701         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1702         * elf32-avr.c (elf_backend_rela_normal): Define.
1703         * elf32-cris.c: Likewise.
1704         * elf32-fr30.c: Likewise.
1705         * elf32-frv.c: Likewise.
1706         * elf32-h8300.c: Likewise.
1707         * elf32-hppa.c: Likewise.
1708         * elf32-ip2k.c: Likewise.
1709         * elf32-sparc.c: Likewise.
1710         * elf32-v850.c: Likewise.
1711         * elf32-vax.c: Likewise.
1712         * elf64-hppa.c: Likewise.
1713         * elf64-sparc.c: Likewise.
1714         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
1715         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1716         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1717         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1718         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1719         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1720         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1721         * elf-m10200.c (USE_RELA): Don't define.
1722         * elf-m10300.c: Likewise.
1723         * elfarm-oabi.c: Likewise.
1724         * elf32-i370.c: Likewise.
1725         * elf32-ip2k.c: Likewise.
1726         * elf32-m68k.c: Likewise.
1727         * elf32-mcore.c: Likewise.
1728         * elf32-ppc.c: Likewise.
1729         * elf32-s390.c: Likewise.
1730         * elf32-vax.c: Likewise.
1731         * elf64-ppc.c: Likewise.
1732         * elf64-s390.c: Likewise.
1733         * elf64-x86-64.c: Likewise.
1734         * elfxx-ia64.c: Likewise.
1735         * elf32-avr.c (USE_REL): Don't undef.
1736         * elf32-ip2k.c: Likewise.
1738 2002-07-23  Nick Clifton  <nickc@redhat.com>
1740         * elf-bfd.h (struct elf_backend_data): Add new bitfield
1741         'want_p_paddr_set_to_zero'.
1742         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
1743         to false;
1744         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
1745         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
1747 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
1749         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
1750         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
1751         show the Copyright string.
1752         Minor formatting tidy ups.
1754 2002-07-23  Nick Clifton  <nickc@redhat.com>
1756         * po/fr.po: Updated French translation.
1757         * po/sv.po: Updated Swedish translation.
1759 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
1761         * elflink.h (elf_link_input_bfd): Don't change internal symbols
1762         when outputting relocs.
1764 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
1766         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
1767         DT_PLTGOT into the dynamic section if there is a PLT.
1769 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1771         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
1772         elf32-mips.c.
1773         (_bfd_mips_elf_write_section): Likewise.
1774         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
1775         (_bfd_mips_elf_write_section): Likewise.
1776         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
1777         (elf32_mips_write_section): Likewise.
1778         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
1779         (_bfd_mips_elf_write_section): Likewise.
1781 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
1783         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
1784         PT_IA_64_UNWIND segments for a given section.
1786 2002-07-17  H.J. Lu <hjl@gnu.org>
1788         * Makefile.am: Fix a typo.
1789         * Makefile.in: Regenerate.
1791 2002-07-15  Denis Chertykov  <denisc@overta.ru>
1792             Frank Ch. Eigler  <fche@redhat.com>
1793             Ben Elliston  <bje@redhat.com>
1794             Alan Lehotsky  <alehotsky@cygnus.com>
1795             John Healy  <jhealy@redhat.com>
1796             Graham Stott  <grahams@redhat.com>
1797             Jeff Johnston  <jjohnstn@redhat.com>
1799         * Makefile.am: Add support for ip2k.
1800         * Makefile.in: Regenerate.
1801         * doc/Makefile.in: Regenerate.
1802         * archures.c: Add support for ip2k.
1803         * config.bfd: Add support for ip2k.
1804         * configure.in: Add support for ip2k.
1805         * configure: Regenerate.
1806         * reloc.c: Add support for ip2k.
1807         * targets.c: Add support for ip2k.
1808         * bfd-in2.h: Regenerate.
1809         * libbfd.h: Regenerate.
1810         * cpu-ip2k.c: New file.
1811         * elf32-ip2k.c: New file.
1813 2002-07-17  Ian Rickards  <irickard@arm.com>
1815         * dwarf2.c (concat_filename): If we can't establish the directory
1816         just return the filename.
1818 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
1820         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
1822 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
1824         * elflink.h: Formatting fixes, tidy prototypes.
1825         (elf_link_assign_sym_version): Move common code out of loop.
1827 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
1829         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
1830         reloc section size is zero.  Correct reloc output location.
1832 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1834         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
1835         the final type for the e_fsel selector when generating PA2.0W code.
1836         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
1837         relocations.
1839 2002-07-14  H.J. Lu <hjl@gnu.org>
1841         * elflink.h (elf_link_assign_sym_version): Hide the default
1842         definition if there is a hidden versioned definition.
1844 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
1846         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
1847         dynamic reference test in assertion when initializing GOT with
1848         static contents.  Just assert that there are either no dynamic
1849         sections, the symbol is defined in the regular objects or that the
1850         symbol is undef weak.  Tweak comment.
1851         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
1852         only if the symbol isn't defined in the program and isn't undef
1853         weak.
1854         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
1855         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
1856         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
1857         (elf_cris_discard_excess_program_dynamics): Don't consider
1858         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
1860 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
1862         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
1863         unresolved debugging relocs in dynamic applications.
1864         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1865         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1866         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1867         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1868         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1869         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1871 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
1873         * elf64-ppc.c (ONES): Define.
1874         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
1875         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
1876         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
1878         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
1879         (ppc64_elf_set_private_flags): Delete.
1880         (ppc64_elf_section_from_shdr): Delete.
1881         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
1882         (ppc64_elf_fake_sections): Delete.
1883         (bfd_elf64_bfd_set_private_flags): Don't define.
1884         (bfd_elf64_get_symbol_info): Likewise.
1885         (elf_backend_section_from_shdr): Likewise.
1886         (elf_backend_fake_sections): Likewise.
1888 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
1890         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
1891         when not already set.
1892         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
1893         (elf_backend_fake_sections): Define.
1895 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
1897         * merge.c (_bfd_merge_section): Remove redundant output_section check.
1898         Formatting.
1899         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
1901 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
1903         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
1904         NULL sym_hashes to just before use.
1905         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
1906         symbol with non-default visibility.
1907         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
1908         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1909         Ditto.
1910         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
1911         symbol with non-default visibility.
1912         (cris_elf_check_relocs): At tests for local symbol before
1913         increasing h->plt.refcount, also check for non-default
1914         visibility.  Ditto when checking for local symbol to eliminate
1915         pc-relative runtime relocs.
1917 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
1919         * elf.c: Formatting.
1920         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
1921         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
1922         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
1923         segments.
1925 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
1926             Alan Modra  <amodra@bigpond.net.au>
1928         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
1929         account the impact of relocation count overflow when computing
1930         section offsets.
1931         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
1932         or not to apply the PE COFF reloc overflow handling.  Fix a
1933         fencepost error in deciding whether or not to use that technique.
1935 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
1937         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
1938         change type of locsyms.
1939         (bfd_elf_get_elf_syms): Declare.
1940         * elf.c (bfd_elf_get_elf_syms): New function.
1941         (group_signature): Use bfd_elf_get_elf_syms.
1942         (bfd_section_from_r_symndx): Likewise.
1943         * elfcode.h (elf_slurp_symbol_table): Likewise.
1944         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1945         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
1946         locality of various data structures.  Properly free internal relocs.
1947         (elf_bfd_final_link): Properly free internal relocs.
1948         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
1949         (elf_link_input_bfd): Likewise.
1950         (elf_gc_mark): Likewise.  Properly free internal relocs.
1951         (elf_gc_sweep): Properly free internal relocs.
1952         (elf_reloc_symbol_deleted_p): No need to swap syms in.
1953         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
1954         internal relocs.
1955         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
1956         Properly free possibly cached info.
1957         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
1958         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
1959         symbol swapping code.
1960         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
1961         Properly free possibly cached info.
1962         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
1963         (mn10300_elf_relax_delete_bytes): Likewise.
1964         (mn10300_elf_symbol_address_p): Likewise.
1965         (mn10300_elf_get_relocated_section_contents): Likewise.
1966         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
1967         (elf32_h8_relax_delete_bytes): Likewise.
1968         (elf32_h8_symbol_address_p): Likewise.
1969         (elf32_h8_get_relocated_section_contents): Likewise.
1970         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
1971         (m32r_elf_relax_delete_bytes): Likewise.
1972         (m32r_elf_get_relocated_section_contents): Likewise.
1973         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
1974         elf_section_data to determine whether cached.
1975         (sh_elf_relax_section): As above for elf-m10200.c.
1976         (sh_elf_relax_delete_bytes): Likewise.
1977         (sh_elf_get_relocated_section_contents): Likewise.
1978         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
1979         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
1980         reading of local syms.
1981         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1982         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
1983         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
1984         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
1985         relocs.
1986         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
1987         free internal relocs and section contents.  Don't read symbols.
1988         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
1989         (elf32_hppa_size_stubs): Don't free local syms.
1990         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
1991         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
1992         possibly cached info.
1993         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1994         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
1995         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
1996         all_local_syms.
1997         (get_local_syms): Delete function.
1998         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
1999         on exit.
2000         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
2002 2002-07-05  Jim Wilson  <wilson@redhat.com>
2004         * syms.c (decode_section_type): New.
2005         (bfd_decode_symclass): Call decode_section_type.
2007 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
2009         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
2010         section content start.
2011         Reported by Michael Schumacher <mike@hightec-rt.com>.
2013 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
2015         * section.c (_bfd_strip_section_from_output):  Remove unnecessary
2016         link order code.  Don't actually remove the output section here;
2017         Just set a flag for the linker to do so.
2018         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
2019         sections when setting up output section dynsyms.
2021 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
2023         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
2024         fudge.
2025         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
2026         libs here instead.
2028 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2030         * elf64-s390.c (create_got_section): Set .got section alignment to
2031         8 bytes.
2032         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
2034 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
2036         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
2038 2002-07-01  Matt Thomas  <matt@3am-software.com>
2040         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
2041         to EF_VAX_*.
2043 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2045         * elfxx-mips.c (ABI_64_P): Fix comment.
2046         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
2047         new section names for N64 ABI.
2048         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
2049         (mips_elf_calculate_relocation): Code formatting.
2050         (mips_elf_create_dynamic_relocation): Likewise.
2051         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
2052         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
2053         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
2054         in any NewABI.
2055         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
2056         for NewABI.
2057         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
2058         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
2059         here, too.
2061 2002-07-01  Andreas Schwab  <schwab@suse.de>
2063         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
2064         R_X86_64_64 to R_X86_64_RELATIVE.
2066 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2068         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
2069         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
2070         Run "make dep-am".
2071         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
2072         host_aout_vec.
2073         * configure.in (vaxbsd_vec): Add.
2074         * targets.c (vaxbsd_vec): Add.
2075         * Makefile.in: Rebuild.
2076         * configure: Rebuild.
2077         * po/SRC-POTFILES.in: Rebuild.
2079 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
2081         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
2082         examining to gc_mark_hook, rather than the bfd.
2083         (elf_gc_sections): Adjust.
2084         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
2085         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
2086         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
2087         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
2088         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
2089         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
2090         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
2091         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
2092         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
2093         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
2094         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
2095         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
2096         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
2097         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
2098         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
2099         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
2100         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
2101         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
2102         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
2103         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
2104         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
2105         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2106         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
2107         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2108         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
2109         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
2110         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
2111         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
2112         redundant local sym tests.
2113         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
2114         (link_hash_newfunc): Init is_entry.
2115         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
2116         (ppc64_elf_link_hash_table_create): Init all_local_syms.
2117         (create_linkage_sections): Use bfd_make_section_anyway rather than
2118         bfd_make_section.
2119         (ppc64_elf_mark_entry_syms): New function.
2120         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
2121         up opd entry to function section map.
2122         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
2123         relocs that reference the opd section.
2124         (edit_opd): New function.
2125         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
2126         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
2127         (get_local_syms): Do so here.  Exit if we already have local syms.
2128         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
2129         read local syms on non-ELF input.
2130         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
2131         than duplicating it's function here.  Adjust free of internal
2132         relocs to suit.
2133         (ppc64_elf_relocate_section): Adjust local syms in opd section.
2134         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
2135         * elf32-hppa.c (elf32_hppa_size_stubs): Call
2136         _bfd_elf32_link_read_relocs rather than duplicating it's function
2137         here.  Adjust free of internal relocs to suit.
2139 2002-07-01  Andreas Jaeger  <aj@suse.de>
2141         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
2142         are not allowed in shared libs code, enforce -fPIC.
2144 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
2146         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
2147         trailing zero-sequences when there's previous left-over data.
2149 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2151         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
2152         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
2153         and opd_rel_sec in order for starting rela section.  Check _raw_size.
2154         (elf_backend_reloc_type_class): Define.
2156 2002-06-27  Kevin Buettner <kevinb@redhat.com>
2158         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
2159         DWARF2 formats.
2161 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
2163         * cpu-powerpc.c: Comment on ordering of arch_info.
2164         * elf32-ppc.c (ppc_elf_object_p): New function.
2165         (elf_backend_object_p): Define.
2166         * elf64-ppc.c (ppc64_elf_object_p): New function.
2167         (elf_backend_object_p): Define.
2169 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
2171         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
2172         * configure: Regenerate.
2174 2002-06-25  Jason Eckhardt  <jle@rice.edu>
2176         * dwarf2.c (decode_line_info): Check unit->addr_size
2177         to read in the proper number of prologue bytes.
2179 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
2181         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
2182         aix5coff64_vec if 64-bit bfd support has been enabled.
2183         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
2184         been enabled.
2186         * targets.c (_bfd_target_vector[]): Only include
2187         aix5coff64_vec if 64-bit bfd support has been enabled.
2189 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2191         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
2192         * elf32-hppa.c (hppa_add_stub): Likewise.
2193         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2194         * elflink.h (elf_add_default_symbol): Fix comment typo.
2195         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
2196         (elf_link_add_object_symbols): Likewise.
2197         (elf_link_assign_sym_version): Likewise.
2198         * hash.c (bfd_hash_lookup): Likewise.
2199         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2200         * section.c (bfd_get_unique_section_name): Likewise.
2201         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2202         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
2203         (assign_section_numbers): Likewise.
2204         (_bfd_elfcore_make_pseudosection): Likewise.
2205         (elfcore_grok_lwpstatus): Likewise.
2206         (elfcore_grok_win32pstatus): Likewise.
2207         (elfcore_write_note): Constify input params.  Use PTR instead of
2208         void *.  Include terminating NUL in namesz.  Correct padding.
2209         Support NULL "name" param.  Use memcpy instead of strcpy.
2210         (elfcore_write_prpsinfo): Constify input params.
2211         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
2212         (elfcore_write_lwpstatus): Likewise.
2213         (elfcore_write_pstatus): Likewise.
2214         (elfcore_write_prfpreg): Likewise.
2215         (elfcore_write_prxfpreg): Likewise.
2216         * elf-bfd.h (elfcore_write_note): Update declaration.
2217         (elfcore_write_prpsinfo): Likewise.
2218         (elfcore_write_prstatus): Likewise.
2219         (elfcore_write_pstatus): Likewise.
2220         (elfcore_write_prfpreg): Likewise.
2221         (elfcore_write_prxfpreg): Likewise.
2222         (elfcore_write_lwpstatus): Likewise.
2224 2002-06-25  Jason Eckhardt  <jle@rice.edu>
2226         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
2227         symbols of type stProc and stStaticProc.
2229 2002-06-25  Nick Clifton  <nickc@redhat.com>
2231         * ecoff.c: VArious formatting fixes.
2233 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2235         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
2237 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2239         * aout-adobe.c: Don't compare against "true" or "false.
2240         * aout-target.h: Likewise.
2241         * aoutx.h: Likewise.
2242         * archive.c: Likewise.
2243         * bout.c: Likewise.
2244         * cache.c: Likewise.
2245         * coff-a29k.c: Likewise.
2246         * coff-alpha.c: Likewise.
2247         * coff-i386.c: Likewise.
2248         * coff-mips.c: Likewise.
2249         * coff-or32.c: Likewise.
2250         * coff64-rs6000.c: Likewise.
2251         * coffcode.h: Likewise.
2252         * coffgen.c: Likewise.
2253         * cpu-ns32k.c: Likewise.
2254         * ecoff.c: Likewise.
2255         * ecofflink.c: Likewise.
2256         * elf.c: Likewise.
2257         * elf32-arm.h: Likewise.
2258         * elf32-cris.c: Likewise.
2259         * elf32-d30v.c: Likewise.
2260         * elf32-i386.c: Likewise.
2261         * elf32-mcore.c: Likewise.
2262         * elf32-ppc.c: Likewise.
2263         * elf32-sh.c: Likewise.
2264         * elf32-sh64.c: Likewise.
2265         * elf32-v850.c: Likewise.
2266         * elf64-alpha.c: Likewise.
2267         * elf64-sh64.c: Likewise.
2268         * elfcode.h: Likewise.
2269         * elfcore.h: Likewise.
2270         * elflink.h: Likewise.
2271         * elfxx-mips.c: Likewise.
2272         * i386os9k.c: Likewise.
2273         * ieee.c: Likewise.
2274         * libbfd.c: Likewise.
2275         * linker.c: Likewise.
2276         * mmo.c: Likewise.
2277         * nlm32-alpha.c: Likewise.
2278         * nlm32-i386.c: Likewise.
2279         * nlm32-ppc.c: Likewise.
2280         * nlm32-sparc.c: Likewise.
2281         * nlmcode.h: Likewise.
2282         * oasys.c: Likewise.
2283         * pdp11.c: Likewise.
2284         * peicode.h: Likewise.
2285         * reloc.c: Likewise.
2286         * som.c: Likewise.
2287         * srec.c: Likewise.
2288         * tekhex.c: Likewise.
2289         * vms.c: Likewise.
2290         * xcofflink.c: Likewise.
2291         * elf64-sparc.c: Edit comment to not use "== false".
2293         * aoutf1.h: Don't use "? true : false".
2294         * ecoff.c: Likewise.
2295         * format.c: Likewise.
2296         * ieee.c: Likewise.
2297         * linker.c: Likewise.
2298         * mmo.c: Likewise.
2299         * oasys.c: Likewise.
2301 2002-06-23  H.J. Lu  <hjl@gnu.org>
2303         * elflink.h (elf_link_add_archive_symbols): For the default
2304         version, check references with only one `@' first.
2306 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2308         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
2309         function.
2310         (allocate_global_data_dlt):  Don't add millicode symbols to dynamic
2311         symbol table.
2312         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
2313         (elf64_hppa_size_dynamic_sections): Revise to use
2314         elf64_hppa_mark_milli_and_exported_functions.
2315         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
2316         symbols out of dynamic symbol table.
2318 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
2320         * Makefile.in: Regenerate.
2321         * libbfd.h: Regenerate.
2322         * bfd-in2.h: Regenerate.
2323         * configure: Regenerate.
2324         * po/SRC-POTFILES.in: Regenerate.
2326         * elflink.h: Comment typo fixes.
2328 2002-06-23  H.J. Lu  <hjl@gnu.org>
2330         * elf-bfd.h (elf_link_loaded_list): New structure.
2331         (elf_link_hash_table): Add "loaded".
2332         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
2333         * elflink.h (elf_link_check_versioned_symbol): New function.
2334         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
2336 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
2338         * elflink.h (size_dynamic_sections): If the target does not
2339         support an ELF style hash table, return true, indicating that
2340         nothing needed to be done, rather than false, indicating that the
2341         section's size could not be computed.
2343 2002-06-18  Dave Brolley  <brolley@redhat.com>
2345         From Catherine Moore, Michael Meissner, Dave Brolley:
2346         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
2347         * targets.c: Support bfd_elf32_frv_vec.
2348         * reloc.c: Add FRV relocs.
2349         * configure.in: Add support for bfd-elf32-frv-vec.
2350         * config.bfd (targ_cpu): Add support for frv-*-elf.
2351         * archures.c: Add frv arch and machines.
2352         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
2353         (ALL_MACHINES_CFILES): Add cpu-frv.c.
2354         (BFD32_BACKENDS): Add elf32-frv.lo.
2355         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
2356         (cpu-frv.lo): New target.
2357         (elf32-frv.lo): New target.
2358         * cpu-frv.c: New file.
2359         * elf32-frv.c: New file.
2361 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
2363         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
2364         e_shnum == 0.
2365         Only read the first section header if e_shoff is non-zero.
2366         Don't consider e_shstrndx if there are no sections.
2368 2002-06-17  Tom Rix <trix@redhat.com>
2370         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
2371         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
2372         complain_overflow_bitfield.
2374 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
2376         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
2377         (bfd_fdopenr): Likewise.
2378         (bfd_openstreamr): Likewise.
2379         (bfd_openw): Likewise.
2381         * targets.c: Sort target vecs.
2382         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
2383         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
2384         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
2385         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
2386         * configure.in: Sort target vecs.  Add m88kmach3_vec.
2387         * configure: Regenerate.
2389 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
2391         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
2392         bpo_reloc_no to break sort order ties, not address of items.
2394 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2396         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
2397         Skip excluded sections in determing __gp value.
2398         (elf_hppa_final_link_relocate): Use the symbol's address in
2399         R_PARISC_FPTR64 relocations that don't need an opd entry.
2400         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
2401         (elf64_hppa_finalize_dynreloc): Likewise.
2402         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
2403         (elf64_hppa_finish_dynamic_symbol): Break up assert.
2405 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
2407         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2408         alignment for .bss, .data and .text sections so that sse and sse2
2409         code will work.
2410         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2412 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
2414         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
2415         sh[1234]*-elf*.
2417 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2419         * elflink.h (elf_bfd_final_link): Improve error handling for missing
2420         dynamic sections.
2422         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
2423         for a symbol that has no output section.
2424         (allocate_dynrel_entries): Correct comment.
2425         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
2426         unless we want one.
2427         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
2428         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
2429         with no section.  Remove unnecessary parentheses.
2431 2002-06-11  Tom Rix  <trix@redhat.com>
2433         * coffcode.h (coff_compute_section_file_positions): Add data
2434         section to AIX loader alignment check.
2436         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
2437         alignment to 4 bytes.
2438         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
2439         power accessor macro.
2440         (do_shared_object_padding): Remove invalid assertion.
2442 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
2444         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
2445         for removed output sections.
2447 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
2449         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
2450         htab_alloc.
2451         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
2453 2002-06-08  H.J. Lu <hjl@gnu.org>
2455         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
2456         work around a long long bug in gcc 2.96 on mips.
2458 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
2460         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
2461         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
2462         Regenerate dependency lists.
2463         * Makefile.in: Regenerate.
2464         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
2465         vax1knetbsd_vec to targ_selvecs.
2466         * configure.in: Add vax1knetbsd_vec.
2467         * configure: Regenerate.
2468         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
2469         * vax1knetbsd.c: New file.
2470         * vaxnetbsd.c: Update copyright years.
2471         (TARGET_PAGE_SIZE): Set to 0x1000.
2472         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
2474 2002-06-08  Matt Thomas  <matt@3am-software.com>
2476         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
2478 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
2480         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
2482 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
2484         * Makefile.am: Run "make dep-am".
2485         * Makefile.in: Regenerate.
2487         * armnetbsd.c: Replace CONST with const.
2488         * corefile.c: Likewise.
2489         * elf32-dlx.c: Likewise.
2490         * elf64-mips.c: Likewise.
2491         * mmo.c: Likewise.
2492         * ns32knetbsd.c: Likewise.
2494         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
2495         table is elf64-sparc.
2497 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2499         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2500         Fix RELA addends to get not shifted in the result. Don't do special
2501         handling of R_MIPS_64 for NewABI.
2503 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
2505         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2506         (NAME(aout,slurp_reloc_table)): Likewise.
2507         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2508         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2509         (xcoff_write_archive_contents_big): Likewise.
2510         (xcoff_generate_rtinit): Likewise.
2511         (xcoff_generate_rtinit): Likewise, and check error return.
2512         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2513         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2514         (coff_get_normalized_symtab): Likewise.
2515         (coff_make_empty_symbol): Likewise.
2516         (bfd_coff_set_symbol_class): Likewise.
2517         * cofflink.c (coff_link_add_symbols): Likewise.
2518         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
2519         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
2520         (bfd_ecoff_write_accumulated_debug): Likewise.
2521         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
2522         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
2523         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
2524         * ieee.c (do_with_relocs): Use bfd_zalloc.
2525         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
2526         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2527         (NAME(aout,slurp_reloc_table)): Likewise.
2528         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
2529         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
2530         * som.c (som_build_and_write_symbol_table): Likewise.
2531         (som_slurp_string_table): Likewise.
2532         (som_slurp_symbol_table): Likewise.
2533         (som_bfd_ar_write_symbol_stuff): Likewise.
2534         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
2535         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
2536         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
2537         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
2538         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
2540 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
2542         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
2543         "group" union.
2544         (elf_group_name): Update.
2545         (elf_group_id): Define.
2546         (bfd_elf_set_group_contents): Declare.
2547         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
2548         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
2549         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
2550         that sym for the signature.
2551         (_bfd_elf_compute_section_file_positions): Don't call
2552         set_group_contents for "ld -r" case.
2553         (swap_out_syms): Use bfd_zalloc.
2554         * elflink.h (elf_link_add_archive_symbols): Likewise.
2555         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2556         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
2558 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
2560         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
2561         relocs in opd for non-shared too.
2563 2002-06-06  Jeffrey Law  <law@redhat.com>
2565         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
2566         relocations.
2568 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
2570         * merge.c: Include libiberty.h.
2571         * elf-strtab.c: Include libiberty.h.
2573 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
2575         * peXXigen.c (pe_print_idata): Remove unused variable.
2577 2002-06-06  David Heine <dlheine@tensilica.com>
2579         * elf.c (assign_file_positions_for_segments): Remove unallocated
2580         sections from the section to segment mapping for PT_LOAD segments.
2581         Update comment about empty loadable segments.
2583 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
2585         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
2586         is within the .stabstr section.
2588 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
2590         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
2591         are "const PTR", not "const PTR *".
2592         (bfd_elf32_swap_symbol_in): Likewise.
2593         (bfd_elf64_swap_symbol_in): Likewise.
2594         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
2595         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2596         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2597         (elf_link_add_object_symbols): Likewise.
2598         (elf_link_record_local_dynamic_symbol): Likewise.
2599         (elf_link_input_bfd): Likewise.
2600         (elf_gc_mark): Likewise.
2601         (elf_reloc_symbol_deleted_p): Likewise.
2602         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2603         (mn10200_elf_relax_delete_bytes): Likewise.
2604         (mn10200_elf_symbol_address_p): Likewise.
2605         (mn10200_elf_get_relocated_section_contents): Likewise.
2606         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2607         (mn10300_elf_relax_section): Likewise.
2608         (mn10300_elf_relax_delete_bytes): Likewise.
2609         (mn10300_elf_symbol_address_p): Likewise.
2610         (mn10300_elf_get_relocated_section_contents): Likewise.
2611         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2612         (elf32_h8_relax_delete_bytes): Likewise.
2613         (elf32_h8_symbol_address_p): Likewise.
2614         (elf32_h8_get_relocated_section_contents): Likewise.
2615         * elf32-hppa.c (get_local_syms): Likewise.
2616         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2617         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2618         * elf32-sh.c (sh_elf_relax_section): Likewise.
2619         (sh_elf_relax_delete_bytes): Likewise.
2620         (sh_elf_get_relocated_section_contents): Likewise.
2621         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2622         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2623         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2624         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2625         * elf64-ppc.c (get_local_syms): Likewise.
2626         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2627         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2629 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
2631         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
2633 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
2635         * elf.c (group_signature): Swap in the whole symbol, and handle
2636         extracting section symbol names.
2637         (setup_group): Add comment.
2638         (set_group_contents): When called from objcopy or ld, arrange for
2639         section contents to be written.  Write group member output section
2640         indices to allow objcopy to reorganize sections.
2641         (_bfd_elf_copy_private_section_data): Copy group info.
2643         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
2644         (bfd_elf32_swap_symbol_in): Update prototype.
2645         (bfd_elf64_swap_symbol_in): Likewise.
2646         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
2647         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2648         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2649         (elf_link_add_object_symbols): Likewise.
2650         (elf_link_record_local_dynamic_symbol): Likewise.
2651         (elf_link_input_bfd): Likewise.
2652         (elf_gc_mark): Likewise.
2653         (elf_reloc_symbol_deleted_p): Likewise.
2654         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2655         (mn10200_elf_relax_delete_bytes): Likewise.
2656         (mn10200_elf_symbol_address_p): Likewise.
2657         (mn10200_elf_get_relocated_section_contents): Likewise.
2658         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2659         (mn10300_elf_relax_section): Likewise.
2660         (mn10300_elf_relax_delete_bytes): Likewise.
2661         (mn10300_elf_symbol_address_p): Likewise.
2662         (mn10300_elf_get_relocated_section_contents): Likewise.
2663         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2664         (elf32_h8_relax_delete_bytes): Likewise.
2665         (elf32_h8_symbol_address_p): Likewise.
2666         (elf32_h8_get_relocated_section_contents): Likewise.
2667         * elf32-hppa.c (get_local_syms): Likewise.
2668         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2669         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2670         * elf32-sh.c (sh_elf_relax_section): Likewise.
2671         (sh_elf_relax_delete_bytes): Likewise.
2672         (sh_elf_get_relocated_section_contents): Likewise.
2673         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2674         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2675         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2676         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2677         * elf64-ppc.c (get_local_syms): Likewise.
2678         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2679         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2680         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
2681         * elf64-alpha.c (alpha_elf_size_info): Likewise.
2682         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2683         * elf64-mips.c (mips_elf64_size_info): Likewise.
2684         * elf64-s390.c (s390_elf64_size_info): Likewise.
2685         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2687 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2689         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
2690         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
2691         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
2692         _bfd_mips_elf_ignore_discarded_relocs.
2693         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
2695 2002-06-05  H.J. Lu <hjl@gnu.org>
2697         * elfxx-mips.c (mips_elf_calculate_relocation): Call
2698         _bfd_elf_rel_local_sym for STT_SECTION relocations against
2699         the SEC_MERGE section.
2701 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
2703         * coff-alpha.c: Update copyright date.
2704         * coff-mips.c: Likewise.
2705         * xcoff-target.h: Likewise.
2707         * bfd-in.h: Remove "taken from the source" comment.
2708         * libbfd-in.h: Likewise.
2709         * libcoff-in.h: Likewise.
2710         * bfd-in2.h: Regenerate.
2711         * libbfd.h: Regenerate.
2712         * libcoff.h: Regenerate.
2714         * elf.c (bfd_elf_discard_group): Return true.
2715         * elf-bfd.h (bfd_elf_discard_group): Declare.
2716         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
2717         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
2718         * bfd.c (bfd_discard_group): Define.
2719         * targets.c (struct bfd_target): Add _bfd_discard_group.
2720         (BFD_JUMP_TABLE_LINK): Here too.
2721         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
2722         * aout-adobe.c (aout_32_bfd_discard_group): Define.
2723         * aout-target.h (MY_bfd_discard_group): Define.
2724         * aout-tic30.c (MY_bfd_discard_group): Define.
2725         * binary.c (binary_bfd_discard_group): Define.
2726         * bout.c (b_out_bfd_discard_group): Define.
2727         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
2728         * coffcode.h (coff_bfd_discard_group): Define.
2729         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
2730         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
2731         * i386msdos.c (msdos_bfd_discard_group): Define.
2732         * i386os9k.c (os9k_bfd_discard_group): Define.
2733         * ieee.c (ieee_bfd_discard_group): Define.
2734         * ihex.c (ihex_bfd_discard_group): Define.
2735         * mmo.c (mmo_bfd_discard_group): Define.
2736         * nlm-target.h (nlm_bfd_discard_group): Define.
2737         * oasys.c (oasys_bfd_discard_group): Define.
2738         * ppcboot.c (ppcboot_bfd_discard_group): Define.
2739         * som.c (som_bfd_discard_group): Define.
2740         * srec.c (srec_bfd_discard_group): Define.
2741         * tekhex.c (tekhex_bfd_discard_group): Define.
2742         * versados.c (versados_bfd_discard_group): Define.
2743         * vms.c (vms_bfd_discard_group): Define.
2744         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
2745         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
2746         (aix5coff64_vec): Likewise.
2747         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
2749 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
2751         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
2752         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
2753         (elf32-sh64-com.lo): New dependency list.
2754         * Makefile.in: Regenerate.
2755         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
2756         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
2757         elf32-sh64-com.lo.
2758         * configure: Regenerate.
2759         * elf32-sh64.c (sh64_address_in_cranges)
2760         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
2761         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
2762         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
2763         * elf32-sh64-com.c: ...here.  New file.
2765 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
2767         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
2768         ATTRIBUTE_UNUSED on used params.
2769         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
2770         before calling bfd_section_from_elf_index on local syms.
2771         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2773 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
2775         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
2776         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
2777         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
2778         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
2779         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
2780         * Makefile.in: Regenerate.
2781         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2782         (sh64-*-netbsd*): New targets.
2783         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
2784         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
2785         * configure: Regenerate.
2786         * elf32-sh64-nbsd.c: New file.
2787         * elf64-sh64-nbsd.c: New file.
2788         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
2789         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
2790         bfd_elf64_sh64lnbsd_vec.
2792 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
2794         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
2795         (bfd_section_from_shdr): Likewise.  Set section name of group
2796         sections from signature.
2797         (group_signature): Split out from setup_group.  Ensure symbol table
2798         is available.
2799         (bfd_elf_discard_group): New function.
2800         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
2801         .gnu.linkonce* sections if they are members of a group.
2802         (set_group_contents): Set GRP_COMDAT flag.
2803         * section.c (bfd_discard_group): New function.
2804         * bfd-in.h (bfd_elf_discard_group): Declare.
2805         * bfd-in2.h: Regenerate.
2806         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
2807         (elf_linkonce_p): Define.
2809 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
2811         * elf.c (bfd_section_from_shdr): Make "name" const.
2812         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
2813         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
2814         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2815         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2816         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2817         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2818         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2819         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
2820         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2821         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2822         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2824 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2826         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
2827         ABI.
2829 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
2831         * elf32-arc.c: Fix formatting.
2832         * elf32-arm.h: Likewise.
2833         * elf32-cris.c: Likewise.
2834         * elf32-dlx.c: Likewise.
2835         * elf32-hppa.c: Likewise.
2836         * elf32-i386.c: Likewise.
2837         * elf32-i386qnx.c: Likewise.
2838         * elf32-or32.c: Likewise.
2839         * elf32-s390.c: Likewise.
2840         * elf32-sh64.c: Likewise.
2841         * elf32-vax.c: Likewise.
2842         * elf32-xstormy16.c: Likewise.
2843         * elf64-alpha.c: Likewise.
2844         * elf64-mmix.c: Likewise.
2845         * elf64-ppc.c: Likewise.
2846         * elf64-s390.c: Likewise.
2847         * elf64-sh64.c: Likewise.
2848         * elf64-x86-64.c: Likewise.
2850 2002-06-02  Richard Henderson  <rth@redhat.com>
2852         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
2853         null when there are no got entries for a symbol.
2854         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
2855         uninitialized variable warning.
2857 2002-06-01  Richard Henderson  <rth@redhat.com>
2859         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
2860         undefined symbols here.
2861         (elf64_alpha_relax_section): Do it here.  Also test for not
2862         defined in the current module.
2863         (elf64_alpha_relocate_section_r): Split out of ...
2864         (elf64_alpha_relocate_section): ... here.  Don't dereference
2865         NULL when looking up local got entries.
2867 2002-06-01  Richard Henderson  <rth@redhat.com>
2869         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
2870         symbols from JSR relaxation.
2871         (elf64_alpha_size_plt_section_1): New.
2872         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
2873         (elf64_alpha_size_rela_got_1): ... here.
2874         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
2875         (elf64_alpha_size_rela_got_section): ... here.
2876         (elf64_alpha_size_plt_section): New.
2877         (elf64_alpha_relax_section): Call them.
2878         (elf64_alpha_size_got_sections): Remove output_bfd arg.
2879         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
2881 2002-06-01  Richard Henderson  <rth@redhat.com>
2883         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
2884         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
2885         in shared libraries.  Fix DTPRELHI and TPRELHI value.
2886         (INSN_ADDQ, INSN_RDUNIQ): New.
2887         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
2888         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
2889         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
2890         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
2891         Handle GOTDTPREL and GOTTPREL relocations.
2892         (elf64_alpha_relax_gprelhilo): New.
2893         (elf64_alpha_relax_tls_get_addr): New.
2894         (elf64_alpha_relax_find_tls_segment): New.
2895         (elf64_alpha_relax_section): Handle TLS relocations.
2896         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
2897         (elf64_alpha_check_relocs): Set it.
2899 2002-06-01  Richard Henderson  <rth@redhat.com>
2901         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
2903         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
2904         check; don't suppress dynamic relocs for non-allocated sections.
2906         * elf64-alpha.c: Remove dead code.
2908 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
2910         * bfd-in2.h: Regenerate.
2911         * libbfd.h: Regenerate.
2912         * po/SRC-POTFILES.in: Regenerate.
2914         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
2915         space for bss .plt.
2917 2002-05-31  Graeme Peterson  <gp@qnx.com>
2919         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
2920         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
2921         Run "make dep-am".
2922         * Makefile.in: Regenerate.
2923         * config.bfd: Add i[3456]86-*-nto-qnx* support.
2924         * configure.in: Add bfd_elf32_i386qnx_vec support.
2925         * configure: Regenerate.
2926         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
2927         is_contained_by_filepos, and copy_private_bfd_data_p.
2928         * elf.c (assign_file_positions_for_segments): Call backend
2929         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
2930         (IS_CONTAINED_BY_FILEPOS): Define.
2931         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
2932         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
2933         Fix non-K&R call to _bfd_error_handler.
2934         (_bfd_elf_copy_private_section_data): Use backend
2935         copy_private_bfd_data_p.
2936         * elf32-i386.c: Don't include elfxx-target.h when
2937         ELF32_I386_C_INCLUDED is defined.
2938         * elf32-i386qnx.c: New QNX elf backend file.
2939         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
2940         elf_backend_is_contained_by_filepos, and
2941         elf_backend_do_copy_private_bfd_data.
2942         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
2944 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
2946         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
2947         Move other similar defines to start of file.
2949 2002-05-30  Tom Rix  <trix@redhat.com>
2951         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
2952         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
2954 2002-05-30  Richard Henderson  <rth@redhat.com>
2956         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
2957         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
2958         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
2959         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
2960         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
2961         (struct alpha_elf_obj_tdata): Rename total_got_entries and
2962         n_local_got_entries to total_got_size and local_got_size.
2963         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
2964         (alpha_got_entry_size): New.
2965         (elf64_alpha_relax_with_lituse): Use it.
2966         (elf64_alpha_relax_without_lituse): Likewise.
2967         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
2968         (get_got_entry): New.
2969         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
2970         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
2971         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
2972         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
2973         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
2974         (elf64_alpha_calc_got_offsets): Likewise.
2975         (alpha_dynamic_entries_for_reloc): New.
2976         (elf64_alpha_calc_dynrel_sizes): Use it.
2977         (elf64_alpha_size_dynamic_sections): Likewise.
2978         (elf64_alpha_relocate_section): Handle TLS relocations.
2979         * reloc.c: Add Alpha TLS relocations.
2980         * bfd-in2.h, libbfd.h: Rebuild.
2982 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2984         * peXXigen.c (pe_print_idata): Remove double printed
2985         import table lines; add Bound-To comment.
2987 2002-05-29  Matt Thomas  <matt@3am-software.com>
2989         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
2990         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
2991         (elf32-vax.lo): New rule.
2992         * Makefile.in: Regenerate.
2993         * configure.in (bfd_elf32_vax_vec)
2994         (vaxnetbsd_vec): New vectors.
2995         * configure: Regenerate.
2996         * config.bfd (vax-*-netbsdelf*)
2997         (vax-*-netbsdaout*)
2998         (vax-*-netbsd*): New targets.
2999         * elf32-vax.c: New file.
3000         * reloc.c: Add VAX relocations.
3001         * bfd-in2.h: Regenerate.
3002         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
3004 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
3006         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
3007         and bfd_elf32_bigarm_vec to targ_selvecs.
3009 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
3011         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
3012         with auto-imported symbols.
3014 2002-05-29  Adam Nemet  <anemet@lnxw.com>
3016         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
3017         sections only record bfd.
3018         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
3019         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
3020         * bfd-in2.h: Regenerate.
3022 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
3024         * syms.c (_bfd_stab_section_find_nearest_line): Move
3025         declaration and initialisation of saw_line and saw_func out of
3026         for loop.
3028 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
3030         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
3031         (bfd_elf64_get_symbol_info): Define.
3032         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
3034 2002-05-29  Andrey Volkov  <avolkov@transas.com>
3036         * cpu-h8300.c: Make default h8300 machine first in machine list.
3038 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
3040         * config.bfd: Added DLX configuraton.
3041         * Makefile.am: Added DLX configuraton.
3042         * configure.in: Added DLX configuraton.
3043         * archures.c: Add DLX architecure.
3044         * reloc.c: Add DLX relocs.
3045         * targets.c: Added DLX target vector.
3046         * configure: Regenerate.
3047         * Makefile.in: Regenreate.
3048         * bfd-in2.h: Regenreate.
3049         * elf32-dlx.c: New file: Support DLX target.
3050         * cpu-dlx.c: New file: Support DLX target.
3052 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
3054         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
3056         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
3057         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
3058         strings to point inside function code sym string.
3059         (func_desc_adjust): Likewise.
3060         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
3062 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
3064         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
3065         (elf64_x86_64_grok_psinfo): Added.
3067 2002-05-24  TAMURA Kent <kent@netbsd.org>
3069         * config.bfd: Add a target for i386-netbsdpe.
3071 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
3073         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
3074         and is_func_descriptor.
3075         (func_desc_adjust): Hide function code sym in shared libs unless
3076         there is a matching exported function descriptor sym.
3078 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
3080         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
3081         for symbols from SHF_TLS section.
3082         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
3083         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
3084         (map_sections_to_segments): Build PT_TLS segment if necessary.
3085         (assign_file_positions_for_segments): Likewise.
3086         (get_program_header_size): Account for PT_TLS segment.
3087         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
3088         SEC_THREAD_LOCAL sections to STT_TLS.
3089         * reloc.c: Add 386 and IA-64 TLS relocs.
3090         * section.c (SEC_THREAD_LOCAL): Define.
3091         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
3092         Remove.
3093         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
3094         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
3095         unconditionally.
3096         (struct elf_final_link_info): Add first_tls_sec.
3097         (elf_bfd_final_link): Set first_tls_sec.
3098         Compute elf_hash_table (info)->tls_segment.
3099         (elf_link_output_extsym): Handle STT_TLS symbols.
3100         (elf_link_input_bfd): Likewise.
3101         * syms.c (BSF_THREAD_LOCAL): Define.
3102         * bfd-in2.h: Rebuilt.
3103         * libbfd.h: Rebuilt.
3104         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
3105         elf_i386_mkobject, elf_i386_object_p): New functions.
3106         (elf_howto_table): Add TLS relocs.
3107         (elf_i386_reloc_type_lookup): Support TLS relocs.
3108         (elf_i386_info_to_howto_rel): Likewise.
3109         (struct elf_i386_link_hash_entry): Add tls_type.
3110         (struct elf_i386_obj_tdata): New.
3111         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
3112         New macros.
3113         (struct elf_i386_link_hash_table): Add tls_ldm_got.
3114         (link_hash_newfunc): Clear tls_type.
3115         (elf_i386_check_relocs): Support TLS relocs.
3116         (elf_i386_gc_sweep_hook): Likewise.
3117         (allocate_dynrelocs): Likewise.
3118         (elf_i386_size_dynamic_sections): Likewise.
3119         (elf_i386_relocate_section): Likewise.
3120         (elf_i386_finish_dynamic_symbol): Likewise.
3121         (bfd_elf32_mkobject, elf_backend_object_p): Define.
3122         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
3123         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
3124         want_tprel, want_dtpmod, want_dtprel.
3125         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
3126         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
3127         R_IA64_LTOFF_TPREL22.
3128         (elf_code_to_howto_index): Add TLS relocs.
3129         (elfNN_ia64_check_relocs): Support TLS relocs.
3130         (allocate_global_data_got): Account for TLS .got data.
3131         (allocate_dynrel_entries): Account for TLS dynamic relocations.
3132         (elfNN_ia64_install_value): Supprt TLS relocs.
3133         (set_got_entry): Support TLS relocs.
3134         (elfNN_ia64_relocate_section): Likewise.
3136 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3138         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
3139         BLX reloc round the relocation up rather than down.
3140         * coff-arm.c (coff_arm_relocate_section): Likewise.
3142 2002-05-21  H.J. Lu  (hjl@gnu.org)
3144         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
3145         definition.
3147 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
3149         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
3150         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
3152 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
3154         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
3155         unresolved relocs.
3156         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
3158 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3160         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
3161         non-ELF targets.
3163 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3165         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
3166         an error value.
3167         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
3168         return with false on error.
3169         (elf_link_input_bfd): Check reloc_emitter return value.
3171 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
3173         * config.bfd (armeb-*-netbsdelf*): New target.
3175 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
3177         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
3178         at the plt call stub.
3180 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3182         * cpu-mips.c (mips_compatible): Don't try to check machine
3183         compatibility.
3185 2002-05-18  Tom Rix  <trix@redhat.com>
3187         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out):  Fix C_FILE auxent.
3189 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
3191         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
3192         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
3193         we've already warned about an undefined symbol.  Report more
3194         detail on reloc errors.
3196 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
3198         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
3199         * configure.in: Invoke AM_INSTALL_LIBBFD.
3200         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
3201         (install_libbfd): .. New target.
3202         (uninstall_libbfd): Likewise.
3203         (install-bfdlibLTLIBRARIES): Likewise.
3204         (uninstall-bfdlibLTLIBRARIES): Likewise.
3205         (bfdlibdir): New.
3206         (bfdincludedir): New.
3207         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
3208         * aclocal.m4: Regenerate.
3209         * configure: Regenerate.
3210         * Makefile.in: Regenerate.
3212 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
3214         * hash.c (bfd_hash_lookup): Remove computation of len from inside
3215         hash loop.
3217 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
3219         * config.bfd: Add targets for sh64-linux (little endian and
3220         big endian).
3222 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
3224         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
3225         is located in the same section as the import table.  Instead
3226         check, and if necessary load the section containing the thunk.
3228 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
3230         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
3231         bfd_bread.
3232         (xcoff64_core_file_matches_executable_p): Replace bfd_read
3233         with bfd_bread.
3235 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
3237         * aix5ppc-core.c: Warning fixes.
3238         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
3239         * aout-target.h (MY_bfd_link_just_syms): Define.
3240         * aout-tic30.c (MY_bfd_link_just_syms): Define.
3241         * bfd.c (bfd_link_just_syms): Define.
3242         * binary.c (binary_bfd_link_just_syms): Define.
3243         * bout.c (b_out_bfd_link_just_syms): Define.
3244         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
3245         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
3246         * coffcode.h (coff_bfd_link_just_syms): Define.
3247         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
3248         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
3249         (_bfd_elf_link_just_syms): Declare.
3250         * elf.c (_bfd_elf_link_just_syms): New function.
3251         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
3252         sections haven't already been discarded by the linker.
3253         * elflink.h (elf_link_add_object_symbols): Likewise for stab
3254         sections and SEC_MERGE sections.
3255         (elf_bfd_discard_info): Similarly here.
3256         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
3257         * i386msdos.c (msdos_bfd_link_just_syms): Define.
3258         * i386os9k.c (os9k_bfd_link_just_syms): Define.
3259         * ieee.c (ieee_bfd_link_just_syms): Define.
3260         * ihex.c (ihex_bfd_link_just_syms): Define.
3261         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
3262         (_bfd_generic_link_just_syms): Declare.
3263         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
3264         * linker.c (_bfd_generic_link_just_syms): New function.
3265         * mmo.c (mmo_bfd_link_just_syms): Define.
3266         * nlm-target.h (nlm_bfd_link_just_syms): Define.
3267         * oasys.c (oasys_bfd_link_just_syms): Define.
3268         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
3269         * som.c (som_bfd_link_just_syms): Define.
3270         * srec.c (srec_bfd_link_just_syms): Define.
3271         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
3272         (BFD_JUMP_TABLE_LINK): And here.
3273         * tekhex.c (tekhex_bfd_link_just_syms): Define.
3274         * versados.c (versados_bfd_link_just_syms): Define.
3275         * vms.c (vms_bfd_link_just_syms): Define.
3276         * libbfd.h: Regenerate.
3277         * bfd-in2.h: Regenerate.
3279 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3281         * elf32-mips.c: Remove superfluous definitions copied from
3282         elfxx-mips.c.
3283         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
3284         SGIish vectors to check the special case.
3285         (mips_elf_hi16_reloc): Fix comment.
3286         (mips_elf_got16_reloc): Likewise.
3287         (_bfd_mips_elf32_gprel16_reloc): Likewise.
3288         (elf_reloc_map): Code cleanup.
3289         (mips_reloc_map): Add comment.
3290         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
3291         (mips_elf32_rtype_to_howto): Likewise.
3292         (mips_elf32_discard_info): Likewise.
3293         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
3294         lead to IRIX compatibility now.
3296 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3298         * elfxx-mips.c: Call it IRIX, not Irix in comments.
3300 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
3302         * config.bfd (shle-*-netbsdelf*): Add target which includes
3303         sh64 support.
3305 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
3307         * configure.in: Revert 2002-04-07.  Instead, auto-configure
3308         HAVE_ST_C_IMPL.
3309         * configure: Regenerate.
3310         * config.in: Regenerate.
3311         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
3312         or AIX_5_CORE.
3314 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
3316         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
3317         corefiles as well.2
3318         * configure: Regenerate.
3320 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
3322         * Makefile.am (install-data-local): Install headers to
3323         $(exec_prefix)/include.
3324         * Makefile.in: Regenerate.
3326 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
3327             Daniel Jacobowitz  <drow@mvista.com>
3329         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
3330         map BFD_RELOC_RVA.
3332 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
3334         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
3335         hppa*-*-openbsd*): New targets.
3336         * configure.in (alpha*-*-openbsd*): Set COREFILE.
3337         * configure: Regenerate.
3339 2002-05-10  Tom Rix  <trix@redhat.com>
3341         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
3342         xcoff64_ppc_relocate_section.
3343         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
3344         * libxcoff.h: Common xcoff_reloc_type function declaration.
3346 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
3348         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
3349         added in 2002-05-09 commit.
3351         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
3352         don't look for stubs on all undefined syms.
3354 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
3356         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
3357         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
3358         pcrel_offset.
3360         * elf32-i386.c (elf_howto_table): Comments.
3361         (elf_i386_relocate_section): Handle more relocs for relocatable
3362         linking and against SEC_MERGE sections.
3364 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
3366         * elf32-ppc.c (ppc_elf_create_got): New function.
3367         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
3368         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
3369         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
3370         _bfd_elf_create_got_section.
3372 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
3374         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
3375         * elfxx-target.h (elf_backend_rela_normal): Define.
3376         (elfNN_bed): Init rela_normal.
3377         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
3378         for section symbols here if rela_normal.  Simplify abs section test.
3379         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
3380         return immediately.  Remove code handling relocatable linking.
3381         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3382         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3383         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3384         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3385         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3386         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3387         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3388         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3389         * elf32-s390.c (elf_s390_relocate_section): Likewise.
3390         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3391         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3392         * elf64-s390.c (elf_s390_relocate_section): Likewise.
3393         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3394         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3395         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
3396         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3397         * elf-m10200.c (elf_backend_rela_normal): Define.
3398         * elf-m10300.c (elf_backend_rela_normal): Define.
3399         * elf32-fr30.c (elf_backend_rela_normal): Define.
3400         * elf32-i370.c (elf_backend_rela_normal): Define.
3401         * elf32-i860.c (elf_backend_rela_normal): Define.
3402         * elf32-m68k.c (elf_backend_rela_normal): Define.
3403         * elf32-mcore.c (elf_backend_rela_normal): Define.
3404         * elf32-openrisc.c (elf_backend_rela_normal): Define.
3405         * elf32-ppc.c (elf_backend_rela_normal): Define.
3406         * elf32-s390.c (elf_backend_rela_normal): Define.
3407         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
3408         * elf64-ppc.c (elf_backend_rela_normal): Define.
3409         * elf64-s390.c (elf_backend_rela_normal): Define.
3410         * elf64-x86-64.c (elf_backend_rela_normal): Define.
3411         * elfxx-ia64.c (elf_backend_rela_normal): Define.
3412         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
3413         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
3415 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
3417         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
3418         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
3420 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
3422         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
3423         when not relocatable.  Fix reloc_emitter call for K&R.
3425 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
3427         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
3428         reloading local sym addend mistakenly removed in 2002-05-01 change.
3430         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
3431         (read_abbrevs): Change "offset" param to bfd_vma.
3432         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
3433         Change "abbrev_offset" to bfd_vma.
3434         (read_indirect_string): Use correct conversion chars in error
3435         message format string, cast bfd_vma's to unsigned long.
3436         (read_abbrevs): Likewise.
3437         (read_attribute_value): Likewise.
3438         (decode_line_info): Likewise.
3439         (scan_unit_for_functions): Likewise.
3440         (parse_comp_unit): Likewise.
3442 2002-05-04  Tom Rix  <trix@redhat.com>
3444         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
3445         (coff_swap_reloc_out): Same.
3446         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
3447         (xcoff_swap_reloc_out): Same.
3448         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
3449         case some 16 bit relocs. Add reloc value to output.
3450         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
3451         R_RBR. Improve names.
3452         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
3453         (bfd_xcoff_backend_data): Update with new reloc swap names.
3454         (bfd_pmac_xcoff_backend_data) : Same.
3455         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
3456         (xcoff64_swap_reloc_out): Same.
3457         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
3458         R_POS. Add reloc value to output.
3459         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
3460         bit R_RBR. Improve names, masks.
3461         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
3462         (bfd_xcoff_backend_data): Update with new reloc swap names.
3463         (bfd_xcoff_aix5_backend_data) : Same.
3465 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
3467         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
3468         bfd_count top_index, input_list, all_local_syms.
3469         (elf32_hppa_setup_section_lists): New function, split from
3470         elf32_hppa_size_stubs.
3471         (elf32_hppa_next_input_section): Likewise.
3472         (group_sections): Likewise.
3473         (get_local_syms): Likewise.
3474         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
3475         stubs on undefined syms too.
3476         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
3477         Only access htab elf fields when we have an elf hash table.
3478         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
3479         (elf32_hppa_next_input_section): Declare.
3481 2002-05-04  Bob Byrnes  <byrnes@curl.com>
3483         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
3484         _bfd_new_bfd.
3486 2002-05-03  H.J. Lu  (hjl@gnu.org)
3488         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
3489         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
3490         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
3491         to hide a global symbol.
3492         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
3493         forced_local to true.
3495 2002-05-02  Richard Henderson  <rth@redhat.com>
3497         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
3498         vs SHN_UNDEF to zero.
3500 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
3502         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3503         16 bit reloc.
3504         <R_PPC64_SECTOFF_DS>: Likewise.
3505         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3506         SECTOFF reloc.
3507         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3508         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3509         SECTOFF reloc.
3511         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3512         (ppc64_elf_ha_reloc): New function.
3513         (ppc64_elf_brtaken_reloc): New function.
3514         (ppc64_elf_sectoff_reloc): New function.
3515         (ppc64_elf_sectoff_ha_reloc): New function.
3516         (ppc64_elf_toc_reloc): New function.
3517         (ppc64_elf_toc_ha_reloc): New function.
3518         (ppc64_elf_toc64_reloc): New function.
3519         (ppc64_elf_unhandled_reloc): New function.
3520         (ppc64_elf_howto_raw): Use the above.
3521         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
3522         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
3523         <R_PPC64_SECTOFF_DS>: Likewise.
3524         (IS_ABSOLUTE_RELOC): Update.
3525         (struct ppc_link_hash_table): Add have_undefweak.
3526         (ppc64_elf_link_hash_table_create): Init.
3527         (func_desc_adjust): Set have_undefweak.
3528         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
3529         add the .sfpr blr when have_undefweak.
3530         (ppc64_elf_setup_section_lists): Check hash table flavour.
3531         (ppc64_elf_next_input_section): Move output_section->owner test to
3532         ppc64elf.em.
3533         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
3534         and relocatable test.  Return TOCstart and don't set elf_gp.
3535         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
3536         offset calculation.  Add assert on weak sym branch tweaks.
3537         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
3538         (ppc64_elf_toc): Declare.
3539         (ppc64_elf_next_input_section): Update.
3541 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
3543         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
3544         file_name.
3546 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
3548         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
3549         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
3550         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
3551         call branches.  Correct undefined weak destination.
3552         (ppc64_elf_func_desc_adjust): Always create at least one blr in
3553         .sfpr, and correct case where either only savef* or restf* is
3554         needed.
3556         Long branch stubs, multiple stub sections.
3557         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
3558         (ppc64_elf_next_input_section): Declare.
3559         * elf64-ppc.c: Move linker-only prototypes.
3560         (STUB_SUFFIX): Define.
3561         (enum ppc_stub_type): New.
3562         (struct ppc_stub_hash_entry): New.
3563         (struct ppc_branch_hash_entry): New.
3564         (struct ppc_link_hash_entry): Add stub_cache, oh.
3565         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
3566         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
3567         Rename plt_overflow to stub_error.
3568         (ppc_stub_hash_lookup): Define.
3569         (ppc_branch_hash_lookup): Define.
3570         (stub_hash_newfunc): New function.
3571         (branch_hash_newfunc): New function.
3572         (link_hash_newfunc): Init new fields.
3573         (ppc64_elf_link_hash_table_create): Likewise.
3574         (ppc64_elf_link_hash_table_free): New function.
3575         (ppc_stub_name): New function.
3576         (ppc_get_stub_entry): New function.
3577         (ppc_add_stub): New function.
3578         (create_linkage_sections): Use bfd_make_section_anyway.  Create
3579         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
3580         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
3581         and set up for plt call stubs.  Link func and func desc syms.
3582         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
3583         (func_desc_adjust): Avoid hash lookup when func desc sym available
3584         via shortcut, and set links when processing.
3585         (ppc64_elf_hide_symbol): Likewise.
3586         (allocate_dynrelocs): Don't allocate stub section here.
3587         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
3588         Remove sstub code.
3589         (ppc_type_of_stub): New function.
3590         (build_one_stub): Delete.
3591         (ppc_build_one_stub): New function.
3592         (ppc_size_one_stub): New function.
3593         (ppc64_elf_setup_section_lists): New function.
3594         (ppc64_elf_next_input_section): New function.
3595         (group_sections): New function.
3596         (get_local_syms): New function.
3597         (ppc64_elf_size_stubs): Rewrite.
3598         (ppc64_elf_build_stubs): Rewrite.
3599         (ppc64_elf_relocate_section): Look up stub entry for REL24
3600         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
3601         branch stubs if REL14* or REL24 relocs won't reach.
3602         (bfd_elf64_bfd_link_hash_table_free): Define.
3604 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3606         * config.bfd: Add support for powerpc-*-windiss.
3608 2002-04-30  Tom Rix  <trix@redhat.com>
3610         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
3611         symbol names into the hash table.
3613 2002-04-28  Tom Rix  <trix@redhat.com>
3615         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
3616         calulating relocations.
3617         (xcoff_complain_overflow) : Function table for relocation errors.
3618         (xcoff_ppc_relocate_section): Use relocation and complain function
3619         tables.
3620         (xcoff_complain_overflow_unsigned_func): New complain function.
3621         (xcoff_complain_overflow_signed_func): Same.
3622         (xcoff_complain_overflow_bitfield_func): Same.
3623         (xcoff_complain_overflow_dont_func): Same.
3624         (xcoff_reloc_type_crel): New recot function.
3625         (xcoff_reloc_type_br): Same.
3626         (xcoff_reloc_type_ba): Same.
3627         (xcoff_reloc_type_toc): Same.
3628         (xcoff_reloc_type_rel): Same.
3629         (xcoff_reloc_type_neg): Same.
3630         (xcoff_reloc_type_pos): Same.
3631         (xcoff_reloc_type_fail): Same.
3632         (xcoff_reloc_type_noop): Same.
3633         * libxcoff.h : Declare common parts for xcoff64.
3634         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
3635         and complain function tables.
3637 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
3639         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
3640         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
3642 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
3644         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
3645         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
3647         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
3648         same as the output before calling elf_link_input_bfd.
3650         * coffcode.h (coff_compute_section_file_positions): Set
3651         section_tail after shuffling section list.
3653 2002-04-24  Christian Groessler <chris@groessler.org>
3655         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
3656         addresses are 23bit with a special layout, not plain 32bit
3657         values.  Prevent relocation of immediate values.
3659 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
3661         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
3662         MIPS-16 ASE flags are set, print something to indicate that.
3664 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
3666         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
3667         under which a plt call stub is used.
3668         (final_link_relocate): Similarly.
3669         (allocate_plt_static): Clear h-plabel except when plt entry is
3670         exclusively used for a plabel.
3671         (allocate_dynrelocs): Use the above to simplify plt sizing.
3672         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
3673         (elf32_hppa_link_hash_table_create): Init.
3674         (BL22_RP): Define.
3675         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
3676         (elf32_hppa_check_relocs): Set has_22bit_branch.
3678         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
3679         (final_link_relocate): Likewise.
3681 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
3683         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
3684         search table if some FDE is DW_EH_PE_aligned encoded either.
3685         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
3687 2002-04-22  Richard Smith  <richard@ex-parrot.com>
3688             Jakub Jelinek  <jakub@redhat.com>
3690         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
3691         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
3692         encoded personality.
3693         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
3694         for CIE/FDE removal.
3696 2002-04-20  Tom Rix  <trix@redhat.com>
3698         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
3700 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
3702         * archures.c (bfd_lookup_arch): Move the list order comment..
3703         (struct bfd_arch_info): ..to where it belongs.
3704         * bfd-in2.h: Regenerate.
3706         * archures.c (bfd_lookup_arch): Add comment on list order.
3707         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
3708         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
3709         is always at head of list.
3711 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
3713         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
3714         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
3715         definition of these functions for ARM_WINCE builds as they are
3716         not used.
3717         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
3718         for ARM_WINCE builds.
3720 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
3722         * coff-arm.c (bfd_arm_process_before_allocation):
3724 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
3726         * cpu-sh.c (scan_mach): Delete.
3727         (arch_info_struct): Replace scan_mach with bfd_default_scan.
3728         (bfd_sh_arch): Likewise.
3730 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
3732         * ihex.c (ihex_write_object_contents): Fix check for records
3733         crossing 64K boundaries.
3735 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
3737         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
3738         type rather than just assuming entries are ELF.
3739         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3740         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3741         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
3742         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
3743         rather than elf_link_hash_entry.
3745 2002-04-15  Richard Henderson  <rth@redhat.com>
3747         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
3748         n32 binaries.
3750 2002-04-15  Michael Snyder  <msnyder@redhat.com>
3752         * opncls.c (bfd_close): Write contents if writeable.
3753         Minor formatting tidy-ups.
3755 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
3757         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
3759 2002-04-12  Michael Snyder  <msnyder@redhat.com>
3761         * bfd-in.h (bfd_get_section_lma): New access macro.
3762         Minor white-space fix-up.
3764 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
3766         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
3767         header pad.
3769 2002-04-09  DJ Delorie  <dj@redhat.com>
3771         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
3773 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
3775         * coffcode.h (coff_read_word): New.
3776         (coff_compute_checksum): New.
3777         (coff_apply_checksum): New.
3778         (coff_write_object_contents): Call coff_apply_checksum () to
3779         apply checksum to PE image.
3781 2002-04-08  Randolph Chung  <tausq@debian.org>
3783         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
3784         (elf32_hppa_final_link): Split out sorting logic to..
3785         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
3786         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
3788 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
3790         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
3791         pattern.
3792         * configure: Re-generate.
3794 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
3796         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
3797         is greater or equal to 4.3.3.
3798         * configure: Regenerate.
3799         Fix PR gdb/344.
3801 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
3803         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
3804         R_CRIS_32_PCREL>: Fix typo in name.
3805         (cris_elf_check_relocs): Always create .rela.got here when
3806         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
3807         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
3808         assume it's created.
3810 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
3812         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
3813         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
3814         define.
3815         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
3816         * bfd.c (bfd_link_hash_table_free): Define.
3817         * binary.c (binary_bfd_link_hash_table_free): Define.
3818         * bout.c (b_out_bfd_link_hash_table_free): Define.
3819         * coff-rs6000.c (rs6000coff_vec): Include
3820         _bfd_generic_link_hash_table_free.
3821         (pmac_xcoff_vec): Likewise.
3822         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3823         (aix5coff64_vec): Likewise.
3824         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
3825         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
3826         (bfd_elf32_bfd_link_hash_table_free): Define.
3827         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
3828         (bfd_elf32_bfd_link_hash_table_free): Define.
3829         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
3830         define.
3831         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
3832         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
3833         * ieee.c (ieee_bfd_link_hash_table_free): Define.
3834         * ihex.c (ihex_bfd_link_hash_table_free): Define.
3835         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
3836         (_bfd_generic_link_hash_table_free): Add prototype.
3837         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
3838         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
3839         * linker.c (_bfd_generic_link_hash_table_free): New function.
3840         * mmo.c (mmo_bfd_link_hash_table_free): Define.
3841         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
3842         * oasys.c (oasys_bfd_link_hash_table_free): Define.
3843         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
3844         * som.c (som_bfd_link_hash_table_free): Define.
3845         * srec.c (srec_bfd_link_hash_table_free): Define.
3846         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
3847         * versados.c (versados_bfd_link_hash_table_free): Define.
3848         * vms.c (vms_bfd_link_hash_table_free): New function.
3849         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
3851         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
3852         instead of bfd_alloc.
3853         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
3854         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
3855         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
3856         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
3857         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3858         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
3859         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
3860         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
3861         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3862         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
3863         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
3864         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3865         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
3866         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
3867         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
3868         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
3869         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
3870         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
3871         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
3872         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
3873         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3874         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
3875         * m68klinux.c (linux_link_hash_table_create): Likewise.
3876         * sparclinux.c (linux_link_hash_table_create): Likewise.
3877         * sunos.c (sunos_link_hash_table_create): Likewise.
3878         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
3880         * targets.c: Add _bfd_link_hash_table_free to xvec.
3882         * bfd-in2.h: Regenerate.
3883         * libbfd.h: Regenerate.
3884         * libcoff.h: Regenerate.
3886 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
3888         * dep-in.sed: Cope with absolute paths.
3889         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
3890         Run "make dep-am".
3891         * Makefile.in: Regenerate.
3892         * coff-arm.c: Fix copyright date.
3893         * cpu-h8300.c: Likewise.
3894         * cpu-i370.c: Likewise.
3895         * cpu-s390.c: Likewise.
3896         * cpu-mips.c: Likewise.
3897         * po/SRC-POTFILES.in: Regenerate.
3899 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3901         * Makefile.am: Add elfxx-mips.c to the known backends.
3902         (elf32-mips.lo): remove dependency to coff/external.h.
3903         * Makefile.in: Regenerate.
3904         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
3905         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
3906         accordingly.
3907         * configure: Regenerate.
3908         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
3909         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
3910         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
3911         MIPS specific backend functions.
3912         * elf32-mips.c: Moved most code to elfxx-mips.c.
3913         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
3914         static.
3915         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
3916         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
3917         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
3918         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
3919         interface to allow selection of the right REL or RELA howto table.
3920         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
3921         static. Let it refuse n32 objects.
3922         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
3923         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
3924         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
3925         (elf32_mips_ignore_discarded_relocs): Rename from
3926         _bfd_elf32_mips_ignore_discarded_relocs.
3927         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
3928         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
3929         (elf_mips_howto_table_rela): Remove.
3930         * elf64-mips.c: Moved most code to elfxx-mips.c.
3931         (bfd_elf64_bfd_reloc_type_lookup): Make static.
3932         (mips_elf64_rtype_to_howto): New function.
3933         (mips_elf64_object_p): Likewise.
3934         (elf64_mips_irix_compat): Likewise.
3935         * elfxx-mips.c: New file containing common code merged together from
3936         elf32-mips.c and elf64-mips.c.
3937         * elfxx-mips.h: New file containing MIPS specific prototypes from
3938         elf-bfd.h.
3939         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
3940         elf_backend_mips_rtype_to_howto.
3942 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
3944         * srec.c (MAXCHUNK, Chunk): Revise comments.
3945         (srec_write_record): Correct buffer size.
3946         (srec_write_header): Do without intermediate buffer.
3947         (srec_write_section): Validate Chunk.
3948         (srec_write_terminator): Pass NULL instead of dummy buffer.
3949         (srec_write_symbols): Pass file and symbol names directly to
3950         bfd_bwrite so sprintf won't overflow buffer.
3952 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
3954         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
3955         PC relative relocs against hidden symbols.
3956         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3958 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
3960         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
3961         LMAs, loop over segments until p_vaddr and p_memsz specify an
3962         extent enclosing the section.
3964 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
3966         * ihex.c (ihex_write_object_contents): Do not allow records to
3967         cross a 64K boundary - wrap if necessary.
3969 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
3971         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
3972         which caused the returned LWP ID to always be 0.
3974 2002-04-01  Richard Henderson  <rth@redhat.com>
3976         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3977         (elf32_sparc_relocate_section): Use it to figure out when to
3978         initialize .got entries.
3979         * elf64-sparc.c: Similarly.
3981 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
3983         * linker.c (link_action): Ignore duplicate warning syms.
3984         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
3985         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
3986         (elf_adjust_dynamic_symbol): Likewise.
3987         (elf_export_symbol): Likewise.
3988         (elf_link_find_version_dependencies): Likewise.
3989         (elf_link_assign_sym_version): Likewise.
3990         (elf_link_sec_merge_syms): Likewise.
3991         (elf_link_output_extsym): Likewise.
3992         (elf_gc_sweep_symbol): Likewise.
3993         (elf_gc_propagate_vtable_entries_used): Likewise.
3994         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3995         (elf_gc_allocate_got_offsets): Likewise.
3996         (elf_collect_hash_codes): Likewise.
3997         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
3998         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3999         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4000         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
4001         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
4002         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
4003         (elf_cris_discard_excess_dso_dynamics): Likewise.
4004         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
4005         (mark_PIC_calls): Likewise.
4006         (allocate_plt_static): Likewise.
4007         (allocate_dynrelocs): Likewise.
4008         (readonly_dynrelocs): Likewise.
4009         * elf32-i386.c (allocate_dynrelocs): Likewise.
4010         (readonly_dynrelocs): Likewise.
4011         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
4012         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
4013         * elf32-mips.c (mips_elf_output_extsym): Likewise.
4014         (mips_elf_sort_hash_table_f): Likewise.
4015         (mips_elf_check_mips16_stubs): Likewise.
4016         * elf32-s390.c (allocate_dynrelocs): Likewise.
4017         (readonly_dynrelocs): Likewise.
4018         * elf32-sh.c (sh_elf_discard_copies): Likewise.
4019         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
4020         (xstormy16_relax_plt_realloc): Likewise.
4021         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
4022         (elf64_alpha_output_extsym): Likewise.
4023         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
4024         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
4025         (mips_elf64_check_mips16_stubs): Likewise.
4026         (mips_elf64_output_extsym): Likewise.
4027         * elf64-ppc.c (func_desc_adjust): Likewise.
4028         (allocate_dynrelocs): Likewise.
4029         (readonly_dynrelocs): Likewise.
4030         * elf64-s390.c (allocate_dynrelocs): Likewise.
4031         (readonly_dynrelocs): Likewise.
4032         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
4033         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
4034         (readonly_dynrelocs): Likewise.
4035         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
4036         * aoutx.h (aout_link_write_other_symbol): Likewise.
4037         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
4038         (_bfd_coff_write_global_sym): Likewise.
4039         * i386linux.c (linux_tally_symbols): Likewise.
4040         * m68klinux.c (linux_tally_symbols): Likewise.
4041         * sparclinux.c (linux_tally_symbols): Likewise.
4042         * pdp11.c (aout_link_write_other_symbol): Likewise.
4043         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
4044         * xcofflink.c (xcoff_build_ldsyms): Likewise.
4045         (xcoff_write_global_symbol): Likewise.
4047         * cofflink.c (_bfd_coff_final_link): Formatting.
4048         * cpu-mips.c (mips_compatible): Make static, prototype.
4049         * elf32-i386.c (elf_i386_check_relocs): Formatting.
4050         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
4051         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
4052         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
4053         (mips_elf64_final_link): Likewise.
4054         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
4055         prototype.
4057 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
4059         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
4060         (SWAP_OUT_RELOC_OFFSET): Define.
4062 2002-03-27  Gregory Steuck <greg@nest.cx>
4064         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
4065         terminating NULL if empty symbol table.
4066         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
4068 2002-03-26  H.J. Lu  (hjl@gnu.org)
4070         * elflink.h (elf_link_input_bfd): Revert the last change since
4071         the gcc exception handling isn't fixed yet.
4073 2002-03-26  H.J. Lu  (hjl@gnu.org)
4075         * elflink.h (elf_link_input_bfd): Complain about relocations
4076         against local symbols in discarded sections.
4078 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
4080         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
4082 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
4084         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
4085         section file offset for !SEC_LOAD sections.
4087 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
4089         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
4090         <case R_ARM_GOT>): Handle relocations to Thumb functions.
4092 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
4094         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
4095         Whitespace changes.
4096         * archive.c: Update copyright date.
4097         * bfd-in2.h: Regenerate.
4098         * libbfd.h: Regenerate.
4099         * Makefile.am: Run "make dep-am"
4100         * Makefile.in: Regenerate.
4101         * po/SRC-POTFILES.in: Regenerate.
4103 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
4105         * dwarf2.c (struct funcinfo): Move up.
4106         (lookup_address_in_function_table): New argument function_ptr.
4107         Set it.
4108         (lookup_address_in_line_table): New argument function.  If function
4109         is non-NULL, use it to handle ``addr'' before the first line note of
4110         the function.
4111         (comp_unit_find_nearest_line): Update and swap calls to
4112         lookup_address_in_function_table and lookup_address_in_line_table.
4113         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
4114         N_SLINE encountered if we see an N_FUN before any N_SLINE.
4116 2002-03-20  Tom Rix  <trix@redhat.com>
4118         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
4119         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
4120         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt.
4122 2002-03-19  Tom Rix  <trix@redhat.com>
4124         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
4125         dynamic objects in archives.
4127 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
4129         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
4130         STT_NOTYPE symbols to STT_OBJECT.
4132 2002-03-18  Jan Hubicka  <jh@suse.cz>
4134         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
4136 2002-03-18  Tom Rix  <trix@redhat.com>
4138         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
4139         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
4140         * coff-rs6000 (do_pad) : New function for archive padding.
4141         (do_copy) : New function for object file copying in archives.
4142         (do_shared_object_padding) : New function for padding shared
4143         objects to their text section alignment in archives.
4144         (bfd_xcoff_ar_achive_set_magic) : Stub.
4145         (xcoff_write_armap_big) : Use do_copy and do_pad.
4146         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
4147         do_copy and do_pad.
4148         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
4149         bfd_xcoff_magic_number.
4150         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
4151         fop.
4152         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
4153         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
4154         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
4155         * rs6000-core.c : Update copyright date.
4156         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
4157         csectpp.
4158         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
4159         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
4160         (coff_set_flags) : Use bfd_xcoff_magic_number.
4161         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
4162         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
4163         * Makefile.am : Same.
4164         * config.bfd : Same.
4165         * targets.c : Same.
4166         * configure : Regnerate.
4167         * Makefile.in : Same.
4168         * bfd-in2.h : Same.
4170 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
4172         * po/fr.po: Updated version.
4174 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
4176         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
4177         * libbfd.h: Regenerate.
4178         * archive.c (coff_write_armap): Pass on failures from
4179         bfd_write_bigendian_4byte_int.
4181 2002-03-14  H.J. Lu <hjl@gnu.org>
4183         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
4184         error to bfd_error_nonrepresentable_section for reinit_array
4185         section in DSO.
4187 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
4189         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
4190         OR it in rather than replacing previously selected flags.
4192         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
4193         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
4195 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
4197         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
4198         (N): Use the above.
4199         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
4200         ensure reloc size matches before calling elf_link_input_bfd.
4201         Add an assert to check reloc size when counting output relocs.
4203 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
4205         * mmo.c (mmo_get_loc): Return NULL rather than false.
4207 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
4209         * po/fr.po: Updated version.
4211 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
4213         * archures.c (bfd_default_compatible): Test bits_per_word.
4214         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
4215         bfd_default_compatible.
4216         * cpu-i370.c (i370_compatible): Likewise.
4217         * cpu-sparc.c (sparc_compatible): Likewise.
4218         * cpu-h8300.c (compatible): Test in->arch == out->arch.
4220         * elflink.h: Formatting fixes.
4221         (elf_link_output_extsym): Merge undefined and undef weak cases.
4223         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
4224         when word size of input matches output word size.
4226 2002-03-12  Andreas Jaeger  <aj@suse.de>
4228         * cpu-i386.c (i386_compatible): New.  Use it instead of
4229         bfd_default_compatible.
4231 2002-03-07  H.J. Lu  (hjl@gnu.org)
4233         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
4234         as the type for bfd_reloc_val.
4236 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4238         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
4239         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
4240         (elf_hppa_final_link_relocate): Correct relocations for indirect
4241         references to local data through the DLT.  Fix .opd creation for
4242         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
4243         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
4244         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
4245         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4246         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
4247         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
4248         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4250 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
4252         * merge.c (_bfd_merge_sections): Don't segfault if there
4253         is nothing to merge due to GC.
4255 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
4257         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
4258         symbols that have been forced local.
4260         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
4261         to output forced local syms for non-shared link.
4262         (elf_link_output_extsym): Tweak condition for calling backend
4263         adjust_dynamic_symbol so that previous behaviour is kept.
4264         Whitespace changes throughout file.
4266 2002-03-04  H.J. Lu <hjl@gnu.org>
4268         * elf.c (bfd_section_from_shdr): Handle special sections,
4269         .init_array, .fini_array and .preinit_array.
4270         (elf_fake_sections): Likewise.
4272         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
4273         DT entry only if the section is in output for .init_array,
4274         .fini_array and .preinit_array. Complain about .preinit_array
4275         section in DSO.
4276         (elf_bfd_final_link): Warn zero size for .init_array,
4277         .fini_array and .preinit_array sections.
4279         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
4280         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
4281         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
4282         .preinit_array.
4284 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
4286         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
4287         * configure: Regenerate.
4289 2002-03-02  Tom Rix  <trix@redhat.com>
4291         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
4292         symbolic equiv.
4293         * coff-rs6000.c (xcoff_howto_table): Same.
4295 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
4297         * elflink.h (size_dynamic_sections): If section named
4298         ".preinit_array" exists, create DT_PREINIT_ARRAY and
4299         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
4300         ".init_array" and ".fini_array".
4301         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
4302         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
4303         DT_FINI_ARRAY.
4305 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
4307         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
4308         dynsyms.
4310 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
4312         * elf64-hppa.h: Update copyright date.
4314         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
4315         (ppc64_elf_relocate_section): Don't generate power4 style branch
4316         hints for *_BRTAKEN and *_BRNTAKEN relocs.
4318 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4320         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
4321         last patch.
4322         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4324 2002-02-21  Andreas Jaeger  <aj@suse.de>
4326         * elf64-x86-64.c: Major rework that introduces all recent changes
4327         to the x86-64 backend.  Get a closer match to elf32-i386.
4328         (struct elf64_x86_64_dyn_relocs): Rename from
4329         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
4330         all users.
4331         (struct elf64_x86_64_link_hash_table): Add short cuts to some
4332         sections.
4333         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
4334         remove casts, initialize new hash members.
4335         (create_got_section): New.
4336         (elf64_x86_64_create_dynamic_sections): New.
4337         (elf64_x86_64_copy_indirect_symbol): New.
4338         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
4339         relocs, .got or .relgot here but do it in allocate_dynrelocs.
4340         Reference count possible .plt and .got entries.  Don't test input
4341         section SEC_READONLY here to try to avoid copy relocs, and keep
4342         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
4343         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
4344         pointer to "sreloc" section in elf_section_data. Tweak condition
4345         under which .got created.  Report files with bad relocation
4346         section names.
4347         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
4348         Reference count possible .plt entries.  Don't deallocate .got and
4349         .relgot space here.
4350         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
4351         do copy reloc processing for weakdefs.  Remove redundant casts and
4352         aborts.  Delay setting of vars until needed.  Move creation of
4353         dynamic symbols and allocation of .plt and .rela.plt to
4354         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
4355         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4356         (allocate_dynrelocs): New.
4357         (readonly_dynrelocs): New.
4358         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
4359         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
4360         Zero out the dynamic allocated content space.
4361         (elf64_x86_64_discard_copies): Removed.
4362         (elf64_x86_64_relocate_section): Make use of dynamic section
4363         short-cuts.  Localise vars, and delay setting.  Better error
4364         reporting, replace BFD_ASSERT with abort.  Check
4365         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
4366         regular object file and tread the weak definition as the normal
4367         one.  Don't discard relocs for undefweak or undefined symbols and
4368         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
4369         relocs.
4370         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
4371         symbols that have been forced local.  Use same test to decide if
4372         we can use a relative reloc for got as relocate_section.  Expand
4373         SHN_UNDEF comment.  Move expressions out of function calls.
4374         Replace BFD_ASSERT with abort.
4375         (bfd_elf64_bfd_final_link): Removed.
4376         (elf_backend_copy_indirect_symbol): Define.
4378 2002-02-20  Tom Rix  <trix@redhat.com>
4380         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
4381         (_bfd_xcoff_reloc_type_lookup): Use it.
4382         * coff64-rs6000.c (xcoff64_howto_table): Same.
4383         (xcoff64_reloc_type_lookup): Same.
4385 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
4387         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
4388         little endian.
4390 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4392         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
4393         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
4394         * bfd-in2.h: Regenerate.
4395         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
4396         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
4397         with "s390:64-bit".
4398         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
4399         (elf_s390_reloc_type_lookup): Likewise.
4400         (elf_s390_check_relocs): Likewise.
4401         (elf_s390_gc_sweep_hook): Likewise.
4402         (elf_s390_relocate_section): Likewise.
4403         (elf_s390_object_p): Use renamed architecture define.
4404         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
4406 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
4408         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
4410 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
4412         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
4413         absptr -> pcrel optimization for shared libs.
4414         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
4415         library cannot be converted to pcrel.
4416         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
4417         relative.
4418         * elf32-i386.c (elf_i386_relocate_section): If
4419         _bfd_elf_section_offset returned -2, skip, but make sure the
4420         relocation is installed.
4421         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
4422         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4423         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4424         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4425         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4426         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4427         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4428         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4429         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4430         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4431         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4432         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4433         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4434         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4435         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
4436         _bfd_elf_section_offset returning -2 the same way as -1.
4437         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
4438         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
4439         and BFD_ASSERT.
4440         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
4442 2002-02-18  Tom Rix  <trix@redhat.com>
4444         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4445         (bfd_xcoff_size_dynamic_sections): Same.
4446         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
4447         (bfd_xcoff_size_dynamic_sections): Same.
4448         * coff-rs6000.c (xcoff_generate_rtinit): Same.
4449         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
4450         * libxcoff.h (struct xcoff_backend_data_rec): Same.
4451         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
4452         * bfd-in2.h: Regenerate.
4454 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
4456         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
4457         (struct ppc_link_hash_table): Add sfpr.
4458         (ppc64_elf_link_hash_table_create): Init it.
4459         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
4460         .glink out to..
4461         (create_linkage_sections): ..here.  Make .sfpr too.
4462         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
4463         dynobj early.
4464         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
4465         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
4466         ._restf* functions, and create as needed.
4467         (func_desc_adjust): Only force_local for shared libs.
4469 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
4471         * configure.in: Bump version number post 2.12 branching.
4472         * configure: Regenerate.
4474 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
4476         * mmo.c: Correct and improve comments.
4477         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
4478         zero-pad.  Use input to fill up non-empty bfd buffer.
4479         (mmo_flush_chunk): New function.
4480         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
4481         changed.  Don't emit location specifier if VMA is same as
4482         *LAST_VMAP after omitting leading zero contents.  Call
4483         mmo_flush_chunk before emitting location specifier.
4484         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
4485         with mmo_write_loc_chunk calls.
4486         (mmo_internal_write_section): Call mmo_flush_chunk after
4487         mmo_write_chunk.
4488         (mmo_write_symbols_and_terminator): Move :Main to first position
4489         in symbol array.  Add faked one if it does not exist if there are
4490         other symbols.  Don't add it if there are no symbols at all.  Move
4491         out test for value of :Main from symbol loop.  Rename table
4492         fakemain to maintable and variable mainsym to fakemain.
4494 2002-02-15  Richard Henderson  <rth@redhat.com>
4496         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
4497         section with no got matches any got.  Simplify error generaion.
4499 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
4501         Support arbitrary length fill patterns.
4502         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4503         (_bfd_default_link_order): Remove bfd_fill_link_order code.
4504         Call default_data_link_order.
4505         (default_fill_link_order): Delete.
4506         (default_data_link_order): New function.
4507         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4508         of bfd_fill_link_order with bfd_data_link_order.
4509         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4510         * elf64-mips.c (mips_elf64_final_link): Likewise.
4512         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4513         Correct value returned in "end" for "0x<non-hex>".
4515 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
4517         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
4518         (scan): Test against 'mach' field in info structure.
4520 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
4522         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
4524 2002-02-14  Matt Fredette  <fredette@netbsd.org>
4526         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
4527         EF_M68000.
4529 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
4531         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
4532         non-zero physical addresses when adjusting the LMAs of new
4533         sections.
4535 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4537         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
4538         from _bfd_elf_hppa_gen_reloc_type.
4539         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
4540         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
4541         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
4542         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
4544 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
4546         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
4547         loading its contents if there's nothing to do in it.
4549 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
4551         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
4552         64k boundary.
4554         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
4555         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
4556         (ppc64_elf_finish_dynamic_sections): Set values for them.
4558 2002-02-11  Michael Snyder  <msnyder@redhat.com>
4560         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
4561         * elf.c (elfcore_grok_pstatus): Add prototype.
4562         (elfcore_grok_lwpstatus): Add prototype.
4563         (elfcore_write_lwpstatus): New function.
4564         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
4566 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
4568         * elf32-sh.c: Added missing prototypes.
4569         * elf32-sh64.c: Likewise.
4570         (sh_elf_align_loads): Mark unused args as such.
4571         * elf64-sh64.c: Added missing prototypes.
4572         (struct elf_sh64_link_hash_entry): Fix typo.
4573         (sh_elf64_relocate_section): Fix info argument passed to
4574         _bfd_elf_section_offset.
4576 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
4578         * Makefile.am: "make dep-am".
4579         * Makefile.in: Regenerate.
4580         * aclocal.m4: Regenerate.
4581         * config.in: Regenerate.
4582         * configure: Regenerate.
4584 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
4586         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
4587         variable warnings.
4588         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
4589         comparison warning.
4590         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
4591         cast warnings for the common case.
4593 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
4595         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
4596         vectors.
4597         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
4598         vectors.
4600 2002-02-09  Richard Henderson  <rth@redhat.com>
4602         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
4603         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
4604         (elf64_alpha_relocate_section): Likewise.
4605         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
4606         * bfd-in2.h, libbfd.h: Rebuild.
4608 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
4610         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
4611         that base-plus-offset reloc accounting is consistent.
4612         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
4613         up to date for undefined symbols.
4615 2002-02-08  Eric Christopher  <echristo@redhat.com>
4617         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4619         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
4620         sections for the O32 ABI.
4622 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
4624         * elf32-arm.h: Fix formatting of _("...").
4625         * elf32-d10v.c: Likewise.
4626         * elf32-m68k.c: Likewise.
4627         * elf32-mips.c: Likewise.
4629 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
4631         * coff-or32.c: Fix compile time warning messages.
4633 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
4635         Contribute sh64-elf.
4636         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
4637         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
4638         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
4639         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
4640         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
4641         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
4642         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
4643         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
4644         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
4645         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
4646         New relocs.
4647         * libbfd.h, bfd-in2.h: Rebuilt.
4648         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
4649         (sh_reloc_map): Map them.
4650         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4651         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
4652         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
4653         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
4654         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
4655         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
4656         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
4657         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
4658         datalabel_got_offset.
4659         (sh_elf_link_hash_newfunc): Initialize it.
4660         (sh_elf_relocate_section): Augment the scope of
4661         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
4662         GOT and GOTOFF handling to new SHmedia relocation types.  Support
4663         GOT_BIAS.
4664         (sh_elf_check_relocs): Likewise.
4665         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
4666         PLT entries using movi_shori_putval.  Support GOT_BIAS.
4667         (sh_elf_finish_dynamic_sections): Likewise.
4668         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
4669         relocation, it's now done by the caller.
4670         (GOT_BIAS): New.
4671         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
4672         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
4673         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
4674         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
4675         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
4676         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
4677         sh64_elf64_hash_table): New.
4678         (sh_elf64_howto_table): Introduce new relocs.
4679         (sh_elf64_info_to_howto): Accept new PIC relocs.
4680         (sh_elf64_relocate_section): Augment the scope of
4681         seen_stt_datalabel.  Support new PIC relocs.
4682         (sh_elf64_check_relocs): Support new PIC relocs.
4683         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
4684         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
4685         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
4686         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
4687         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
4688         movi_shori_putval, movi_3shori_putval,
4689         sh64_elf64_create_dynamic_sections,
4690         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
4691         sh64_elf64_size_dynamic_sections,
4692         sh64_elf64_finish_dynamic_symbol,
4693         sh64_elf64_finish_dynamic_sections): New.
4694         (elf_backend_create_dynamic-sections,
4695         bfd_elf64_bfd_link_hash_table_create,
4696         elf_backend_adjust_dynamic_symbol,
4697         elf_backend_size_dynamic_sections,
4698         elf_backend_finish_dynamic_symbol,
4699         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
4700         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4701         elf_backend_got_header_size, elf_backend_plt_header_size):
4702         Define.
4703         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
4704         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
4705         match official numbers and names; moved unmaching ones to the
4706         range 0xf2-0xff.
4707         * elf32-sh64.c, elf64-sh64.c: Likewise.
4708         2001-03-12  DJ Delorie  <dj@redhat.com>
4709         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
4710         sections.
4711         2001-03-12  DJ Delorie  <dj@redhat.com>
4712         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
4713         be aligned.
4714         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
4715         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
4716         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
4717         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
4718         .cranges section with SEC_SORT_ENTRIES set.
4719         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
4720         incoming sorted .cranges section.
4721         (sh64_bfd_elf_copy_private_section_data): New.
4722         (sh64_elf_final_write_processing): Only sort .cranges and modify
4723         start address if called by linker.
4724         2001-01-08  Ben Elliston  <bje@redhat.com>
4725         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
4726         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
4727         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
4728         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
4729         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
4730         line.  Add comments before all entries.
4731         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
4732         comment.
4733         (sh_elf64_reloc): Correct head comment.
4734         (sh_elf64_relocate_section): Correct spacing.
4735         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
4736         instead call reloc_dangerous callback.
4737         <case R_SH_SHMEDIA_CODE>: New case.
4738         (sh_elf64_gc_mark_hook): Correct spacing.
4739         (sh_elf64_check_relocs): Ditto.
4740         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
4741         New case.
4742         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
4743         functions.
4744         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
4745         clarify describing comment.  Add comments before all entries.
4746         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
4747         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
4748         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
4749         Sort .cranges section in final link.  Prepare to set bit 0 on
4750         entry address.
4751         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
4752         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
4753         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
4754         .cranges section.
4755         (sh64_backend_section_from_shdr): New, to recognize
4756         SHT_SH5_CR_SORTED on incoming .cranges section.
4757         (elf_backend_section_from_shdr): Define.
4758         (sh64_elf_final_write_processing): Sort outgoing .cranges
4759         section.  (New, temporarily disabled:) Set bit 0 on entry address
4760         according to ISA type.
4761         (sh64_find_section_for_address): New.
4762         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
4763         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
4764         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
4765         bfd_malloc, not xmalloc.
4766         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
4767         global.
4768         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
4769         temporarily disabled) setting bit 0 on entry address.
4770         (elf_backend_final_write_processing): Define.
4771         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
4772         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
4773         be a proper relocation for PTA and PTB rather than a marker.
4774         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
4775         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
4776         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
4777         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
4778         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
4779         Zero src_mask.
4780         * elf64-sh64.c: Ditto.
4781         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
4782         * elf32-sh64.c: Include opcodes/sh64-opc.h
4783         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
4784         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
4785         parameters.  No unused parameters.  Caller changed.
4786         <case R_SH_PT_16>: New case.
4787         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
4788         * Makefile.in: Regenerate.
4789         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
4790         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
4791         all code sections.
4792         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4793         (sh64_elf_merge_private_data): Ditto.
4794         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
4795         to access stored section flags.
4796         (sh64_elf_final_write_processing): Return immediately unless
4797         called by linker.  Use sh64_elf_section_data (cranges) to get size
4798         of linker-generated cranges entries.
4799         (sh64_elf_copy_private_data): Add missing "return true".
4800         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4801         (sh_elf64_merge_private_data): Ditto.
4802         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
4803         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
4804         elf64-sh64.c:sh64_elf_fake_sections.
4805         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
4806         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
4807         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
4808         (sh64_elf_final_write_processing): New.
4809         (elf_backend_final_write_processing): Define.
4810         (sh64_elf_fake_sections): Get header flags from tdata field.
4811         (sh64_elf_copy_private_data): Do not call
4812         sh64_elf_copy_private_data_internal, just copy e_flags field.
4813         (sh64_elf_merge_private_data): Do not call
4814         sh64_elf_copy_private_data_internal.
4815         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
4816         Remove EF_SH64_ABI64, let ELF size make difference.
4817         Remove SH64-specific BFD section flag.
4818         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
4819         containing SHmedia through elf_section_data (asect)->tdata
4820         non-zero, not using a BFD section flag.
4821         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
4822         (sh64_elf_merge_private_data): Similar.
4823         (elf_backend_section_flags): Don't define.
4824         (sh64_elf_backend_section_flags): Delete.
4825         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
4826         not EF_SH64_ABI64.
4827         (sh_elf64_merge_private_data): Similar.
4828         * section.c (Section flags definitions): Don't define
4829         SEC_SH_ISA_SHMEDIA.
4830         (bfd-in2.h): Regenerate.
4831         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
4832         Make DataLabel references work with partial linking.
4833         * elf32-sh64.c: Fix formatting.
4834         (sh64_elf_link_output_symbol_hook): New.
4835         (elf_backend_link_output_symbol_hook): Define to
4836         sh64_elf_link_output_symbol_hook.
4837         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
4838         undefined if partial linking.  Adjust sanity check.
4839         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
4840         (elf_backend_link_output_symbol_hook): Define to
4841         sh64_elf64_link_output_symbol_hook.
4842         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
4843         undefined if partial linking.  Adjust sanity check.
4844         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
4845         Implement semantics for inter-file DataLabel references.
4846         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
4847         (sh64_elf64_add_symbol_hook): New.
4848         (sh_elf64_relocate_section): If passing an indirect symbol with
4849         st_type STT_DATALABEL on the way to a symbol with st_other
4850         STO_SH5_ISA32, do not bitor 1 to the relocation.
4851         (elf_backend_add_symbol_hook): Define to
4852         sh64_elf64_add_symbol_hook.
4853         * elf64-sh32.c: Tweak comments.
4854         (DATALABEL_SUFFIX): Define.
4855         (sh64_elf_add_symbol_hook): New.
4856         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
4857         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
4858         symbol with st_type STT_DATALABEL on the way to a symbol with
4859         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
4860         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
4861         Pass through STT_DATALABEL.
4862         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
4863         (elf_backend_get_symbol_type): Define.
4864         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
4865         (elf_backend_get_symbol_type): Define.
4866         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
4867         * elf32-sh64.c: Tweak comments.
4868         (sh64_elf_copy_private_data_internal): Add prototype.
4869         (bfd_elf32_bfd_set_private_flags): Define.
4870         (sh64_elf_copy_private_data_internal): Compare machine name, not
4871         textual BFD target name, to check whether to copy section flag
4872         SHF_SH5_ISA32.
4873         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
4874         Tweak section-contents-type-mismatch message.
4875         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
4876         Validize reloc-types.
4877         * elf64-sh64.c: New file.
4878         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
4879         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
4880         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
4881         Regenerate dependencies.
4882         * Makefile.in: Regenerate.
4883         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
4884         bfd_elf64_sh64l_vec.
4885         * configure.in: Handle bfd_elf64_sh64_vec and
4886         bfd_elf64_sh64l_vec.
4887         * configure: Regenerate.
4888         * po/POTFILES.in: Regenerate.
4889         * po/bfd.pot: Regenerate.
4890         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
4891         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
4892         anything else but EF_SH64 and EF_SH64_ABI64.
4893         (sh64_elf_merge_private_data): Emit error for anything else but
4894         EF_SH64 and EF_SH64_ABI64.
4895         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
4896         from targ_selvecs.
4897         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
4898         bfd_elf32_sh64l_vec as a temporary measure.
4899         * configure: Regenerate.
4900         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
4901         * cpu-sh.c (arch_info_struct): Include sh5 item
4902         unconditionalized.
4903         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
4904         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
4905         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
4906         * elf32-sh64.c: Tweak comments.
4907         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
4908         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
4909         (sh64_elf_copy_private_data_internal): Wrap long line.
4910         (sh64_elf_merge_private_data): Rewrite to allow objects from
4911         SH64 subsets to be linked together.
4912         (INCLUDE_SHMEDIA): Define.
4913         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
4914         Parenthesize plus-expression inside or-expression.
4915         <global symbol>: Ditto.
4916         (sh_elf_set_mach_from_flags): Remove code refusing
4917         deleted EF_SH64_32BIT_ABI flag.
4918         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
4919         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
4920         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
4921         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
4922         (sh_elf_relocate_section) <local symbol>: Or 1 in
4923         calculation of relocation if sym->st_other & STO_SH5_ISA32.
4924         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
4925         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
4926         relocation.
4927         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
4928         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
4929         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
4930         Regenerate dependencies.
4931         * Makefile.in: Regenerate.
4932         * archures.c: Add bfd_mach_sh5.
4933         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
4934         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
4935         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
4936         * configure: Regenerate.
4937         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
4938         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
4939         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
4940         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
4941         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
4942         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
4943         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
4944         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
4945         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
4946         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
4947         in item for SH5.
4948         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
4949         for SHmedia relocs.
4950         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
4951         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
4952         shmedia_prepare_reloc, goto final_link_relocate if it returns
4953         non-zero, else fail as before.
4954         (sh_elf_set_mach_from_flags): Provide function only if not defined
4955         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
4956         (sh_elf_set_private_flags): Provide function only if not defined
4957         as a macro.
4958         (sh_elf_copy_private_data): Similar.
4959         (sh_elf_merge_private_data): Similar.
4960         * section.c (SEC_SH_ISA_SHMEDIA): New.
4961         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
4962         * elf32-sh64.c: New file.
4963         * libbfd.h: Regenerate.
4964         * bfd-in2.h: Regenerate.
4965         * po/POTFILES.in: Regenerate.
4966         * po/bfd.pot: Regenerate.
4967         * bfd-in2.h: Regenerate.
4968         * libbfd.h: Regenerate.
4970 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
4972         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
4973         been included, not drag it in.
4974         * bfd-in2.h: Regenerate.
4976 2002-02-06  H.J. Lu  (hjl@gnu.org)
4978         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
4979         the mach and ISA fields if necessary.
4981 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
4983         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
4984         ARM architecture when an F_ARM_5 flag is detected, since we cannot
4985         be sure exactly which architecture this represents.
4987 2002-02-05  Nick Clifton  <nickc@redhat.com>
4989         * po/tr.po: Updated translation.
4991 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
4993         From Jimi X <jimix@watson.ibm.com>
4994         * archures (bfd_mach_ppc64): Define.
4995         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
4996         (bfd_powerpc_arch): Define.
4997         * bfd-in2.h: Regenerate.
4998         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
4999         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
5000         (bfd_powerpc_archs): Add default powerpc64 arch.
5002 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
5004         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
5005         against section syms in readonly sections.  Don't do the global
5006         sym check if we find one.
5007         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
5008         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
5009         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
5010         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
5011         (elf_s390_grok_prstatus): Add missing prototype.
5013 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
5015         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
5016         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
5017         Call bfd_get_section_by_name only once.  Initialize
5018         bpodata->n_bpo_relocs_this_section.
5019         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
5020         referring to DSOs.
5021         (bpo_reloc_request_sort_fn): Don't use difference of values as
5022         return-value.
5024 2002-02-02  David O'Brien  <obrien@FreeBSD>
5026         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
5027         version 4.5 and later the same as 5-CURRENT.
5028         * configure: Re-generate.
5030 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
5032         * config.bfd (hppa*-*-netbsd*): New target.
5034 2002-01-31  Philipp Thomas  <pthomas@suse.de>
5036         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
5037         to front of message. Unify messages with elf32-arm.h. Use
5038         commas where neccessary.
5039         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
5040         ERROR in messages. Unify messages with coff-arm.c. Correct
5041         VFP/FPA error message.
5042         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
5043         APCS-32 for translation.
5045 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
5047         Perform on-demand global register allocation from
5048         R_MMIX_BASE_PLUS_OFFSET relocs.
5049         * elf64-mmix.c (struct bpo_reloc_section_info, struct
5050         bpo_reloc_request, struct bpo_greg_section_info): New.
5051         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
5052         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
5053         _bfd_mmix_check_all_relocs,
5054         _bfd_mmix_prepare_linker_allocated_gregs,
5055         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
5056         (elf_mmix_howto_table): Correct src_mask for most relocs.
5057         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
5058         case.
5059         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
5060         case.  Fix typo in comment.  New label do_mmix_reloc.
5061         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
5062         store first object file with a base-plus-offset reloc.  Call
5063         mmix_elf_check_common_relocs for the part common with mmo.
5064         (mmix_elf_final_link): Write out linker-allocated register
5065         contents section.
5066         (elf_backend_gc_sweep_hook): Define.
5067         (bfd_elf64_bfd_relax_section): Define.
5069         * mmo.c: Don't include <ctype.h>
5070         (mmo_init): Correct init-once logic.
5072 2002-02-01  Tom Rix  <trix@redhat.com>
5074         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
5076 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
5078         * Makefile.am: Run "make dep-am"
5079         * Makefile.in: Regenerate.
5081 2002-01-31  David O'Brien  <obrien@FreeBSD>
5083         * configure.in: Recognize the differences in core files from FreeBSD
5084         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
5085         5-CURRENT.
5086         * configure: Regenerate.
5088 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
5090         * coff-or32.c: New file.
5091         * cpu-or32.c: New file.
5092         * elf32-or32.c: New file.
5093         * archures.c: Add support for or32.
5094         * targets.c: Add support for or32.
5095         * bfd-in2.h: Regenerate.
5096         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
5097         coff_write_object_contents): Add support for or32.
5098         * config.bfd: Add target.
5099         * configure.in: Add support for or32.
5100         * configure: Regenerate.
5101         * Makefile.am: Add support for or32.
5102         * Makefile.in: Regenerate.
5103         * po/SRC-POTFILES.in: Add or32 files.
5104         * po/bfd.pot: Regenerate.
5106 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
5107             Don Lindsay  <lindsayd@cisco.com>
5109         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
5110         false' with a return of a bfd_reloc_ error code.
5112 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
5114         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
5115         unexport unreferenced symbols when --export-dynamic.  Call
5116         _bfd_elf_strtab_delref when unexporting.
5118 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
5120         * bfd-in.h: Include <stdbool.h> if it is available.
5121         * bfd-in2.h: Regenerated.
5123 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
5125         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
5126         not go via the plt.
5128 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
5130         * archures.c: Tidy up formatting of embedded comments.
5131         * bfd.c: Tidy up formatting of embedded comments.
5132         * bfd-in.h: Fix formatting of comments.
5133         * reloc.c: Tidy up formatting of ordinary & embedded comments.
5134         * section.c: Tidy up formatting of embedded comments.
5135         * syms.c: Tidy up formatting of embedded comments.
5136         * targets.c: Tidy up formatting of embedded comments.
5138         * bfd-in2.h: Regenerate.
5140 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
5142         * vms-tir.c (cmd_name): New function.
5143         (tir_cmd_name): New function.
5144         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
5145         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
5146         Fix formatting.
5148         * peXXigen.c (pe_print_idata): Rearrange message to aid in
5149         translation.
5150         (pe_print_pdata):  Rearrange message to aid in translation.
5152         * libbfd.c (warn_deprecated): Rearrange error message to aid in
5153         translation.
5155         * ihex.c (ihex_write_object_contents): Fix spelling typo.
5157         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
5159         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
5160         message to aid in translation.
5162         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
5163         to aid in translation.
5165         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
5167 2002-01-30  Philipp Thomas  <pthomas@suse.de>
5169         * coff-arm.c, elf32-elf.h: Unify messages.
5171 2002-01-30  Nick Clifton <nickc@redhat.com>
5173         * po/sv.po: Updated translation.
5175 2002-01-30  Philipp Thomas  <pthomas@suse.de>
5177         * dwarf2.c (read_abbrev): Use full section name in error message.
5178         (decode_line_info): Likewise.
5180         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
5181         message.
5183 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
5185         * elf64-ppc.c (func_desc_adjust): Only provide missing function
5186         descriptor symbols for undefined function code syms.  Clear
5187         ELF_LINK_NON_ELF so that they can stay weak.
5189 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
5190             Mitch Lichtenberg  <mpl@broadcom.com>
5192         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
5193         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
5194         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
5195         generation.
5196         * bfd-in2.h: Regenerate.
5198 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
5200         * elf32-mips.c: Add additional comments about HI16 relocation
5201         processing.
5202         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
5203         pc-relative relocations.  (Reverts change made on 2001-10-31.)
5204         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
5205         for pc-relative relocations.
5206         (mips_elf_calculate_relocation): Add a comment about a kludge
5207         in the R_MIPS_GNU_REL_HI16 handling.
5208         (_bfd_mips_elf_relocate_section): Implement that kludge;
5209         adjust pc-relative HI16 relocation for difference in HI16 and
5210         LO16 addresses, since it can't easily be done in
5211         mips_elf_calculate_relocation.
5213 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5215         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
5216         relocations with PC32 relocations for undefined or weak symbols.
5217         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
5218         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
5220 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
5222         * elfcore.h (elf_core_file_p): Improve comment for last change.
5224 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
5226         * configure: Regenerated.
5228 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
5230         * elfcore.h (elf_core_file_p): Set the machine architecture
5231         before processing the program headers.
5233 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
5235         * configure.in <64-bit configuration>: If using gcc, check and
5236         emit error for egcs-1.1.2.
5237         * configure: Regenerate.
5239 2002-01-26  Egor Duda  <deo@logos-m.ru>
5241         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
5242         as possible to avoid stack corruption.
5244 2002-01-26  Richard Henderson  <rth@redhat.com>
5246         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
5247         for non-allocated sections.
5249 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
5251         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
5252         prstat.pr_reg even if it is a struct.
5254 2002-01-25  Steve Ellcey <sje@cup.hp.com>
5256         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
5258 2002-01-25  Philipp Thomas  <pthomas@suse.de>
5260         * coffgen.c (coff_print_symbol): Don't mark info message
5261         for translation.
5263 2002-01-25  Nick Clifton <nickc@redhat.com>
5265         * po/fr.po: Updated translation.
5266         * po/es.po: Updated translation.
5268 2002-01-25  Philipp Thomas  <pthomas@suse.de>
5270         * coff-alpha.c (alpha_relocate_section): Unify warning message
5271         for GP relative relocations without GP defined.
5272         * coff-mips.c (mips_relocate_section): Likewise.
5274 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
5276         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
5277         unsigned overflow when new_offset < old_offset.
5279 2002-01-24  Philipp Thomas  <pthomas@suse.de>
5281         * bfd.c (_bfd_abort): Fix typo.
5283 2002-01-23  Richard Henderson  <rth@redhat.com>
5285         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
5286         plt entries for undefweak symbols.
5288 2002-01-23  Steve Ellcey <sje@cup.hp.com>
5290         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
5291         (bfd_elf64_ia64_hpux_big_vec): Ditto.
5292         (bfd_elf32_h8300_vec): Ditto.
5294 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
5296         * elf64-ppc.c: Remove stale part of ABI comment.
5297         (NO_OPD_RELOCS): Define.
5298         (ppc64_elf_check_relocs): Use it.
5299         (ppc64_elf_relocate_section): Here too.
5300         (build_one_stub): Don't point function syms at the stub.  Instead,
5301         hijack plt.offset.
5302         (ppc64_elf_relocate_section): Check whether REL24 relocs should
5303         really go to the stub.  Make all dynamic relocs in opd against
5304         locals.
5305         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
5306         plt.offset.
5308 2002-01-22  Richard Henderson  <rth@redhat.com>
5310         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
5312 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
5314         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
5315         TOC_BASE_OFF adjustment.
5317         * Makefile.am: Run "make dep-am".
5318         * Makefile.in: Regenerate.
5319         * po/SRC-POTFILES.in: Regenerate.
5321 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5323         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
5324         host defines.
5326 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
5328         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
5329         Check for and emit error if sgot is NULL at this point.
5331 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
5333         * config.bfd (ia64*-*-netbsd*): New target.
5335 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
5337         * som.c (som_write_space_strings): Comment typo fix.
5339 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
5341         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
5342         is_func_descriptor fields.
5343         (link_hash_newfunc): Init them.
5344         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
5345         dot are candidates for plt entries.  When processing .opd relocs,
5346         set function descriptor strings to point inside function code
5347         string, and set new ppc_link_hash_entry fields.
5348         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
5349         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
5350         function descriptors.  It's now done in..
5351         (func_desc_adjust): New.
5352         (ppc64_elf_func_desc_adjust): New.
5353         (define elf_backend_always_size_sections): Define.
5354         (ppc64_elf_hide_symbol): New.
5355         (define elf_backend_hide_symbol): Define.
5356         (allocate_dynrelocs): Remove code looking up function descriptors
5357         as that has been done earlier.
5358         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
5359         table.
5360         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
5361         up function descriptor.
5362         (build_one_stub): Look up the function code sym.  Check for
5363         invalid plt offsets.
5364         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
5365         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
5367         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
5368         boolean param.
5369         (_bfd_elf_link_hash_hide_symbol): Likewise.
5370         * elflink.h (elf_link_add_object_symbols): Adjust call to
5371         elf_backend_hide_symbol.
5372         (elf_fix_symbol_flags): Likewise.
5373         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
5374         than bfd_alloc.
5375         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
5376         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
5377         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
5378         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
5379         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
5380         and adjust to suit.
5381         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
5382         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
5383         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
5385 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
5387         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
5388         dynamic function descriptor symbol, not the associated function
5389         symbol.
5391 2002-01-17  Eric Christopher  <echristo@redhat.com>
5393         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
5395 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
5397         * po/bfd.pot: Regenerate.
5398         * po/fr.po: Regenerate.
5400 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
5402         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
5403         Remove "Elf_Internal_Shdr *" param.
5404         (_bfd_mips_elf_section_from_bfd_section): Ditto.
5405         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
5406         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
5407         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
5408         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
5409         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
5410         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
5411         function to override special sections.  Remove hdr arg from
5412         backend call, and don't loop.
5414 2002-01-16  Eric Christopher  <echristo@redhat.com>
5416         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
5417         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
5418         relocations requiring gp0 and gp.
5420 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
5422         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
5423         EF_ARM_VFP_FLOAT.
5424         (elf32_arm_print_private_bfd_data): Likewise.
5426 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
5428         * po/tr.po: Import new version.
5430 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5432         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
5433         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
5434         (ORI_R0_R0_0): Correct.
5436 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5438         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
5439         when plt_not_loaded.
5440         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
5441         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
5442         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
5443         (ppc64_elf_glink_code): Delete.
5444         (PPC64_ELF_GLINK_SIZE): Delete.
5445         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
5446         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
5447         ORI_R0_R0_0): Define.
5448         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
5449         (struct ppc_link_hash_table): Add sstub and plt_overflow.
5450         (ppc64_elf_link_hash_table_create): Init them.
5451         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
5452         Don't copy to shared lib.
5453         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
5454         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
5455         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
5456         room for .stub and .glink code.
5457         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
5458         DT_PPC64_GLINK.
5459         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
5460         bfd_elf64_bfd_final_link.
5461         (bfd_elf64_bfd_final_link): Don't define.
5462         (ppc64_elf_size_stubs): New.
5463         (build_plt_stub): New.
5464         (build_one_stub): New.
5465         (ppc64_elf_build_stubs): New.
5466         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
5467         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
5468         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
5469         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
5470         case output sections not separate.  Adjust DT_RELASZ to not
5471         include plt relocs.  Set reserved got entry.  Set got and plt
5472         entry size.
5473         (elf_backend_got_header_size): Set to 8.
5474         * elf64-ppc.h: New file.
5476 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5478         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
5479         sections, use bfd_section_list_remove.
5480         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5481         * elflink.h (elf_link_add_object_symbols): When removing all
5482         sections, use bfd_section_list_clear.
5484 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
5486         * po/sv.po: New file: Swedish translation.
5487         * configure.in (ALL_LINGUAS): Add sv.
5488         * configure: Regenerate.
5490 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
5492         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
5493         * elf.c (merge_sections_remove_hook): New function.
5494         (_bfd_elf_merge_sections): Pass it as 3rd argument to
5495         _bfd_merge_sections.
5496         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
5497         * libbfd.h: Rebuilt.
5498         * merge.c (_bfd_merge_sections): Add remove_hook argument.
5499         Call remove_hook if a SEC_EXCLUDE section is encountered.
5501 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
5503         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5504         (xstormy16_reloc_map): Initialise new field with correct howto
5505         table.
5506         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5507         howto entry.
5509 2002-01-10  Michael Snyder  <msnyder@redhat.com>
5511         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5512         (elfcore_write_pstatus): Use long instead of pid_t;
5513         * elf-bfd.h: Change prototypes to use long instead of pid_t;
5515 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
5517         * elf.c: Update copyright years.
5518         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
5519         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
5521 2002-01-08  Michael Snyder  <msnyder@redhat.com>
5523         Add capability to write corefile note sections, for gdb.
5524         * elf.c (elfcore_write_note): New function.
5525         (elfcore_write_prpsinfo): New function.
5526         (elfcore_write_prstatus): New function.
5527         (elfcore_write_pstatus): New function.
5528         (elfcore_write_prfpreg): New function.
5529         (elfcore_write_prxfpreg): New function.
5530         * elf-bfd.h: Add prototypes for above functions.
5532 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
5534         * elf.c (elf_fake_sections): Propagate errors from
5535         elf_backend_fake_section.
5537 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
5539         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
5540         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
5541         (elf32-sh-nbsd.lo): New rule.
5542         * Makefile.in: Regenerate.
5543         * config.bfd (sh*le-*-netbsdelf*): New target.
5544         (sh*-*-netbsdelf*): New target.
5545         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
5546         (bfd_elf32_shnbsd_vec): New vector.
5547         (bfd_elf32_shlnbsd_vec): New vector.
5548         * configure: Regenerate.
5549         * elf32-sh-nbsd.c: New file.
5550         * targets.c: Update copyright years.
5551         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
5552         bfd_elf32_shnbsd_vec.
5554 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
5556         * coff-rs6000.c (READ20): Use bfd_scan_vma.
5558 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
5560         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
5561         of a symbol in a section that will be deleted.
5563 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
5565         * po/es.po: New file: Spanish translation.
5566         * configure.in (ALL_LINGUAS): Add es.
5567         * configure: Regenerate.
5569 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
5571         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
5572         argument so we can handle HP-UX specially.
5573         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
5574         (elfNN_hpux_backend_section_from_bfd_section): New for support
5575         of SHN_IA_64_ANSI_COMMON.
5576         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
5577         (is_unwind_section_name): Add special HP-UX support.
5578         (elfNN_ia64_section_from_shdr): Add support for more sections.
5579         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
5580         add support for more sections.
5581         (elfNN_ia64_additional_program_headers): Modify
5582         is_unwind_section_name call.
5583         (elfNN_ia64_modify_segment_map): Remove assumption that there is
5584         only one unwind section in segment.
5586 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
5588         * syms.c (_bfd_generic_make_empty_symbol): New function.
5589         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
5590         _bfd_generic_make_empty_symbol.
5591         * libbfd.h: Regenerate.
5592         * bfd-in2.h: Regenerate.
5593         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
5594         (hppabsd_core_get_symtab_upper_bound): Don't define.
5595         (hppabsd_core_get_symtab): Likewise.
5596         (hppabsd_core_print_symbol): Likewise.
5597         (hppabsd_core_get_symbol_info): Likewise.
5598         (hppabsd_core_bfd_is_local_label_name): Likewise.
5599         (hppabsd_core_get_lineno): Likewise.
5600         (hppabsd_core_find_nearest_line): Likewise.
5601         (hppabsd_core_bfd_make_debug_symbol): Likewise.
5602         (hppabsd_core_read_minisymbols): Likewise.
5603         (hppabsd_core_minisymbol_to_symbol): Likewise.
5604         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
5605         Formatting fixes.
5606         * hpux-core.c: Similarly.
5607         * irix-core.c: Similarly.
5608         * osf-core.c: Similarly.
5609         * sco5-core.c: Similarly.
5610         * binary.c (binary_make_empty_symbol): Remove function, define as
5611         _bfd_generic_make_empty_symbol.
5612         * ihex.c (ihex_make_empty_symbol): Likewise.
5613         * mmo.c (mmo_make_empty_symbol): Likewise.
5614         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
5615         * srec.c (srec_make_empty_symbol): Likewise.
5616         * versados.c (versados_make_empty_symbol): Likewise.
5617         * vms.c (_bfd_vms_make_empty_symbol): Remove.
5618         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
5619         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
5620         rather than _bfd_vms_make_empty_symbol.
5621         * vms-misc.c (new_symbol): Likewise.
5623 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
5625         * section.c (bfd_section_init): Remove unnecessary initialisations.
5626         (bfd_section_list_clear): New function.
5627         (bfd_section_list_remove, bfd_section_list_insert): New macros.
5628         (_bfd_strip_section_from_output): Use them.
5629         * coffcode.h (coff_set_alignment_hook): Likewise.
5630         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
5631         * elf64-mips.c (mips_elf64_final_link): Likewise.
5632         * elf64-mmix.c (mmix_elf_final_link): Likewise.
5633         * sunos.c (sunos_add_dynamic_symbols): Likewise.
5634         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
5635         * bfd-in2.h: Regenerate.
5637         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
5638         rather than doing our own section handling.  Clean up after errors
5639         with bfd_release and bfd_section_list_clear.  Handle unexpected
5640         flags.
5641         * aoutf1.h (sunos4_core_file_p): Likewise.
5642         * aix386-core.c (aix386_core_file_p): Likewise.
5643         * cisco-core.c (cisco_core_file_validate): Likewise.
5644         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
5645         * trad-core.c (trad_unix_core_file_p): Likewise.
5647         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
5648         with bfd_release and bfd_section_list_clear.
5649         * hpux-core.c (hpux_core_core_file_p): Likewise.
5650         * irix-core.c (irix_core_core_file_p): Likewise.
5651         * lynx-core.c (lynx_core_file_p): Likewise.
5652         * osf-core.c (osf_core_core_file_p): Likewise.
5653         * rs6000-core.c (rs6000coff_core_p): Likewise.
5654         * sco5-core.c (sco5_core_file_p): Likewise.
5656         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
5657         sign extension adjustments without conditionals.
5659 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
5661         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
5662         CIE at .eh_frame start is removed due to no FDEs referencing it.
5664 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
5666         * config.bfd (x86_64-*-netbsd*): New target.
5667         * configure.in (x86_64-*-netbsd*): Set COREFILE
5668         to netbsd-core.lo.
5669         * configure: Regenerated.
5671 2002-01-03  Tom Rix  <trix@redhat.com>
5673         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
5674         for recent bfd_make_section_anyway change.
5676 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
5678         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5679         R_ARM_THM_PC11 reloc.
5681 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
5683         * configure.in (LINGUAS): Add ja.
5684         * configure: Regenerate.
5685         * po/ja.po: Import from translation project's web site.
5687 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
5689         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
5690         messages to ease translation into other languages.
5692 For older changes see ChangeLog-0001
5694 Local Variables:
5695 mode: change-log
5696 left-margin: 8
5697 fill-column: 74
5698 version-control: never
5699 End: