Commit Graph

1770 Commits

Author SHA1 Message Date
Alan Modra e55c0b759b daily update 2002-02-10 23:00:43 +00:00
Hans-Peter Nilsson e58ee0cdf8 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
vectors.
	(sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
	vectors.
2002-02-10 20:37:45 +00:00
Alan Modra a457174303 daily update 2002-02-09 23:00:09 +00:00
Richard Henderson 7793f4d007 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
(elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
        (elf64_alpha_relocate_section): Likewise.
        * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
        * bfd-in2.h, libbfd.h: Rebuild.
2002-02-09 22:53:53 +00:00
Hans-Peter Nilsson 7e79904489 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
that base-plus-offset reloc accounting is consistent.
	(mmix_elf_relax_section): Keep base-plus-offset reloc accounting
	up to date for undefined symbols.
2002-02-09 05:04:27 +00:00
Eric Christopher 027d73eb18 2002-02-08 Eric Christopher <echristo@redhat.com>
From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
	sections for the O32 ABI.
2002-02-09 04:40:18 +00:00
Alan Modra dc9ed0e9f1 daily update 2002-02-08 23:00:05 +00:00
Chris Demetriou 517662d4e0 2002-02-08 Chris Demetriou <cgd@broadcom.com>
* elf32-arm.h: Fix formatting of _("...").
        * elf32-d10v.c: Likewise.
        * elf32-m68k.c: Likewise.
        * elf32-mips.c: Likewise.
2002-02-08 19:18:35 +00:00
Nick Clifton 5e37cc4676 Fix compile time warning messages 2002-02-08 12:12:15 +00:00
Alexandre Oliva fbca6ad9f3 Contribute sh64-elf.
2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
* reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
New relocs.
* libbfd.h, bfd-in2.h: Rebuilt.
* elf32-sh.c (sh_elf_howto_table): Define new relocs.
(sh_reloc_map): Map them.
(PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
movi_shori_putval) [INCLUDE_SHMEDIA]: New.
(elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
datalabel_got_offset.
(sh_elf_link_hash_newfunc): Initialize it.
(sh_elf_relocate_section): Augment the scope of
seen_stt_datalabel.  Introduce GOTPLT support.	Extend GOTPC, PLT,
GOT and GOTOFF handling to new SHmedia relocation types.  Support
GOT_BIAS.
(sh_elf_check_relocs): Likewise.
(sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
PLT entries using movi_shori_putval.  Support GOT_BIAS.
(sh_elf_finish_dynamic_sections): Likewise.
* elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
relocation, it's now done by the caller.
(GOT_BIAS): New.
* elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
sh64_elf64_hash_table): New.
(sh_elf64_howto_table): Introduce new relocs.
(sh_elf64_info_to_howto): Accept new PIC relocs.
(sh_elf64_relocate_section): Augment the scope of
seen_stt_datalabel.  Support new PIC relocs.
(sh_elf64_check_relocs): Support new PIC relocs.
(elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
movi_shori_putval, movi_3shori_putval,
sh64_elf64_create_dynamic_sections,
sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
sh64_elf64_size_dynamic_sections,
sh64_elf64_finish_dynamic_symbol,
sh64_elf64_finish_dynamic_sections): New.
(elf_backend_create_dynamic-sections,
bfd_elf64_bfd_link_hash_table_create,
elf_backend_adjust_dynamic_symbol,
elf_backend_size_dynamic_sections,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
elf_backend_plt_readonly, elf_backend_want_plt_sym,
elf_backend_got_header_size, elf_backend_plt_header_size):
Define.
2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
* elf32-sh.c: Renumbered and renamed some SH5 relocations to
match official numbers and names; moved unmaching ones to the
range 0xf2-0xff.
* elf32-sh64.c, elf64-sh64.c: Likewise.
2001-03-12  DJ Delorie	<dj@redhat.com>
* elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
sections.
2001-03-12  DJ Delorie	<dj@redhat.com>
* elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
be aligned.
* elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2001-01-14  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
(sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
.cranges section with SEC_SORT_ENTRIES set.
(sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
incoming sorted .cranges section.
(sh64_bfd_elf_copy_private_section_data): New.
(sh64_elf_final_write_processing): Only sort .cranges and modify
start address if called by linker.
2001-01-08  Ben Elliston  <bje@redhat.com>
* elf32-sh64.c (sh64_elf_final_write_processing): Activate
Hans-Peter Nilsson's set bit 0 patch from	2001-01-06.
* elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
line.  Add comments before all entries.
<R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
comment.
(sh_elf64_reloc): Correct head comment.
(sh_elf64_relocate_section): Correct spacing.
<relocating for a local symbol>: Do not honour STO_SH5_ISA32;
instead call reloc_dangerous callback.
<case R_SH_SHMEDIA_CODE>: New case.
(sh_elf64_gc_mark_hook): Correct spacing.
(sh_elf64_check_relocs): Ditto.
* elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
New case.
* elf32-sh.c: Correct #endif comments for #ifndef-wrapped
functions.
(sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
clarify describing comment.  Add comments before all entries.
(sh_elf_relocate_section) <relocating for a local symbol>: Do not
honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
Sort .cranges section in final link.  Prepare to set bit 0 on
entry address.
* elf32-sh64.c (struct sh64_find_section_vma_data): New.
(sh64_elf_link_output_symbol_hook): Fix typo in prototype.
(sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
.cranges section.
(sh64_backend_section_from_shdr): New, to recognize
SHT_SH5_CR_SORTED on incoming .cranges section.
(elf_backend_section_from_shdr): Define.
(sh64_elf_final_write_processing): Sort outgoing .cranges
section.  (New, temporarily disabled:) Set bit 0 on entry address
according to ISA type.
(sh64_find_section_for_address): New.
(crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
(sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
bfd_malloc, not xmalloc.
(sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
global.
* elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
temporarily disabled) setting bit 0 on entry address.
(elf_backend_final_write_processing): Define.
2001-01-05  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
be a proper relocation for PTA and PTB rather than a marker.
<R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
Zero src_mask.
* elf64-sh64.c: Ditto.
(sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
* elf32-sh64.c: Include opcodes/sh64-opc.h
(shmedia_prepare_reloc): Take a bfd_link_info pointer as first
argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
parameters.  No unused parameters.  Caller changed.
<case R_SH_PT_16>: New case.
* Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
* Makefile.in: Regenerate.
2000-12-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
all code sections.
(sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
(sh64_elf_merge_private_data): Ditto.
* elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
to access stored section flags.
(sh64_elf_final_write_processing): Return immediately unless
called by linker.  Use sh64_elf_section_data (cranges) to get size
of linker-generated cranges entries.
(sh64_elf_copy_private_data): Add missing "return true".
(sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
(sh_elf64_merge_private_data): Ditto.
2000-12-19  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
elf64-sh64.c:sh64_elf_fake_sections.
(elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
(sh64_elf_final_write_processing): New.
(elf_backend_final_write_processing): Define.
(sh64_elf_fake_sections): Get header flags from tdata field.
(sh64_elf_copy_private_data): Do not call
sh64_elf_copy_private_data_internal, just copy e_flags field.
(sh64_elf_merge_private_data): Do not call
sh64_elf_copy_private_data_internal.
2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
Remove EF_SH64_ABI64, let ELF size make difference.
Remove SH64-specific BFD section flag.
* elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
containing SHmedia through elf_section_data (asect)->tdata
non-zero, not using a BFD section flag.
(sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
(sh64_elf_merge_private_data): Similar.
(elf_backend_section_flags): Don't define.
(sh64_elf_backend_section_flags): Delete.
* elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
not EF_SH64_ABI64.
(sh_elf64_merge_private_data): Similar.
* section.c (Section flags definitions): Don't define
SEC_SH_ISA_SHMEDIA.
(bfd-in2.h): Regenerate.
2000-12-09  Hans-Peter Nilsson	<hpn@cygnus.com>
Make DataLabel references work with partial linking.
* elf32-sh64.c: Fix formatting.
(sh64_elf_link_output_symbol_hook): New.
(elf_backend_link_output_symbol_hook): Define to
sh64_elf_link_output_symbol_hook.
(sh64_elf_add_symbol_hook): Make DataLabel symbol just global
undefined if partial linking.  Adjust sanity check.
* elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
(elf_backend_link_output_symbol_hook): Define to
sh64_elf64_link_output_symbol_hook.
(sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
undefined if partial linking.  Adjust sanity check.
2000-12-07  Hans-Peter Nilsson	<hpn@cygnus.com>
Implement semantics for inter-file DataLabel references.
* elf64-sh64.c (DATALABEL_SUFFIX): Define.
(sh64_elf64_add_symbol_hook): New.
(sh_elf64_relocate_section): If passing an indirect symbol with
st_type STT_DATALABEL on the way to a symbol with st_other
STO_SH5_ISA32, do not bitor 1 to the relocation.
(elf_backend_add_symbol_hook): Define to
sh64_elf64_add_symbol_hook.
* elf64-sh32.c: Tweak comments.
(DATALABEL_SUFFIX): Define.
(sh64_elf_add_symbol_hook): New.
(elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
* elf32-sh.c (sh_elf_relocate_section): If passing an indirect
symbol with st_type STT_DATALABEL on the way to a symbol with
st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2000-12-05  Hans-Peter Nilsson	<hpn@cygnus.com>
Pass through STT_DATALABEL.
* elf32-sh64.c (sh64_elf_get_symbol_type): New.
(elf_backend_get_symbol_type): Define.
* elf64-sh64.c (sh64_elf64_get_symbol_type): New.
(elf_backend_get_symbol_type): Define.
2000-11-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh64.c: Tweak comments.
(sh64_elf_copy_private_data_internal): Add prototype.
(bfd_elf32_bfd_set_private_flags): Define.
(sh64_elf_copy_private_data_internal): Compare machine name, not
textual BFD target name, to check whether to copy section flag
SHF_SH5_ISA32.
(sh64_elf_merge_private_data): Validize bfd_get_arch_size.
Tweak section-contents-type-mismatch message.
(shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
Validize reloc-types.
* elf64-sh64.c: New file.
* targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
* Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
(BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
Regenerate dependencies.
* Makefile.in: Regenerate.
* config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
bfd_elf64_sh64l_vec.
* configure.in: Handle bfd_elf64_sh64_vec and
bfd_elf64_sh64l_vec.
* configure: Regenerate.
* po/POTFILES.in: Regenerate.
* po/bfd.pot: Regenerate.
2000-11-29  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
anything else but EF_SH64 and EF_SH64_ABI64.
(sh64_elf_merge_private_data): Emit error for anything else but
EF_SH64 and EF_SH64_ABI64.
* config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
from targ_selvecs.
* configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
bfd_elf32_sh64l_vec as a temporary measure.
* configure: Regenerate.
2000-11-27  Hans-Peter Nilsson	<hpn@cygnus.com>
* cpu-sh.c (arch_info_struct): Include sh5 item
unconditionalized.
* config.bfd (sh64-*-elf*): Do not set targ_cflags.
Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
* elf32-sh64.c: Tweak comments.
(sh64_elf_set_mach_from_flags): Recognize all machine flags that
are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
(sh64_elf_copy_private_data_internal): Wrap long line.
(sh64_elf_merge_private_data): Rewrite to allow objects from
SH64 subsets to be linked together.
(INCLUDE_SHMEDIA): Define.
* elf32-sh.c (sh_elf_relocate_section) <local symbol>:
Parenthesize plus-expression inside or-expression.
<global symbol>: Ditto.
(sh_elf_set_mach_from_flags): Remove code refusing
deleted EF_SH64_32BIT_ABI flag.
2000-11-26  Hans-Peter Nilsson	<hpn@cygnus.com>
* elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
(sh_elf_relocate_section) <local symbol>: Or 1 in
calculation of relocation if sym->st_other & STO_SH5_ISA32.
<global symbol>: Ditto if h->other & STO_SH5_ISA32.
* elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
relocation.
2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
* Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
Regenerate dependencies.
* Makefile.in: Regenerate.
* archures.c: Add bfd_mach_sh5.
* config.bfd: Map targ_cpu sh* to bfd_sh_arch.
Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
* configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
* configure: Regenerate.
* reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
* cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
in item for SH5.
* elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
for SHmedia relocs.
[INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
[INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
shmedia_prepare_reloc, goto final_link_relocate if it returns
non-zero, else fail as before.
(sh_elf_set_mach_from_flags): Provide function only if not defined
as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
(sh_elf_set_private_flags): Provide function only if not defined
as a macro.
(sh_elf_copy_private_data): Similar.
(sh_elf_merge_private_data): Similar.
* section.c (SEC_SH_ISA_SHMEDIA): New.
* targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
* elf32-sh64.c: New file.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
* po/POTFILES.in: Regenerate.
* po/bfd.pot: Regenerate.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2002-02-08 05:33:27 +00:00
Alan Modra c7ef9c3fe5 daily update 2002-02-07 23:00:05 +00:00
Daniel Jacobowitz e108f47052 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
        been included, not drag it in.
        * bfd-in2.h: Regenerate.
2002-02-07 22:28:31 +00:00
Alan Modra 98b969a551 daily update 2002-02-06 23:00:05 +00:00
H.J. Lu 259d18a35d 2002-02-06 H.J. Lu (hjl@gnu.org)
* elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
	the mach and ISA fields if necessary.
2002-02-06 21:34:17 +00:00
Nick Clifton f13b834e1d Select the highest known ARM architecture when an F_ARM_5 flag is detected,
since we cannot be sure exactly which architecture this represents.
2002-02-06 16:29:28 +00:00
Alan Modra 91542be942 daily update 2002-02-05 23:00:06 +00:00
Nick Clifton 82f6addb56 Updated Turkish translations 2002-02-05 10:25:59 +00:00
Alan Modra 899f54f5ee * archures (bfd_mach_ppc64): Define.
(bfd_powerpc_arch): Rename to bfd_powerpc_archs.
	(bfd_powerpc_arch): Define.
	* bfd-in2.h: Regenerate.
	* cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
	(bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
	(bfd_powerpc_archs): Add default powerpc64 arch.

	* gas/ppc/test1elf64.d: Tweak arch name.
2002-02-05 03:35:19 +00:00
Alan Modra 248866a8f5 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
against section syms in readonly sections.  Don't do the global
	sym check if we find one.
	* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
	* elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
	* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
	(elf_s390_grok_prstatus): Add missing prototype.
2002-02-05 00:00:23 +00:00
Alan Modra 911a6141c7 daily update 2002-02-04 23:00:06 +00:00
Hans-Peter Nilsson 4fa5c2a8c0 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
(mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
	Call bfd_get_section_by_name only once.  Initialize
	bpodata->n_bpo_relocs_this_section.
	(_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
	referring to DSOs.
	(bpo_reloc_request_sort_fn): Don't use difference of values as
	return-value.
2002-02-04 04:45:08 +00:00
Alan Modra 5624d0a9f3 daily update 2002-02-03 23:00:05 +00:00
Alan Modra 6e525bfb9d daily update 2002-02-02 23:00:04 +00:00
David O'Brien 537c972e14 2002-02-02 David O'Brien <obrien@FreeBSD>
* configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
	version 4.5 and later the same as 5-CURRENT.
	* configure: Re-generate.
2002-02-02 20:43:38 +00:00
Jason Thorpe 006336b8fe bfd:
* config.bfd (hppa*-*-netbsd*): New target.

gas:
* configure.in (hppa-*-netbsd*): New target.
* configure: Regenerate.
* config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
(ehppanbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (hppa*-*-netbsd*): New target.
* emulparams/hppalinux.sh: Add comment to check other files
that source this file it is modified, and list which
files that do.
* emulparams/hppanbsd.sh: New file.
2002-02-02 18:36:04 +00:00
Alan Modra 121e3e3557 daily update 2002-02-01 23:00:06 +00:00
Philipp Thomas 6c571f0083 2002-01-31 Philipp Thomas <pthomas@suse.de>
* coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
        to front of message. Unify messages with elf32-arm.h. Use
        commas where neccessary.
        * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
        ERROR in messages. Unify messages with coff-arm.c. Correct
        VFP/FPA error message.
        (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
        APCS-32 for translation.
2002-02-01 13:26:56 +00:00
Alan Modra 9ee6f9cc9a * chew.c (WORD): Eliminate. 2002-02-01 09:22:53 +00:00
Hans-Peter Nilsson 930b4cb2c2 Perform on-demand global register allocation from
R_MMIX_BASE_PLUS_OFFSET relocs.
	* elf64-mmix.c (struct bpo_reloc_section_info, struct
	bpo_reloc_request, struct bpo_greg_section_info): New.
	(mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
	bpo_reloc_request_sort_fn, mmix_elf_relax_section,
	_bfd_mmix_check_all_relocs,
	_bfd_mmix_prepare_linker_allocated_gregs,
	_bfd_mmix_finalize_linker_allocated_gregs): New functions.
	(elf_mmix_howto_table): Correct src_mask for most relocs.
	(mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
	case.
	(mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
	case.  Fix typo in comment.  New label do_mmix_reloc.
	(mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
	store first object file with a base-plus-offset reloc.  Call
	mmix_elf_check_common_relocs for the part common with mmo.
	(mmix_elf_final_link): Write out linker-allocated register
	contents section.
	(elf_backend_gc_sweep_hook): Define.
	(bfd_elf64_bfd_relax_section): Define.

	* mmo.c: Don't include <ctype.h>
	(mmo_init): Correct init-once logic.
2002-02-01 08:18:56 +00:00
Tom Rix 3e36d993a9 Support small archive for pre AIX 4.3 2002-02-01 05:47:14 +00:00
Alan Modra ba323545dd Run "make dep-am" 2002-02-01 03:26:35 +00:00
Alan Modra 7dc0ab3144 Move doc/ entries to correct changelog 2002-02-01 01:04:37 +00:00
Alan Modra 7ecafadbfd daily update 2002-01-31 23:00:05 +00:00
David O'Brien 012884d606 2002-01-31 David O'Brien <obrien@FreeBSD>
* configure.in: Recognize the differences in core files from FreeBSD
	4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
	5-CURRENT.
	* configure: Regenerate.

Approved by:  Nick Clifton <nickc@cambridge.redhat.com>
              <m3k7tyuzzd.fsf@north-pole.nickc.cambridge.redhat.com>
2002-01-31 19:00:53 +00:00
Nick Clifton 3b16e843f2 Add support for OpenRISC 32-bit embedded processor 2002-01-31 17:33:08 +00:00
Nick Clifton caf8ca8e1c Replace 'return false' with a return of a bfd_reloc_ error code. 2002-01-31 11:17:22 +00:00
Hans-Peter Nilsson e5dfef0918 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
unexport unreferenced symbols when --export-dynamic.  Call
	_bfd_elf_strtab_delref when unexporting.
2002-01-31 10:46:24 +00:00
Nick Clifton c312a6a489 oops - omitted from previous delta 2002-01-31 09:24:16 +00:00
Alan Modra ba994a14fd * chew.c (courierize): Don't modify @command params. 2002-01-31 06:23:17 +00:00
Daniel Jacobowitz 4e4770d0c6 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h: Include <stdbool.h> if it is available.
        * bfd-in2.h: Regenerated.
2002-01-31 04:42:30 +00:00
Alan Modra e1fa50e7dc * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
not go via the plt.
2002-01-31 04:13:14 +00:00
Alan Modra 6fa323be86 daily update 2002-01-30 23:00:06 +00:00
Nick Clifton b5f79c764c Tidy up formatting in bfd-in2.h 2002-01-30 18:12:17 +00:00
Nick Clifton ca09e32bb2 Fixes for better translation into other languages 2002-01-30 16:07:28 +00:00
Philipp Thomas ae1a89b7c4 Unify messages in coff-arm.c and elf32-arm.h. 2002-01-30 14:51:39 +00:00
Nick Clifton 05f64ac628 Updated Swedish translation 2002-01-30 10:49:04 +00:00
Nick Clifton 661a3fd4a0 Don't translate debugging message. 2002-01-30 10:31:28 +00:00
Nick Clifton f5a3e38aff Use full section name in error messages. 2002-01-30 10:28:47 +00:00
Alan Modra d926e03d6d * elf64-ppc.c (func_desc_adjust): Only provide missing function
descriptor symbols for undefined function code syms.  Clear
	ELF_LINK_NON_ELF so that they can stay weak.
2002-01-30 03:47:37 +00:00
Chris Demetriou 030d18fb6f 2002-01-29 Chris Demetriou <cgd@broadcom.com>
Mitch Lichtenberg  <mpl@broadcom.com>

        * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
        * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
        to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
        generation.
        * bfd-in2.h: Regenerate.
2002-01-30 02:19:21 +00:00
Chris Demetriou fcc76bea37 2002-01-29 Chris Demetriou <cgd@broadcom.com>
* elf32-mips.c: Add additional comments about HI16 relocation
        processing.
        (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
        pc-relative relocations.  (Reverts change made on 2001-10-31.)
        (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
        for pc-relative relocations.
        (mips_elf_calculate_relocation): Add a comment about a kludge
        in the R_MIPS_GNU_REL_HI16 handling.
        (_bfd_mips_elf_relocate_section): Implement that kludge;
        adjust pc-relative HI16 relocation for difference in HI16 and
        LO16 addresses, since it can't easily be done in
        mips_elf_calculate_relocation.
2002-01-30 02:13:20 +00:00
Alan Modra 4cdc627b72 daily update 2002-01-29 23:00:05 +00:00
Alan Modra 648cca2cac Arrgh! Revert last change. 2002-01-29 14:52:12 +00:00
Alan Modra ef9d813eaf * elf64-ppc.c (func_desc_adjust): Don't supply missing function
descriptor symbols.
2002-01-29 14:04:04 +00:00
Martin Schwidefsky f9cd911902 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
relocations with PC32 relocations for undefined or weak symbols.
	* elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
	* elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2002-01-29 11:14:35 +00:00
Alan Modra c909d9ad10 daily update 2002-01-28 23:00:04 +00:00
Jason Thorpe 702248bb87 * elfcore.h (elf_core_file_p): Improve comment for last change. 2002-01-28 16:48:52 +00:00
Daniel Jacobowitz 4867be4168 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
From Steve Ellcey <sje@cup.hp.com>:
        * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI.
        (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd,
        lt_cv_file_magic_test_file): Set to appropriate values for HP-UX
        IA64.
        * ltcf-c.sh (archive_cmds, hardcode_*): Ditto.
        * ltconfig (shlibpath_*, dynamic_linker, library_names_spec,
        soname_spec, sys_lib_search_path_spec): Ditto.


Various configure scripts regenerated.
2002-01-28 04:59:39 +00:00
Jason Thorpe a94cef6a79 * elfcore.h (elf_core_file_p): Set the machine architecture
before processing the program headers.
2002-01-27 23:27:23 +00:00
Alan Modra 9d8385df24 daily update 2002-01-27 23:00:05 +00:00
Alan Modra b955b80698 daily update 2002-01-26 23:00:05 +00:00
Hans-Peter Nilsson 966abd7075 * configure.in <64-bit configuration>: If using gcc, check and
emit error for egcs-1.1.2.
	* configure: Regenerate.
2002-01-26 21:55:54 +00:00
Hans-Peter Nilsson 7562a29612 * doc/Makefile.am (install): Depend on install-info.
* doc/Makefile.in: Regenerate.
2002-01-26 21:27:36 +00:00
Nick Clifton e8eab623df Copy only as much information as possible to avoid stack corruption. 2002-01-26 10:32:21 +00:00
Richard Henderson 73896efb90 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
for non-allocated sections.
2002-01-26 08:41:30 +00:00
Alan Modra 4e4e843141 daily update 2002-01-25 23:00:05 +00:00
Mark Kettenis c106e334fb * elf.c (elfcore_write_prstatus): Make sure we pass the address of
prstat.pr_reg even if it is a struct.
2002-01-25 18:56:59 +00:00
Nick Clifton 254ed74373 Reset AIX vector function overrides for HP-UX. 2002-01-25 16:41:37 +00:00
Nick Clifton 3d66c4f7df Don't mark info message for translation. 2002-01-25 15:13:52 +00:00
Nick Clifton 9460ecdabe Updated translations 2002-01-25 14:20:45 +00:00
Alan Modra cc9ff76a52 * coff-alpha.c (alpha_relocate_section): Unify warning message
for GP relative relocations without GP defined.
	* coff-mips.c (mips_relocate_section): Likewise.
2002-01-25 12:12:23 +00:00
Alan Modra c68836a9c0 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
unsigned overflow when new_offset < old_offset.
2002-01-25 06:24:34 +00:00
Alan Modra 010237a9c2 daily update 2002-01-24 23:00:04 +00:00
Nick Clifton 391154e9f7 fix typo 2002-01-24 17:08:42 +00:00
Alan Modra 86a3211297 daily update 2002-01-23 23:00:05 +00:00
Richard Henderson 8ba89f17ac * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
plt entries for undefweak symbols.
2002-01-23 21:51:53 +00:00
Nick Clifton c69539487b Add: bfd_elf32_ia64_hpux_big_vec, bfd_elf64_ia64_hpux_big_vec and
bfd_elf32_h8300_vec to DEFAULT_VECTOR.
2002-01-23 12:21:07 +00:00
Alan Modra 41bd81abfa * elf64-ppc.c: Remove stale part of ABI comment.
(NO_OPD_RELOCS): Define.
	(ppc64_elf_check_relocs): Use it.
	(ppc64_elf_relocate_section): Here too.
	(build_one_stub): Don't point function syms at the stub.  Instead,
	hijack plt.offset.
	(ppc64_elf_relocate_section): Check whether REL24 relocs should
	really go to the stub.  Make all dynamic relocs in opd against
	locals.
	(ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
	plt.offset.
2002-01-23 11:21:18 +00:00
Alan Modra 9d7c87e6b6 daily update 2002-01-22 23:00:05 +00:00
Richard Henderson f304919d26 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp. 2002-01-22 09:51:58 +00:00
Alan Modra 60ee0d4a8b * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
TOC_BASE_OFF adjustment.
2002-01-22 09:05:07 +00:00
Alan Modra c0ef99a773 run "make dep-am"; automake
regenerate po/POTFILES.in
2002-01-22 08:58:00 +00:00
Alan Modra 64328b468d * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
host defines.
2002-01-22 00:47:21 +00:00
Alan Modra 95cc1d377b daily update 2002-01-21 23:00:04 +00:00
Hans-Peter Nilsson 5995366531 Correct attribution 2002-01-21 22:00:00 +00:00
Hans-Peter Nilsson 58255df39c * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
Check for and emit error if sgot is NULL at this point.
2002-01-21 21:57:48 +00:00
Jason Thorpe 9596feeafe bfd:
* config.bfd (ia64*-*-netbsd*): New target.

gas:
* configure.in (ia64-*-netbsd*): New target.
* configure: Regenerate.

ld:
* configure.tgt (ia64-*-netbsd*): New target.
2002-01-21 18:17:28 +00:00
Alan Modra 7b45c6e1da comment typo fixes 2002-01-21 14:03:27 +00:00
Alan Modra e86ce104e2 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
is_func_descriptor fields.
	(link_hash_newfunc): Init them.
	(ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
	dot are candidates for plt entries.  When processing .opd relocs,
	set function descriptor strings to point inside function code
	string, and set new ppc_link_hash_entry fields.
	(ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
	(ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
	function descriptors.  It's now done in..
	(func_desc_adjust): New.
	(ppc64_elf_func_desc_adjust): New.
	(define elf_backend_always_size_sections): Define.
	(ppc64_elf_hide_symbol): New.
	(define elf_backend_hide_symbol): Define.
	(allocate_dynrelocs): Remove code looking up function descriptors
	as that has been done earlier.
	(ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
	table.
	(ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
	up function descriptor.
	(build_one_stub): Look up the function code sym.  Check for
	invalid plt offsets.
	(ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
	Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2002-01-21 12:15:07 +00:00
Alan Modra e5094212df * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
boolean param.
	(_bfd_elf_link_hash_hide_symbol): Likewise.
	* elflink.h (elf_link_add_object_symbols): Adjust call to
	elf_backend_hide_symbol.
	(elf_fix_symbol_flags): Likewise.
	(elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
	than bfd_alloc.
	* elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
	Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
	* elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
	(clobber_millicode_symbols): Adjust to suit new hide_symbol.
	* elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
	and adjust to suit.
	* elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
	_bfd_elf_link_hash_hide_symbol rather than duplicating code.
	* elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2002-01-21 10:29:09 +00:00
Alan Modra 291d2e20bf daily update 2002-01-20 23:00:05 +00:00
Alan Modra 0009e18231 daily update 2002-01-19 23:00:05 +00:00
Alan Modra d7d8e1284b daily update 2002-01-18 23:00:04 +00:00
Alan Modra 40b8271bdd * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
dynamic function descriptor symbol, not the associated function
	symbol.
2002-01-18 01:22:02 +00:00
Alan Modra c2408ccfbb daily update 2002-01-17 23:00:04 +00:00
Eric Christopher 55baa95bb2 2002-01-17 Eric Christopher <echristo@redhat.com>
* elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2002-01-17 20:06:48 +00:00
Nick Clifton 328577adeb Regenerate .pot and .po files 2002-01-17 14:12:08 +00:00
Alan Modra af746e92cb * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
Remove "Elf_Internal_Shdr *" param.
	(_bfd_mips_elf_section_from_bfd_section): Ditto.
	* elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
	* elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
	* elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
	* elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
	* elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
	* elf.c (_bfd_elf_section_from_bfd_section): Allow backend
	function to override special sections.  Remove hdr arg from
	backend call, and don't loop.
2002-01-17 13:02:40 +00:00
Andreas Schwab ce5fe2c658 Remove leftover conflict marker. 2002-01-17 11:01:39 +00:00
Eric Christopher 175e996239 2002-01-16 Eric Christopher <echristo@redhat.com>
* elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
	on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
	relocations requiring gp0 and gp.
2002-01-17 08:19:08 +00:00
Alan Modra 4c2ef66dbb daily update 2002-01-16 23:00:04 +00:00
Richard Earnshaw 96a846ea23 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
EF_ARM_VFP_FLOAT.
(elf32_arm_print_private_bfd_data): Likewise.
2002-01-16 13:01:54 +00:00
Nick Clifton af3ae48ddd Import new Turkish translations. 2002-01-16 10:17:48 +00:00
Alan Modra 10ed1bba5b * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
(ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
	(ORI_R0_R0_0): Correct.
2002-01-16 07:32:04 +00:00
Alan Modra 5d1634d792 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
when plt_not_loaded.
	* elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
	clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
	(PLT_INITIAL_ENTRY_SIZE): Set to 24.
	(ppc64_elf_glink_code): Delete.
	(PPC64_ELF_GLINK_SIZE): Delete.
	(ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
	BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
	ORI_R0_R0_0): Define.
	(PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
	(struct ppc_link_hash_table): Add sstub and plt_overflow.
	(ppc64_elf_link_hash_table_create): Init them.
	(ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
	Don't copy to shared lib.
	(ppc64_elf_check_relocs): Call bfd_set_error on errors.
	(ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
	(allocate_dynrelocs <plt>): Don't change function sym here.  Make
	room for .stub and .glink code.
	(ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
	DT_PPC64_GLINK.
	(ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
	bfd_elf64_bfd_final_link.
	(bfd_elf64_bfd_final_link): Don't define.
	(ppc64_elf_size_stubs): New.
	(build_plt_stub): New.
	(build_one_stub): New.
	(ppc64_elf_build_stubs): New.
	(ppc64_elf_relocate_section <toc relocs>): Remove assert.
	(ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
	(ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
	DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
	case output sections not separate.  Adjust DT_RELASZ to not
	include plt relocs.  Set reserved got entry.  Set got and plt
	entry size.
	(elf_backend_got_header_size): Set to 8.
	* elf64-ppc.h: New file.
2002-01-16 05:50:03 +00:00
Alan Modra c601ffdbb0 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
sections, use bfd_section_list_remove.
	* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
	* elflink.h (elf_link_add_object_symbols): When removing all
	sections, use bfd_section_list_clear.
2002-01-16 05:37:10 +00:00
Alan Modra 69add918a1 daily update 2002-01-15 23:00:05 +00:00
Nick Clifton 8fb4cb7f7c Add Swedish translation 2002-01-15 13:58:25 +00:00
Jakub Jelinek d3c456e950 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
* elf.c (merge_sections_remove_hook): New function.
	(_bfd_elf_merge_sections): Pass it as 3rd argument to
	_bfd_merge_sections.
	* libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
	* libbfd.h: Rebuilt.
	* merge.c (_bfd_merge_sections): Add remove_hook argument.
	Call remove_hook if a SEC_EXCLUDE section is encountered.
2002-01-15 12:52:15 +00:00
Nick Clifton 1f7fd47891 Fix up generation of VTINHERIT relocs 2002-01-15 11:58:45 +00:00
Alan Modra 77ab017d24 daily update 2002-01-14 23:00:05 +00:00
Alan Modra 30d304de8b daily update 2002-01-13 23:00:04 +00:00
Alan Modra 35c04bf5fd daily update 2002-01-12 23:00:09 +00:00
Alan Modra ce17a66bc7 daily update 2002-01-11 23:00:15 +00:00
Michael Snyder b87011e952 2002-01-10 Michael Snyder <msnyder@redhat.com>
* elf.c (elfcore_write_prstatus): Use long instead of pid_t;
	(elfcore_write_pstatus): Use long instead of pid_t;
	* elf-bfd.h: Change prototypes to use long instead of pid_t;
2002-01-10 23:05:21 +00:00
Alan Modra a873495b95 daily update 2002-01-10 23:00:05 +00:00
Alan Modra 09a6cfe9bf daily update 2002-01-09 23:00:07 +00:00
Jason Thorpe b4db1224b7 include/elf:
* common.h: Update copyright years.
(NT_NETBSDCORE_PROCINFO): Define.
(NT_NETBSDCORE_FIRSTMACH): Define.

bfd:
* elf.c: Update copyright years.
(elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.

bintuils:
* readelf.c (get_netbsd_elfcore_note_type): Use
NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
2002-01-09 18:59:11 +00:00
Alan Modra f4d68ea590 daily update 2002-01-08 23:00:07 +00:00
Michael Snyder 97996af6f2 Fix typo. 2002-01-08 21:33:23 +00:00
Michael Snyder 7c76fa91ad 2002-01-08 Michael Snyder <msnyder@redhat.com>
Add capability to write corefile note sections, for gdb.
	* elf.c (elfcore_write_note): New function.
	(elfcore_write_prpsinfo): New function.
	(elfcore_write_prstatus): New function.
	(elfcore_write_pstatus): New function.
	(elfcore_write_prfpreg): New function.
	(elfcore_write_prxfpreg): New function.
	* elf-bfd.h: Add prototypes for above functions.
2002-01-08 21:31:36 +00:00
Alexandre Oliva e1fddb6bac * elf.c (elf_fake_sections): Propagate errors from
elf_backend_fake_section.
2002-01-08 16:42:57 +00:00
Jason Thorpe 8d05742ff6 bfd:
* Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
(elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
* config.bfd (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
(bfd_elf32_shnbsd_vec): New vector.
(bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
* elf32-sh-nbsd.c: New file.
* targets.c: Update copyright years.
(_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
bfd_elf32_shnbsd_vec.

gas:
* configure.in (sh*le): Set cpu_type=sh and endian=little.
(sh*-*-netbsdelf*): New target.
* configure: Regenerate.
* tc-sh.h: Update copyright years.
(TARGET_FORMAT): Add version for TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
(eshelf_nbsd.c): New rule.
(eshlelf_nbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
* ld/emulparams/shelf_nbsd.sh: New emulation.
* ld/emulparams/shlelf_nbsd.sh: New emulation.
2002-01-08 04:23:02 +00:00
Aldy Hernandez 1dba4cb4ba * bfd/coff-rs6000.c (READ20): Use bfd_scan_vma. 2002-01-08 00:28:36 +00:00
Alan Modra a4f0e458f6 daily update 2002-01-07 23:00:05 +00:00
Geoffrey Keating 47b22aef48 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
of a symbol in a section that will be deleted.
2002-01-07 17:55:37 +00:00
Nick Clifton be2d1673e4 Add spanish translation files 2002-01-07 17:37:59 +00:00
Nick Clifton 39e90f101a Rotated ChangeLog 2002-01-07 12:10:15 +00:00
Alan Modra 09f0f265aa daily update 2002-01-06 23:00:04 +00:00
Alan Modra d9cf1b54c5 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
argument so we can handle HP-UX specially.
	(elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
	(elfNN_hpux_backend_section_from_bfd_section): New for support
	of SHN_IA_64_ANSI_COMMON.
	(elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
	(is_unwind_section_name): Add special HP-UX support.
	(elfNN_ia64_section_from_shdr): Add support for more sections.
	(elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
	add support for more sections.
	(elfNN_ia64_additional_program_headers): Modify
	is_unwind_section_name call.
	(elfNN_ia64_modify_segment_map): Remove assumption that there is
	only one unwind section in segment.
2002-01-06 11:14:19 +00:00
Alan Modra 3f3c5c3404 * syms.c (_bfd_generic_make_empty_symbol): New function.
* libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
	_bfd_generic_make_empty_symbol.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
	* hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
	(hppabsd_core_get_symtab_upper_bound): Don't define.
	(hppabsd_core_get_symtab): Likewise.
	(hppabsd_core_print_symbol): Likewise.
	(hppabsd_core_get_symbol_info): Likewise.
	(hppabsd_core_bfd_is_local_label_name): Likewise.
	(hppabsd_core_get_lineno): Likewise.
	(hppabsd_core_find_nearest_line): Likewise.
	(hppabsd_core_bfd_make_debug_symbol): Likewise.
	(hppabsd_core_read_minisymbols): Likewise.
	(hppabsd_core_minisymbol_to_symbol): Likewise.
	(hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
	Formatting fixes.
	* hpux-core.c: Similarly.
	* irix-core.c: Similarly.
	* osf-core.c: Similarly.
	* sco5-core.c: Similarly.
	* binary.c (binary_make_empty_symbol): Remove function, define as
	_bfd_generic_make_empty_symbol.
	* ihex.c (ihex_make_empty_symbol): Likewise.
	* mmo.c (mmo_make_empty_symbol): Likewise.
	* ppcboot.c (ppcboot_make_empty_symbol): Likewise.
	* srec.c (srec_make_empty_symbol): Likewise.
	* versados.c (versados_make_empty_symbol): Likewise.
	* vms.c (_bfd_vms_make_empty_symbol): Remove.
	(vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
	* vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
	rather than _bfd_vms_make_empty_symbol.
	* vms-misc.c (new_symbol): Likewise.
2002-01-06 07:30:35 +00:00
Alan Modra 44d212dcbf daily update 2002-01-05 23:00:06 +00:00
Alan Modra 9e7b37b31f * section.c (bfd_section_init): Remove unnecessary initialisations.
(bfd_section_list_clear): New function.
	(bfd_section_list_remove, bfd_section_list_insert): New macros.
	(_bfd_strip_section_from_output): Use them.
	* coffcode.h (coff_set_alignment_hook): Likewise.
	* elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
	* elf64-mips.c (mips_elf64_final_link): Likewise.
	* elf64-mmix.c (mmix_elf_final_link): Likewise.
	* sunos.c (sunos_add_dynamic_symbols): Likewise.
	* xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
	* bfd-in2.h: Regenerate.

	* netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
	rather than doing our own section handling.  Clean up after errors
	with bfd_release and bfd_section_list_clear.  Handle unexpected
	flags.
	* aoutf1.h (sunos4_core_file_p): Likewise.
	* aix386-core.c (aix386_core_file_p): Likewise.
	* cisco-core.c (cisco_core_file_validate): Likewise.
	* ptrace-core.c (ptrace_unix_core_file_p): Likewise.
	* trad-core.c (trad_unix_core_file_p): Likewise.

	* hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
	with bfd_release and bfd_section_list_clear.
	* hpux-core.c (hpux_core_core_file_p): Likewise.
	* irix-core.c (irix_core_core_file_p): Likewise.
	* lynx-core.c (lynx_core_file_p): Likewise.
	* osf-core.c (osf_core_core_file_p): Likewise.
	* rs6000-core.c (rs6000coff_core_p): Likewise.
	* sco5-core.c (sco5_core_file_p): Likewise.
2002-01-05 13:11:33 +00:00
Alan Modra 3f0a7f7f73 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
sign extension adjustments without conditionals.
2002-01-05 12:36:18 +00:00
Alan Modra e355ef1be4 daily update 2002-01-04 23:00:04 +00:00
Jakub Jelinek a3aa38ee6c * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
CIE at .eh_frame start is removed due to no FDEs referencing it.
2002-01-04 17:02:30 +00:00
Andreas Jaeger 8a8b2d4b4a bfd:
* config.bfd (x86_64-*-netbsd*): New target.
	* configure.in (x86_64-*-netbsd*): Set COREFILE
	to netbsd-core.lo.
	* configure: Regenerated.

gas:
	* configure.in (i386-*-netbsdelf*): Collapse target into...
	(i386-*-netbsd*): ...this.  Add support for x86-64.
	* configure: Regenerated.

ld:
	* configure.tgt (x86_64-*-netbsd*): New target.
2002-01-04 14:49:06 +00:00
Tom Rix 04b5af89ea Fix xcoff linker's ordering of pad sections 2002-01-03 22:06:38 +00:00
Nick Clifton 51c5503ba7 Handle R_ARM_THM_PC11 2002-01-03 14:23:01 +00:00
Nick Clifton 07f7c046a8 Add japanese translation 2002-01-02 16:15:32 +00:00
Nick Clifton 5eefb65fea Reformat error messages to ease translation into other languages. 2002-01-02 15:36:27 +00:00
Jakub Jelinek 57a7219709 * elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
before looking for .eh_frame_hdr section.
	* elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If
	.eh_frame_hdr section is being stripped from output, don't do
	anything.
2001-12-31 11:49:10 +00:00
Tom Rix 330693f5ab Fix for xcoff <bigaf> big archive format support. 2001-12-31 04:08:23 +00:00
Alan Modra f6bcd34059 daily update 2001-12-23 23:00:06 +00:00
Alan Modra 831f85b186 daily update 2001-12-22 23:00:07 +00:00
Tom Rix 9a4c7f1669 -binitfini emulation, put __rtinit symbol generation into linker. 2001-12-22 17:18:34 +00:00
Alan Modra db80907b3b daily update 2001-12-21 23:00:07 +00:00
Jakub Jelinek bd5e6e7e3a * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
R_SPARC_DISP32.  Support R_SPARC_PLT32.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
	(elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
	(elf32_sparc_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
	R_SPARC_DISP32.  Support R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
	and BFD_RELOC_SPARC_PLT32.
	(sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc64_elf_relocate_section): Likewise.
	* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
	* bfd-in2.h, libbfd.h: Rebuilt.

	* config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define.
	(sparc_cons): Provide prototype.
	* config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and
	BFD_RELOC_SPARC_PLT{32,64}.  Enumerate for which relocs
	reloc->addend = fixp->fx_addnumber shouldn't be done instead of
	enumarating for which pc relative ones it should be done.
	(sparc_cons_special_reloc): New variable.
	(sparc_cons): New function.
	(cons_fix_new_sparc): Use sparc_cons_special_reloc.
	* testsuite/gas/sparc/pcrel.s: New test.
	* testsuite/gas/sparc/pcrel.d: Expected output.
	* testsuite/gas/sparc/pcrel64.s: New test.
	* testsuite/gas/sparc/pcrel64.d: Expected output.
	* testsuite/gas/sparc/plt.s: New test.
	* testsuite/gas/sparc/plt.d: Expected output.
	* testsuite/gas/sparc/plt64.s: New test.
	* testsuite/gas/sparc/plt64.d: Expected output.
	* testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64
	tests.
2001-12-21 22:35:24 +00:00
Alan Modra a790644d3c daily update 2001-12-20 23:00:05 +00:00
Tom Rix 47ede03a41 Special handling of AIX xcoff text alignment fix. 2001-12-20 21:29:21 +00:00
Michael Snyder fd29389c60 2001-12-19 Michael Snyder <msnyder@redhat.com>
* elf32-i386.c (elf_i386_grok_psinfo): Fix probable copy-and-paste
	error: target is i386 (not mips), and size of descdata is 124
	(not 128).
2001-12-20 20:22:17 +00:00
Alan Modra 3cb60568f1 * config.bfd (mips-dec-netbsd*): Delete alias for mips*el-*-netbsd*. 2001-12-20 05:38:52 +00:00
Alan Modra 61d0bc3328 * config.bfd (arm-*-netbsdelf*): Add target.
* configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
	* configure: Regenerate.
2001-12-20 03:18:23 +00:00
Alan Modra 47a7090184 * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
as can happen with a core file, before dereferencing.
2001-12-19 23:54:26 +00:00
Alan Modra 59aec90c27 daily update 2001-12-19 23:00:04 +00:00
Jakub Jelinek a5eb27e6ff * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
is 0, temporarily grow it to minimal CIE size.
	(_bfd_elf_write_section_eh_frame): If input .eh_frame section would
	end up empty, build a fake minimal CIE.
2001-12-19 11:48:15 +00:00
Michael Snyder 52e9b6196a 2001-12-18 Michael Snyder <msnyder@redhat.com>
* elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
        sections of corefiles.  Also it makes no sense to sort if count == 1.
2001-12-19 05:16:47 +00:00
Alan Modra ee94eb9bc8 * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
ia64*-*-hpux* target.
	(bfd_elf64_ia64_hpux_big_vec): Likewise.
	* targets.c: Ditto.
	* configure.in: Ditto.
	* configure: Regenerate
	* elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
	alloca with bfd_malloc.
	(get_local_sym_hash): Likewise.
	(elfNN_hpux_post_process_headers): New function.
	#include elfNN-target.h again with values for IA64 HP-UX vector.
2001-12-19 02:18:20 +00:00
Alan Modra fcf12726be *** empty log message *** 2001-12-19 02:14:37 +00:00
Alan Modra 535b9defcc daily update 2001-12-18 23:00:05 +00:00
H.J. Lu 0ac4564efc 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
2001-12-18 19:03:23 +00:00
H.J. Lu f0b79d91cb 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
2001-12-18 18:11:52 +00:00
H.J. Lu 2d502050c8 2001-12-18 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
	(_bfd_mips_elf_copy_private_bfd_data): Removed.

	* elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
	the ELF header.

	* elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
	(bfd_elf??_bfd_copy_private_bfd_data): Removed.
	* elf32-m32r.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elfxx-ia64.c: Likewise.

	* elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.

	* elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
	to _bfd_elf_copy_private_bfd_data.
2001-12-18 17:59:59 +00:00
Martin Schwidefsky db72780896 * elf32-s390 (elf_s390_check_relocs): Pass addend to
gc_record_vtentry.
        * elf64-s390 (elf_s390_check_relocs): Likewise.
        Fix by Andreas Jaeger <aj@suse.de>.
2001-12-18 16:21:38 +00:00
Nick Clifton 3dc70b578d Correctly match all NetBSD/mips hosts. 2001-12-18 14:42:03 +00:00
Matthew Green 0b69cd08e0 * config.bfd (m68*-*-netbsdelf*): New target.
(m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd.

* configure.in (m68k-*-netbsdelf*): New target.
(m68k-*-netbsd*): Also include ELF support.
(m68k-*-netbsdaout*): New alias for m68*-*-netbsd*.
* configure: Regenerate.

* Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
(m68kelfnbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (m68*-hp-netbsd*): Renamed to ..
(m68*-*-netbsd*4k*): .. this.
(m68*-*-netbsdelf*): New target.
(m68*-*-netbsd*): Also include ELF support.
(m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
* emulparams/m68kelfnbsd.sh: New emulation.
2001-12-18 13:26:26 +00:00
Jakub Jelinek 6b9b879a02 * ldgram.y (vers_node): Support anonymous version tags.
* ldlang.c (lang_register_vers_node): Ensure anonymous version
	tag is not defined together with non-anonymous versions.
	* ld.texinfo: Document it.

	* elflink.h (size_dynamic_sections): Skip anonymous version tag.
	(elf_link_assign_sym_version): Don't count anonymous version tag.
2001-12-18 12:15:35 +00:00
Jakub Jelinek 9e2a48988a * elf-eh-frame.c (struct cie): Add make_lsda_relative.
(struct eh_cie_fde): Add lsda_encoding, lsda_offset,
	make_lsda_relative.
	(read_value, write_value): New.
	(_bfd_elf_discard_section_eh_frame): Inicialize
	lsda_encoding, lsda_offset and make_lsda_relative.
	(_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
	request no dynamic reloc for LSDA field of FDE.
	(_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
	If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
	or pcrel.  Fix address computation for DW_EH_PE_pcrel relocs.
	Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
	. might have changed due to deleted FDE or CIEs.
2001-12-18 11:49:52 +00:00
Jakub Jelinek 53c3f2bec7 * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
(last_eq): Remove.
	(_bfd_elf_strtab_finalize): Don't use a hash table for last
	character chains, instead use an array.
2001-12-18 11:47:59 +00:00
Alan Modra 50b2bdb780 * elf.c (elfcore_netbsd_get_lwpid): New function.
(elfcore_grok_netbsd_procinfo): New function.
	(elfcore_grok_netbsd_note): New function.
	(elfcore_read_notes): Call elfcore_grok_netbsd_note to process
	NetBSD ELF core file notes.
2001-12-18 07:53:11 +00:00
Alan Modra ed59115573 * elfcode.h (struct bfd_preserve): New.
(elf_object_p): Replace preserved_* vars with instance of above.
	Save and restore arch_info pointer rather than arch, mach so that
	more cases can be restored.  Save and restore new section_tail,
	section_htab structure, and init appropriately.  Move "rest of
	section header" code so that i_shdrp needs no NULL initialisation.
	Free old section_htab on success.
	* elfcore.h (elf_core_file_p): Likewise.
2001-12-18 07:12:19 +00:00
Tom Rix ff4d2c954c Fix email address. 2001-12-18 00:55:39 +00:00
Tom Rix 67fdeebeb2 Minimal handle .typchk and .except section. 2001-12-18 00:32:32 +00:00
Alan Modra d34f383a19 daily update 2001-12-17 23:00:05 +00:00
Jakub Jelinek ed4de5e2e0 * elf-bfd.h (elf_discarded_section): Define.
* elflink.h (elf_link_input_bfd): Use it.
	(elf_reloc_symbol_deleted_p): Likewise.

	* elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
	overflows for pc relative relocs against discarded sections.
2001-12-17 22:44:12 +00:00
Hans-Peter Nilsson e5a9fb49af Fix formatting in next-to-last entry 2001-12-17 22:20:23 +00:00
Thiemo Seufer a17aee54dd * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
* elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
	over the last months. Add some code for mips16 handling.
	(mips_elf64_check_mips16_stubs): New function.
	(mips_elf64_stub_section_p): Likewise.
	(mips_elf64_calculate_relocation): Change interface to support mips16.
	(mips_elf64_perform_relocation): Likewise.
2001-12-17 20:14:48 +00:00
Alan Modra 9ad5cbcfb2 Support for more than 64k ELF sections.
include/elf/ChangeLog
	* external.h (Elf_External_Sym_Shndx): Declare.
	* internal.h (struct elf_internal_sym <st_shndx>): Make it an
	unsigned int.
	* common.h (SHN_BAD): Define.

bfd/ChangeLog
	* configure.in: Bump bfd version.
	* configure: Regenerate.
	* elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
	(bfd_elf32_swap_symbol_in): Likewise.
	(bfd_elf32_swap_symbol_out): Likewise.
	(bfd_elf64_swap_symbol_in): Likewise.
	(bfd_elf64_swap_symbol_out): Likewise.
	(elf_reloc_cookie): Add locsym_shndx field.  Make locsyms a PTR.
	(elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
	symtab_shndx_section.
	(elf_numsections): Define.
	(elf_symtab_shndx): Define.
	* elf.c (setup_group): Use elf_numsections rather than header e_shnum.
	(bfd_elf_find_section): Likewise.
	(bfd_section_from_elf_index): Likewise.
	(bfd_section_from_shdr): Likewise.  Handle SHT_SYMTAB_SHNDX.
	(bfd_section_from_r_symndx): Read symbol shndx extension, and
	translate st_shndx for > SHN_HIRESERVE.
	(assign_section_numbers): Skip reserved sections.  Assign
	symtab_shndx_section and elf_numsections.  Exclude reserved
	sections from e_shnum.  Set up symtab_shndx_hdr.
	(_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
	(map_sections_to_segments): Don't map eh_frame_hdr unless required.
	(assign_file_positions_except_relocs): Use elf_numsections rather
	than header e_shnum.  Skip reserved sections and symtab_shndx_section.
	(prep_headers): Set name for symtab_shndx_hdr.
	(_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
	(_bfd_elf_write_object_contents): Likewise.  Skip reserved sections.
	(_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
	first.  Use elf_section_data if available.  Use elf_numsections.
	Start scan at index 1.
	(copy_private_bfd_data ): Comment fixes.
	(MAP_ONESYMTAB): Define above SHN_HIOS.
	(MAP_DYNSYMTAB): Likewise.
	(MAP_STRTAB): Likewise.
	(MAP_SHSTRTAB): Likewise.
	(MAP_SYM_SHNDX): New define.
	(_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
	(swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
	* elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
	extension.
	(elf_swap_symbol_out): Likewise.
	(elf_object_p): Set elf_numsections, and use instead of e_shnum.
	Initialialise reserved elf_elfsections to point at shdr[0].  Remove
	redundant bfd_release calls.
	(elf_slurp_symbol_table): Read symbol shndx extension, and use with
	elf_swap_symbol_in.  Translate st_shndx for > SHN_HIRESERVE too.
	* elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
	extension, and use with elf_swap_symbol_in.
	(elf_link_record_local_dynamic_symbol): Likewise.
	(elf_link_add_object_symbols): Likewise.  Also translate st_shndx
	for elf sections > SHN_HIRESERVE.
	(NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
	call.
	(struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
	(elf_bfd_final_link): Allocate the above, and tidy code allocating
	other buffers.  Use elf_numsections instead of e_shnum.  Adjust
	elf_swap_symbol_out calls.
	(elf_link_output_sym): Swap out symbol shndx extension too.
	(elf_link_flush_output_syms): And flush them to disk.
	(elf_link_output_extsym): Use SHN_BAD.  Adjust elf_swap_symbol_out
	calls.
	(elf_gc_mark): Read symbol shndx extension, and use with
	elf_swap_symbol_in.
	(elf_link_input_bfd): Likewise,  Translate st_shndx for elf sections
	> SHN_HIRESERVE too.  Use SHN_BAD.
	(elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
	elf_swap_symbol_in.  Translate st_shndx > SHN_HIRESERVE too.
	(elf_bfd_discard_info): Read symbol shndx extension.  Don't attempt
	to continue after a bfd error.
	* elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
	Stash them immediately to symtab_hdr->contents rather than later
	in multiple places.  Clean up afterwards.  Read symbol shndx
	extension, and use with swap_symbol_in.  Translate SHN_UNDEF,
	SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
	sections too.  Remove dead code.
	(mn10200_elf_relax_delete_bytes): Use symbol shndx extension
	when swapping in symbols.  Tidy code adjusting global syms.
	Don't swap in global syms.
	(mn10200_elf_symbol_address_p): Likewise.  Remove extsyms param.
	(mn10200_elf_get_relocated_section_contents): Read symbol shndx
	extension, and use with swap_symbol_in.  Rename "size" -> "amt"
	to maximize code in common with other files.  Translate st_shndx
	for > SHN_HIRESERVE too.  Remove dead code.
	* elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
	Stash them immediately to symtab_hdr->contents rather than later
	in multiple places.  Clean up afterwards.  Read symbol shndx
	extension, and use with swap_symbol_in.  Remove dead code.
	(mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
	(mn10300_elf_symbol_address_p): Likewise.
	(mn10300_elf_get_relocated_section_contents): Likewise.
	* elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
	(elf32_h8_relax_delete_bytes): Likewise.
	(elf32_h8_symbol_address_p): Likewise.
	(elf32_h8_get_relocated_section_contents): Likewise.
	* elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
	extension, and use with swap_symbol_in.
	* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
	* elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
	bfd_elf32_swap_symbol_out.
	* elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
	elf sections > SHN_HIRESERVE too.
	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
	local syms.  Read symbol shndx extension, and use with swap_symbol_in.
	* elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
	elf_numsections rather than header e_shnum.
	* elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
	(sh_elf_relax_delete_bytes): Likewise.
	(sh_elf_get_relocated_section_contents): Likewise.  Only read local
	symbols.
	* elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
	hold section index.  Use elf_numsections rather than e_shnum.
	Rename "index" -> "indx" to avoid shadowing warning.
	(v850_elf_add_symbol_hook): Likewise.
	* elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
	Read symbol shndx extension, and use with swap_symbol_in.
	* elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
	Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
	(elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.

	* elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
	before calling bfd_section_from_elf_index on local syms.
	* elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
	* elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
	* elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
	* elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
	* elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
	* elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
	* elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
	* elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
	* elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
	* elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
	* elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
	* elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
	* elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
	* elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
	* elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
	* elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
	* elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
	* elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
	* elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.

binutils/ChangeLog
	* readelf.c (symtab_shndx_hdr): New global.
	(SECTION_HEADER_INDEX): Define.
	(SECTION_HEADER_NUM): Define.
	(SECTION_HEADER): Define.
	(GET_ELF_SYMBOLS): Pass two params rather than three.
	(get_32bit_elf_symbols): Take file and section args.  Read and
	use SHT_SYMTAB_SHNDX.
	(get_64bit_elf_symbols): Likewise.
	(dump_relocations): Use SECTION_HEADER to index "section_headers".
	(process_section_headers): Likewise.  Use SECTION_HEADER_NUM too.
	Remember symtab_shdx_hdr.
	(process_program_headers): Scan from index 1 for segment map.
	(slurp_ia64_unwind_table): Use SECTION_HEADER to index
	"section_headers".
	(process_relocs): Likewise.  Also adjust call to GET_ELF_SYMBOLS.
	(process_unwind): Likewise.
	(process_version_sections): Likewise.
	(process_symbol_table): Likewise.
	(display_debug_info): Likewise.
	(process_dynamic_segment): Fake up a symtab section for changed
	GET_ELF_SYMBOLS.
	(get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE.
	(process_program_headers): Kill signed/unsigned warning.
	(load_debug_str): Likewise.
	(display_debug_info): Likewise.
2001-12-17 00:52:35 +00:00
Alan Modra 76f63e9126 Oops, changelog for last patch. 2001-12-17 00:43:17 +00:00
Alan Modra 73e87d7038 hash bfd sections for fast lookup and create.
bfd/ChangeLog
	* bfd.c (struct _bfd): Add section_htab, section_tail.
	* libbfd-in.h (_bfd_delete_bfd): Declare.
	(bfd_section_hash_newfunc): Declare.
	* opncls.c (_bfd_new_bfd): Free memory on failure.  Init
	section_htab and section_tail.
	(_bfd_delete_bfd): New function.
	(bfd_openr): Use it.
	(bfd_fdopenr): Likewise.
	(bfd_openstreamr): Likewise.
	(bfd_openw): Likewise.
	(bfd_close): Likewise.
	(bfd_close_all_done): Likewise.
	(bfd_release): Comment.
	* section.c (struct section_hash_entry): New.
	(bfd_section_hash_newfunc): New function.
	(section_hash_lookup): Define.
	(bfd_section_init): New function, split out from
	bfd_make_section_anyway.
	(bfd_get_section_by_name): Lookup via hash table.
	(bfd_get_unique_section_name): Likewise.
	(bfd_make_section_old_way): Rewrite to use hash table.
	(bfd_make_section_anyway): Likewise.
	(bfd_make_section): Likewise.  Return NULL for attempts to make
	BFD_{ABS,COM,UND,IND}_SECTION_NAME.
	(_bfd_strip_section_from_output): Adjust section_tail if needed.
	* configure.in: Bump bfd version.
	* configure: Regenerate.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.

ld/ChangeLog
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
	section_tail when fiddling with section list.
	(gld${EMULATION_NAME}_list_options): Ensure sentences aren't
	broken into separate strings to make translation easier.
	* emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
	fiddling with section list.
	* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2001-12-17 00:40:53 +00:00
Alan Modra 96f356322f daily update 2001-12-16 23:00:06 +00:00
Alan Modra 237b791887 daily update 2001-12-15 23:00:04 +00:00
Thiemo Seufer 5b6a02bcf4 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
(mips_elf64_high): New Function.
	(mips_elf64_higher): Likewise.
	(mips_elf64_highest): Likewise.
	(mips_elf64_info_to_howto_rel): Likewise.
	(mips_elf64_info_to_howto_rela): Likewise.
	(mips_elf64_write_rel): Likewise.
	(mips_elf64_write_rela): Likewise.
	(mips_elf64_link_hash_newfunc): Likewise.
	(mips_elf64_hi16_reloc): Likewise.
	(mips_elf64_higher_reloc): Likewise.
	(mips_elf64_highest_reloc): Likewise.
	(mips_elf64_gprel16_reloc): Likewise.
	(mips_elf64_gprel16_reloca): Likewise.
	(mips_elf64_literal_reloc): Likewise.
	(mips_elf64_gprel32_reloc): Likewise.
	(mips_elf64_shift6_reloc): Likewise.
	(mips_elf64_got16_reloc): Likewise.
	(mips_elf64_assign_gp): Likewise.
	(mips_elf64_final_gp): Likewise.
	(gprel16_with_gp): Likewise.
	(mips_elf64_additional_program_headers): Likewise.
	(mips_elf64_link_hash_table_create): Likewise.
	(mips_elf64_got_offset_from_index): Likewise.
	(_mips_elf64_got_info): Likewise.
	(mips_elf64_sign_extend): Likewise.
	(mips_elf64_overflow_p): Likewise.
	(mips_elf64_global_got_index): Likewise.
	(mips_elf64_sort_hash_table_f): Likewise.
	(mips_elf64_sort_hash_table): Likewise.
	(mips_elf64_swap_msym_out): Likewise.
	(mips_elf64_create_local_got_entry): Likewise.
	(mips_elf64_local_got_index): Likewise.
	(mips_elf64_got_page): Likewise.
	(mips_elf64_got16_entry): Likewise.
	(mips_elf64_local_relocation_p): Likewise.
	(mips_elf64_next_relocation): Likewise.
	(mips_elf64_create_dynamic_relocation): Likewise.
	(mips_elf64_calculate_relocation): Likewise.
	(mips_elf64_obtain_contents): Likewise.
	(mips_elf64_perform_relocation): Likewise.
	(mips_elf64_relocate_section): Likewise.
	(mips_elf64_create_dynamic_sections): Likewise.
	(mips_elf64_adjust_dynamic_symbol): Likewise.
	(mips_elf64_always_size_sections): Likewise.
	(mips_elf64_size_dynamic_sections): Likewise.
	(mips_elf64_finish_dynamic_symbol): Likewise.
	(mips_elf64_finish_dynamic_sections): Likewise.
	(mips_elf64_gc_mark_hook): Likewise.
	(mips_elf64_gc_sweep_hook): Likewise.
	(mips_elf64_create_got_section): Likewise.
	(mips_elf64_record_global_got_symbol): Likewise.
	(mips_elf64_create_msym_section): Likewise.
	(mips_elf64_allocate_dynamic_relocations): Likewise.
	(mips_elf64_check_relocs): Likewise.
	(mips_elf64_output_extsym): Likewise.
	(mips_elf64_swap_gptab_in): Likewise.
	(mips_elf64_swap_gptab_out): Likewise.
	(gptab_compare): Likewise.
	(mips_elf64_final_link): Likewise.
	(prev_reloc_addend): Remenber addend of previous parts of a combined
	reloc.
	(ELF_MIPS_GP_OFFSET): New define.
	(STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
	(MIPS_FUNCTION_STUB_SIZE): Likewise.
	(mips_elf64_howto_rel): Fix HOWTO defines.
	(mips_elf64_howto_rela): Likewise.
	(mips_elf64_swap_reloca_out): Fix signedness.
	(mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
	(mips_elf64_be_swap_reloca_in): Likewise.
	(mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
	(mips_elf64_be_swap_reloca_out): Likewise.
2001-12-15 09:56:19 +00:00
Jakub Jelinek 68f691521a * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
* elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
	(_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
	sec_info here.  Free ehbuf.
	(_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
	if hdr_info->strip.
	(_bfd_elf_maybe_strip_eh_frame_hdr): New.
	* elflink.h (size_dynamic_sections): Call it.
2001-12-15 08:54:13 +00:00
Alan Modra d3a04f13a1 daily update 2001-12-14 23:00:35 +00:00
Alan Modra 72dd63313e * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL. 2001-12-14 01:52:27 +00:00
Alan Modra 095978813d daily update 2001-12-13 23:00:14 +00:00
Jakub Jelinek 6576570080 * elf-bfd.h (enum elf_link_info_type): New.
(struct bfd_elf_section_data): Remove stab_info and merge_info
	fields, add sec_info and sec_info_type.
	(struct elf_obj_tdata): Add eh_frame_hdr field.
	(_bfd_elf_discard_section_eh_frame): New prototype.
	(_bfd_elf_discard_section_eh_frame_hdr): Likewise.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_write_section_eh_frame_hdr): Likewise.
	* Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
	(BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
	(elf-eh-frame.lo): New.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-eh-frame.lo.
	* configure: Rebuilt.
	* elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
	(map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
	(get_program_header_size): Take into account PT_GNU_EH_FRAME
	segment.
	(_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
	(_bfd_elf_rel_local_sym): Likewise.
	(_bfd_elf_section_offset): Likewise.  Call
	_bfd_elf_eh_frame_section_offset too.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
	sec_info.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf-eh-frame.c: New file.
	* elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
	.stab sections.  Set sec_info_type, use sec_info instead
	of merge_info and stab_info.
	(elf_link_create_dynamic_sections): Create .eh_frame_hdr section
	if --eh-frame-hdr.
	(elf_bfd_final_link): Write .eh_frame_hdr section.
	(elf_link_sec_merge_syms): Use sec_info_type and sec_info.
	(elf_link_input_bfd): Likewise.
	Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
	(elf_bfd_discard_info): Add output_bfd argument.
	Call _bfd_elf_discard_section_eh_frame and
	_bfd_elf_discard_section_eh_frame_hdr.
	(elf_section_ignore_discarded_relocs): Use sec_info_type, not section
	names.
	* bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
	prototypes.
	* bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.

	* elf/common.h (PT_GNU_EH_FRAME): Define.
	* bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.

	* emultempl/elf32.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	(OPTION_EH_FRAME_HDR): Define.
	(longopts): Add --eh-frame-hdr.
	(parse_args): Handle it.
	(list_options): Add --eh-frame-hdr to help.
	* emultempl/hppaelf.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	* scripttempl/elf.sc (.eh_frame_hdr): Add.

	* readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
2001-12-13 11:09:34 +00:00
Alan Modra d8c18723e1 daily update 2001-12-12 23:00:04 +00:00
Richard Henderson ce9c7f501f * syms.c (_bfd_generic_read_minisymbols): Early return for
no symbols.  Patch from FreeBSD folk; exact origin unknown.
2001-12-12 19:05:26 +00:00
Alan Modra d2c9b9cdd0 daily update 2001-12-11 23:00:05 +00:00
Alan Modra 5732c11485 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
and e_shstrndx if out of range.
	(elf_object_p): Read extended values for e_shnum and e_shstrndx
	from the first section header.  Allocate space in elf_elfsections
	for reserved sections and set to NULLs.
	(elf_write_shdrs_and_ehdr): Set overflow fields in first section
	header.  Skip reserved sections in elf_elfsections.  Remove
	duplicate size calculation.
2001-12-11 05:38:18 +00:00
Alan Modra 709ec538af daily update 2001-12-10 23:00:05 +00:00
Alan Modra 6251c3aa9e daily update 2001-12-09 23:00:05 +00:00
Alan Modra 7a4a943a9f daily update 2001-12-08 23:00:05 +00:00
Geoffrey Keating 93fbbb04b8 Index: bfd/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* archures.c: Add support for xstormy16.
	* config.bfd: Add support for xstormy16.
	* configure.in: Add support for xstormy16.
	* reloc.c: Add support for xstormy16.
	* targets.c: Add support for xstormy16.
	* cpu-xstormy16.c: New file.
	* elf32-xstormy16.c: New file.
	* Makefile.in: Regenerated.
	* bfd-in2.h: Regenerated.
	* configure: Regenerated.
	* libbfd.h: Regenerated.

Index: binutils/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (guess_is_rela): Add support for stormy16.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.

Index: gas/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* configure.in: Add support for xstormy16.
	* configure: Regenerated.
	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerated.
	* config/tc-xstormy16.c: New file.
	* config/tc-xstormy16.h: New file.

Index: gas/testsuite/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    matthew green  <mrg@redhat.com>

	* gas/xstormy16/allinsn.d: New file.
	* gas/xstormy16/allinsn.exp: New file.
	* gas/xstormy16/allinsn.s: New file.
	* gas/xstormy16/allinsn.sh: New file.
	* gas/xstormy16/gcc.d: New file.
	* gas/xstormy16/gcc.s: New file.
	* gas/xstormy16/gcc.sh: New file.
	* gas/xstormy16/reloc-1.d: New file.
	* gas/xstormy16/reloc-1.s: New file.
	* gas/xstormy16/reloc-2.d: New file.
	* gas/xstormy16/reloc-2.s: New file.

Index: ld/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

Index: opcodes/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* configure.in: Add support for xstormy16.
	* configure: Regenerate.
	* disassemble.c: Add support for xstormy16.
	* xstormy16-asm.c: New generated file.
	* xstormy16-desc.c: New generated file.
	* xstormy16-desc.h: New generated file.
	* xstormy16-dis.c: New generated file.
	* xstormy16-ibld.c: New generated file.
	* xstormy16-opc.c: New generated file.
	* xstormy16-opc.h: New generated file.

Index: include/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* dis-asm.h (print_insn_xstormy16): Declare.

Index: include/elf/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* common.h (EM_XSTORMY16): Define.
	* xstormy16.h: New file.
2001-12-08 03:46:03 +00:00
Alan Modra 82c7b87461 daily update 2001-12-07 23:00:04 +00:00
Nick Clifton cdc7c09f2e Combine sentance fragments into a single sentance in order to permit better
translation into foreign languages.
2001-12-07 12:32:42 +00:00
Nick Clifton 979f4a38ff Allow GDB to read general-purpose registers from Linux S/390 core files. 2001-12-07 12:23:26 +00:00
Jakub Jelinek 1fbc4a84a3 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
2001-09-14 change.
2001-12-07 11:14:12 +00:00
Jakub Jelinek c629eae01a * elf.c (_bfd_elf_rela_local_sym): Only call
_bfd_merged_section_offset if merge_info is non-NULL.
	(_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
	* elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
	prototypes.
	* elf32-arm.h (elf32_arm_final_link_relocate): Use
	_bfd_elf_section_offset.
	(elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
	* elf32-i386.c (elf_i386_relocate_section): Use
	_bfd_elf_section_offset and _bfd_elf_rel_local_sym.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Use
	_bfd_elf_section_offset.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2001-12-07 11:12:18 +00:00
Alan Modra 142f8c94be * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
already forced local.
2001-12-07 02:00:57 +00:00
Alan Modra 491a027ebd daily update 2001-12-06 23:00:04 +00:00
Nick Clifton e3c8793a40 Fixes to improve the ability to translate messages in the binutils tools 2001-12-06 10:22:36 +00:00
Hans-Peter Nilsson 2858ef35b4 * configure: Regenerate.
* Makefile.in: Regenerate.
2001-12-06 07:17:31 +00:00
Alan Modra e8eabb9d9a daily update 2001-12-05 23:00:05 +00:00
Thiemo Seufer 36b4548250 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
BFD64_LIBS, make the latter depending on the availability of BFD64.
	Add archive64.c source file.
	* archive64.c: New file implementing bfd_elf64_archive_slurp_armap
	and bfd_elf64_archive_write_armap, code from elf64-mips.c
	* archive.c (bfd_slurp_armap): Add ELF64 archive support.
	* config.bfd (mips*-*-irix6*): Allow with BFD64 only.
	(mips64*el-*-linux*): Likewise.
	(mips*el-*-linux*): Likewise. Reorder entries.
	* configure.in (bfd_libs): Define in dependency of BFD64 and
	AC_SUBST it.
	* elf64-mips.c (mips_elf64_slurp_armap): Remove, use
	bfd_elf64_archive_slurp_armap instead.
	(mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
	instead.
2001-12-05 22:46:21 +00:00
Alan Modra bafae9c48d daily update 2001-12-04 23:00:05 +00:00
Thiemo Seufer 956cd1d64d * config.bfd: Remove trailing blanks.
* elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
	* strings.c (get_char): Initialize value.
	* config/tc-mips.c (mips_cpreturn_offset): Better comment.
	(load_register): Better error message. Cast away signedness
	mismatches. Add casts needed for varargs.
	(load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl.
	Remove superfluous casts.
	(macro): Cast away signedness mismatches. Remove superfluous casts.
	(s_cpload): Fix wrong comment.
	(s_mips_weakext): Standardize output message.
	(get_number): Likewise.
2001-12-04 14:38:48 +00:00
Alexandre Oliva 2888ec1545 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
R_D10V_18_PCREL.  Check 10_PCREL relocations as signed.
Disable pointless overflow checking of NONE and 32.
2001-12-04 10:48:58 +00:00
Nick Clifton a9ef678ded fix typo 2001-12-04 09:46:41 +00:00
Alan Modra e207c4fac5 * reloc.c (bfd_install_relocation): Correct reloc address test.
(bfd_perform_relocation): Formatting fix.
	* bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
2001-12-03 23:16:20 +00:00
Alan Modra b61fdd7ef5 daily update 2001-12-03 23:00:04 +00:00
Nick Clifton 2299ff437b Import new turkish translations from Translation Project's website. 2001-12-03 10:46:36 +00:00
Alan Modra f09ebc7d49 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
happens to trigger on undefined symbols.
	(final_link_relocate): Return bfd_reloc_undefined for undefined
	stubs.
	(elf32_hppa_relocate_section): Don't say we can't handle a reloc
	if we have already warned about an undefined symbol.
2001-12-03 08:42:38 +00:00
Thiemo Seufer d75bc93d66 * elf32-mips.c (NEWABI_P): New define.
(USE_REL): Remove, replaced by
	(elf_backend_may_use_rel_p): New define.
	(elf_backend_may_use_rela_p): Likewise.
	(elf_backend_default_use_rela_p): Likewise.
	(elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
	Fix some relocation definitions.
	(elf_mips_howto_table_rela): New RELA relocation definitions for
	NewABI support.
	(mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
	(bfd_elf32_bfd_reloc_type_lookup): Likewise.
	(mips_rtype_to_howto): Likewise.
	(_bfd_mips_elf_relocate_section): Likewise.
	(_bfd_mips_elf_object_p): Typo.
	(elf_backend_sign_extend_vma): Reordered together with many other
	defines nearby to resemble the order of declaration in the header
	file.
2001-12-02 13:27:45 +00:00
Thiemo Seufer cdf6fd85e6 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	* pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
	* elf32-mips.c (mips_reloc_map): Likewise. Replace
	BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	* elf64-mips.c (mips_reloc_map): Likewise.
	* reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
	(BFD_RELOC_MIPS_GPREL32): Remove.
	* config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL
	by BFD_RELOC_GPREL16.
	(load_address): Likewise.
	(macro): Likewise.
	(md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by
	BFD_RELOC_GPREL32.
	(s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	(tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	*config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
2001-12-02 13:14:48 +00:00
Alan Modra ed12fa11e3 daily update 2001-12-01 23:00:04 +00:00
Alan Modra 2d43aa5e5f daily update 2001-11-30 23:00:05 +00:00
H.J. Lu 215007a648 2001-11-30 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_add_default_symbol): New.
	(elf_link_add_object_symbols): Call elf_add_default_symbol ()
	to create an indirect symbol from the default for the symbol
	with the default version if needed.
2001-11-30 15:50:56 +00:00
Alan Modra 567eaf74ef daily update 2001-11-29 23:00:06 +00:00
Nick Clifton fa49d2248e Do not overwite the core signal if it has already been set by another thread. 2001-11-29 10:34:01 +00:00
Alan Modra 1f068d4adc daily update 2001-11-28 23:00:04 +00:00
Jakub Jelinek f7460f5f76 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
(elf64_alpha_relocate_section): Translate local_got_entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.
	* elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
	sec_merge_done.
	(get_local_sym_hash): New, extracted from get_dyn_sym_info.
	(get_dyn_sym_info): Use it.
	(elfNN_ia64_relocate_section): Translate local dyn entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.

        * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
        in reloc if it has non-zero addend.
        * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
        * config/tc-sparc.c (md_apply_fix3): Likewise.
2001-11-28 19:15:14 +00:00
Nick Clifton 607334a109 Add .cvsignore files to skip .gmo files 2001-11-28 18:57:14 +00:00
Alan Modra ccf505facf daily update 2001-11-27 23:00:04 +00:00
H.J. Lu 163c1c309e 2001-11-27 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
	ELF.
2001-11-27 19:03:27 +00:00
Alan Modra 1588780944 daily update 2001-11-26 23:00:06 +00:00
Jeff Law fd0999e109 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
prototypes.
2001-11-26 19:31:27 +00:00
Alan Modra 9edf3ae12a daily update 2001-11-25 23:00:06 +00:00
Alan Modra 0fde5b57d5 daily update 2001-11-24 23:00:04 +00:00
Alan Modra a248e267b4 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
group sizes to accomodate c++.
2001-11-24 07:39:11 +00:00
Alan Modra c79d05084e daily update 2001-11-23 23:00:05 +00:00
Jakub Jelinek 2e549b45b8 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
relocations in non-alloced sections against global symbols
	defined in shared library being built.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2001-11-23 13:16:39 +00:00
Jakub Jelinek f8df10f4f5 * elf.c (_bfd_elf_rela_local_sym): New.
* elflink.h (elf_link_input_bfd): Don't consider empty
	merged sections as removed in relocation tests.
	* elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
	* elf32-i386.c (elf_i386_relocate_section): Handle relocs
	against STT_SECTION symbol of SHF_MERGE section.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Call
	_bfd_elf_rela_local_sym.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_final_link_relocate): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise for
	!partial_inplace relocs. Handle relocs against STT_SECTION
	symbol of SHF_MERGE for partial_inplace relocs.

	* config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
	* write.c (adjust_reloc_syms): Don't handle relocs against
	SEC_MERGE section symbols specially.
	(fixup_segment): Likewise.
2001-11-23 12:17:21 +00:00
Alan Modra 95a1f57169 daily update 2001-11-22 23:00:05 +00:00
Nick Clifton 313e863fa9 Move SRC-POTFILES.in and BLD-POTFILES.in to maintainer-clean target. 2001-11-22 16:21:01 +00:00
Alan Modra e614115148 daily update 2001-11-21 23:00:51 +00:00
Alan Modra d7458677f4 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
than sym_sec->output_section to detect relocs against discarded
	sections.
2001-11-21 14:58:26 +00:00
Alan Modra 7a47c3a29c daily update 2001-11-21 00:53:38 +00:00
H.J. Lu 45e9217a8f 2001-11-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
	discarding relocations.
2001-11-20 00:54:51 +00:00
Alan Modra b572d65c66 daily update 2001-11-19 23:00:05 +00:00
Nick Clifton 84c254c646 Define and use bfd_is_const_section(). 2001-11-19 15:35:38 +00:00
Alan Modra a0e94dc00c * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount. 2001-11-19 03:52:37 +00:00
Alan Modra 2a5aaecb4a * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
millicode syms as candidates for import stubs.
2001-11-19 03:01:43 +00:00
Alan Modra e5ee5df190 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
(allocate_PIC_calls): Rename to allocate_plt_static.
	(allocate_dynrelocs): Move most of code handling .plt entries to..
	(allocate_plt_static): ..here.  Don't drop plabel entries.
2001-11-19 01:25:00 +00:00
Hans-Peter Nilsson 6eeb40b2c0 * mmo.c: Adjust documentation tags to use texinfo 4 features. 2001-11-19 01:22:45 +00:00
Alan Modra 7138fabc3c daily update 2001-11-18 23:00:04 +00:00
Alan Modra b66167ff38 daily update 2001-11-17 23:00:06 +00:00
Alan Modra 773a0d1a66 daily update 2001-11-16 23:00:05 +00:00