This commit was generated by cvs2svn to compensate for changes in r91041,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
obrien 2002-02-22 04:18:42 +00:00
commit 8628599409
147 changed files with 12862 additions and 3884 deletions

View File

@ -1,3 +1,35 @@
2002-02-09 Alexandre Oliva <aoliva@redhat.com>
Contribute sh64-elf.
2000-12-01 Alexandre Oliva <aoliva@redhat.com>
* configure.in: Added sh64-*-*.
2002-02-04 Jeff Johnston <jjohnstn@redhat.com>
* COPYING.NEWLIB: Remove advertising clause from
Berkeley and Red Hat licenses.
2002-02-01 Mo DeJong <supermo@bayarea.net>
* Makefile.in: Add all-tix to deps for all-snavigator
so that tix is built when building snavigator.
2002-02-01 Ben Elliston <bje@redhat.com>
* config.guess: Import from master sources, rev 1.229.
* config.sub: Import from master sources, rev 1.240.
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.
2002-01-26 Jason Thorpe <thorpej@wasabisystems.com>
* configure.in (*-*-netbsd*): New. Skip target-newlib,

View File

@ -1799,7 +1799,7 @@ all-send-pr: all-prms
all-shellutils:
all-sid: all-tcl all-tk
all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen
all-snavigator: all-tcl all-tk all-itcl all-db all-grep all-libgui
all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
all-tar: all-libiberty
all-tcl:
all-tcl8.1:

View File

@ -1,12 +1,761 @@
2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
little endian.
2002-02-19 Jakub Jelinek <jakub@redhat.com>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
absptr -> pcrel optimization for shared libs.
Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
library cannot be converted to pcrel.
(_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
relative.
* elf32-i386.c (elf_i386_relocate_section): If
_bfd_elf_section_offset returned -2, skip, but make sure the
relocation is installed.
* elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
* 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-ppc.c (ppc_elf_relocate_section): Likewise.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sh.c (sh_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Handle
_bfd_elf_section_offset returning -2 the same way as -1.
* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
* elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
and BFD_ASSERT.
* elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2002-02-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
* elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
from _bfd_elf_hppa_gen_reloc_type.
(_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
* elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
* elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
* elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
* mmo.c: Correct and improve comments.
(mmo_write_chunk): Store trailing byte in bfd buffer; don't
zero-pad. Use input to fill up non-empty bfd buffer.
(mmo_flush_chunk): New function.
(mmo_write_loc_chunk): Add parameter last_vmap, all callers
changed. Don't emit location specifier if VMA is same as
*LAST_VMAP after omitting leading zero contents. Call
mmo_flush_chunk before emitting location specifier.
(mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
with mmo_write_loc_chunk calls.
(mmo_internal_write_section): Call mmo_flush_chunk after
mmo_write_chunk.
(mmo_write_symbols_and_terminator): Move :Main to first position
in symbol array. Add faked one if it does not exist if there are
other symbols. Don't add it if there are no symbols at all. Move
out test for value of :Main from symbol loop. Rename table
fakemain to maintable and variable mainsym to fakemain.
2002-02-15 Richard Henderson <rth@redhat.com>
* elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
section with no got matches any got. Simplify error generaion.
2002-02-14 Alan Modra <amodra@bigpond.net.au>
* elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2002-02-13 Hans-Peter Nilsson <hp@bitrange.com>
* config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
vectors.
(sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
vectors.
2002-02-13 Matt Fredette <fredette@netbsd.org>
* elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
EF_M68000.
2002-02-12 Alexandre Oliva <aoliva@redhat.com>
* elf-m10300.c (mn10300_elf_relax_section): Skip section before
loading its contents if there's nothing to do in it.
2002-02-12 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
64k boundary.
* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
(ppc64_elf_finish_dynamic_sections): Set values for them.
2002-02-11 Alexandre Oliva <aoliva@redhat.com>
* elf32-sh.c: Added missing prototypes.
* elf32-sh64.c: Likewise.
(sh_elf_align_loads): Mark unused args as such.
* elf64-sh64.c: Added missing prototypes.
(struct elf_sh64_link_hash_entry): Fix typo.
(sh_elf64_relocate_section): Fix info argument passed to
_bfd_elf_section_offset.
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
variable warnings.
* elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
comparison warning.
* trad-core.c (trad_unix_core_file_p): Silence pointer/integer
cast warnings for the common case.
2002-02-09 Richard Henderson <rth@redhat.com>
* 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 Hans-Peter Nilsson <hp@bitrange.com>
* 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-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-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 Ivan Guzvinec <ivang@opencores.org>
* coff-or32.c: Fix compile time warning messages.
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
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-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-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 Nick Clifton <nickc@cambridge.redhat.com>
* coffcode.h (coff_set_arch_mach_hook): 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-05 Nick Clifton <nickc@redhat.com>
* po/tr.po: Updated translation.
2002-02-05 Alan Modra <amodra@bigpond.net.au>
From Jimi X <jimix@watson.ibm.com>
* 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.
2002-02-05 Alan Modra <amodra@bigpond.net.au>
* 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-04 Hans-Peter Nilsson <hp@bitrange.com>
* 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-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 Jason Thorpe <thorpej@wasabisystems.com>
* config.bfd (hppa*-*-netbsd*): New target.
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 Hans-Peter Nilsson <hp@bitrange.com>
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 Tom Rix <trix@redhat.com>
* config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am"
* Makefile.in: Regenerate.
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.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* coff-or32.c: New file.
* cpu-or32.c: New file.
* elf32-or32.c: New file.
* archures.c: Add support for or32.
* targets.c: Add support for or32.
* bfd-in2.h: Regenerate.
* coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
coff_write_object_contents): Add support for or32.
* config.bfd: Add target.
* configure.in: Add support for or32.
* configure: Regenerate.
* Makefile.am: Add support for or32.
* Makefile.in: Regenerate.
* po/SRC-POTFILES.in: Add or32 files.
* po/bfd.pot: Regenerate.
2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
Don Lindsay <lindsayd@cisco.com>
* elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
false' with a return of a bfd_reloc_ error code.
2002-01-31 Hans-Peter Nilsson <hp@axis.com>
* 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-30 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h: Include <stdbool.h> if it is available.
* bfd-in2.h: Regenerated.
2002-01-31 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
not go via the plt.
2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
* archures.c: Tidy up formatting of embedded comments.
* bfd.c: Tidy up formatting of embedded comments.
* bfd-in.h: Fix formatting of comments.
* reloc.c: Tidy up formatting of ordinary & embedded comments.
* section.c: Tidy up formatting of embedded comments.
* syms.c: Tidy up formatting of embedded comments.
* targets.c: Tidy up formatting of embedded comments.
* bfd-in2.h: Regenerate.
2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
* vms-tir.c (cmd_name): New function.
(tir_cmd_name): New function.
(etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
(tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
Fix formatting.
* peXXigen.c (pe_print_idata): Rearrange message to aid in
translation.
(pe_print_pdata): Rearrange message to aid in translation.
* libbfd.c (warn_deprecated): Rearrange error message to aid in
translation.
* ihex.c (ihex_write_object_contents): Fix spelling typo.
* ieee.c (ieee_slurp_external_symbols): Remove spurious space.
* elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
message to aid in translation.
* elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
to aid in translation.
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2002-01-30 Philipp Thomas <pthomas@suse.de>
* coff-arm.c, elf32-elf.h: Unify messages.
2002-01-30 Nick Clifton <nickc@redhat.com>
* po/sv.po: Updated translation.
2002-01-30 Philipp Thomas <pthomas@suse.de>
* dwarf2.c (read_abbrev): Use full section name in error message.
(decode_line_info): Likewise.
* elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
message.
2002-01-30 Alan Modra <amodra@bigpond.net.au>
* 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-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-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-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
* 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-28 Jason Thorpe <thorpej@wasabisystems.com>
* elfcore.h (elf_core_file_p): Improve comment for last change.
2002-01-27 Daniel Jacobowitz <drow@mvista.com>
* configure: Regenerated.
2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
* elfcore.h (elf_core_file_p): Set the machine architecture
before processing the program headers.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* configure.in <64-bit configuration>: If using gcc, check and
emit error for egcs-1.1.2.
* configure: Regenerate.
* doc/Makefile.am (install): Depend on install-info.
* doc/Makefile.in: Regenerate.
2002-01-26 Egor Duda <deo@logos-m.ru>
* elf.c (elfcore_grok_win32pstatus): Copy only as much information

View File

@ -73,6 +73,7 @@ ALL_MACHINES = \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-or32.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-pdp11.lo \
@ -120,6 +121,7 @@ ALL_MACHINES_CFILES = \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
cpu-or32.c \
cpu-ns32k.c \
cpu-openrisc.c \
cpu-pdp11.c \
@ -168,6 +170,7 @@ BFD32_BACKENDS = \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
coff-or32.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
@ -212,11 +215,13 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elf32-mips.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sh64.lo \
elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
@ -313,6 +318,7 @@ BFD32_BACKENDS_CFILES = \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
coff-or32.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
@ -356,8 +362,10 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elf32-mips.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
elf32-sh64.c \
elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
@ -445,6 +453,7 @@ BFD64_BACKENDS = \
elf64-gen.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
@ -468,6 +477,7 @@ BFD64_BACKENDS_CFILES = \
elf64-mmix.c \
elf64-ppc.c \
elf64-s390.c \
elf64-sh64.c \
elf64-sparc.c \
elf64.c \
mmo.c \
@ -850,6 +860,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
@ -955,6 +966,9 @@ coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
libcoff.h libecoff.h coffswap.h ecoffswap.h
coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/coff/or32.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
$(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
@ -1113,6 +1127,10 @@ elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/libiberty.h elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
@ -1121,6 +1139,14 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h $(srcdir)/../opcodes/sh64-opc.h
elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \

View File

@ -199,6 +199,7 @@ ALL_MACHINES = \
cpu-mcore.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-or32.lo \
cpu-ns32k.lo \
cpu-openrisc.lo \
cpu-pdp11.lo \
@ -247,6 +248,7 @@ ALL_MACHINES_CFILES = \
cpu-mcore.c \
cpu-mips.c \
cpu-mmix.c \
cpu-or32.c \
cpu-ns32k.c \
cpu-openrisc.c \
cpu-pdp11.c \
@ -296,6 +298,7 @@ BFD32_BACKENDS = \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
coff-or32.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
@ -340,11 +343,13 @@ BFD32_BACKENDS = \
elf32-mcore.lo \
elf32-mips.lo \
elf32-openrisc.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sh64.lo \
elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
@ -442,6 +447,7 @@ BFD32_BACKENDS_CFILES = \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
coff-or32.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
@ -485,8 +491,10 @@ BFD32_BACKENDS_CFILES = \
elf32-mcore.c \
elf32-mips.c \
elf32-openrisc.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
elf32-sh64.c \
elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
@ -575,6 +583,7 @@ BFD64_BACKENDS = \
elf64-gen.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
@ -599,6 +608,7 @@ BFD64_BACKENDS_CFILES = \
elf64-mmix.c \
elf64-ppc.c \
elf64-s390.c \
elf64-sh64.c \
elf64-sparc.c \
elf64.c \
mmo.c \
@ -717,7 +727,6 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
#DEFS = @DEFS@ @elf_dynamic_interpreter@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
@ -741,7 +750,7 @@ configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@ -1395,6 +1404,7 @@ cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
@ -1500,6 +1510,9 @@ coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
libcoff.h libecoff.h coffswap.h ecoffswap.h
coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/coff/or32.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
$(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
@ -1658,6 +1671,10 @@ elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/libiberty.h elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \
@ -1666,6 +1683,14 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h $(srcdir)/../opcodes/sh64-opc.h
elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \

View File

@ -1,6 +1,6 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
@ -69,8 +69,8 @@ DESCRIPTION
.enum bfd_architecture
.{
. bfd_arch_unknown, {* File arch not known *}
. bfd_arch_obscure, {* Arch known, not one of these *}
. bfd_arch_unknown, {* File arch not known. *}
. bfd_arch_obscure, {* Arch known, not one of these. *}
. bfd_arch_m68k, {* Motorola 68xxx *}
.#define bfd_mach_m68000 1
.#define bfd_mach_m68008 2
@ -103,6 +103,8 @@ DESCRIPTION
.#define bfd_mach_i960_jx 7
.#define bfd_mach_i960_hx 8
.
. bfd_arch_or32, {* OpenRISC 32 *}
.
. bfd_arch_a29k, {* AMD 29000 *}
. bfd_arch_sparc, {* SPARC *}
.#define bfd_mach_sparc 1
@ -110,12 +112,12 @@ DESCRIPTION
.#define bfd_mach_sparc_sparclet 2
.#define bfd_mach_sparc_sparclite 3
.#define bfd_mach_sparc_v8plus 4
.#define bfd_mach_sparc_v8plusa 5 {* with ultrasparc add'ns *}
.#define bfd_mach_sparc_v8plusa 5 {* with ultrasparc add'ns. *}
.#define bfd_mach_sparc_sparclite_le 6
.#define bfd_mach_sparc_v9 7
.#define bfd_mach_sparc_v9a 8 {* with ultrasparc add'ns *}
.#define bfd_mach_sparc_v8plusb 9 {* with cheetah add'ns *}
.#define bfd_mach_sparc_v9b 10 {* with cheetah add'ns *}
.#define bfd_mach_sparc_v9a 8 {* with ultrasparc add'ns. *}
.#define bfd_mach_sparc_v8plusb 9 {* with cheetah add'ns. *}
.#define bfd_mach_sparc_v9b 10 {* with cheetah add'ns. *}
.{* Nonzero if MACH has the v9 instruction set. *}
.#define bfd_mach_sparc_v9_p(mach) \
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
@ -163,6 +165,7 @@ DESCRIPTION
. bfd_arch_pdp11, {* DEC PDP-11 *}
. bfd_arch_powerpc, {* PowerPC *}
.#define bfd_mach_ppc 0
.#define bfd_mach_ppc64 1
.#define bfd_mach_ppc_403 403
.#define bfd_mach_ppc_403gc 4030
.#define bfd_mach_ppc_505 505
@ -204,11 +207,12 @@ DESCRIPTION
.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
.#define bfd_mach_sh4 0x40
.#define bfd_mach_sh5 0x50
. bfd_arch_alpha, {* Dec Alpha *}
.#define bfd_mach_alpha_ev4 0x10
.#define bfd_mach_alpha_ev5 0x20
.#define bfd_mach_alpha_ev6 0x30
. bfd_arch_arm, {* Advanced Risc Machines ARM *}
. bfd_arch_arm, {* Advanced Risc Machines ARM. *}
.#define bfd_mach_arm_2 1
.#define bfd_mach_arm_2a 2
.#define bfd_mach_arm_3 3
@ -234,7 +238,7 @@ DESCRIPTION
.#define bfd_mach_arc_7 2
.#define bfd_mach_arc_8 3
. bfd_arch_m32r, {* Mitsubishi M32R/D *}
.#define bfd_mach_m32r 0 {* backwards compatibility *}
.#define bfd_mach_m32r 0 {* For backwards compatibility. *}
.#define bfd_mach_m32rx 'x'
. bfd_arch_mn10200, {* Matsushita MN10200 *}
. bfd_arch_mn10300, {* Matsushita MN10300 *}
@ -247,7 +251,7 @@ DESCRIPTION
.#define bfd_mach_ia64_elf64 0
.#define bfd_mach_ia64_elf32 1
. bfd_arch_pj,
. bfd_arch_avr, {* Atmel AVR microcontrollers *}
. bfd_arch_avr, {* Atmel AVR microcontrollers. *}
.#define bfd_mach_avr1 1
.#define bfd_mach_avr2 2
.#define bfd_mach_avr3 3
@ -258,7 +262,7 @@ DESCRIPTION
.#define bfd_mach_s390_esa 0
.#define bfd_mach_s390_esame 1
. bfd_arch_openrisc, {* OpenRISC *}
. bfd_arch_mmix, {* Donald Knuth's educational processor *}
. bfd_arch_mmix, {* Donald Knuth's educational processor. *}
. bfd_arch_xstormy16,
.#define bfd_mach_xstormy16 0
. bfd_arch_last
@ -293,16 +297,20 @@ DESCRIPTION
. boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
.
. const struct bfd_arch_info *next;
.} bfd_arch_info_type;
.}
.bfd_arch_info_type;
.
*/
extern const bfd_arch_info_type bfd_a29k_arch;
extern const bfd_arch_info_type bfd_alpha_arch;
extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_cris_arch;
extern const bfd_arch_info_type bfd_d10v_arch;
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
extern const bfd_arch_info_type bfd_h8500_arch;
extern const bfd_arch_info_type bfd_hppa_arch;
@ -310,39 +318,40 @@ extern const bfd_arch_info_type bfd_i370_arch;
extern const bfd_arch_info_type bfd_i386_arch;
extern const bfd_arch_info_type bfd_i860_arch;
extern const bfd_arch_info_type bfd_i960_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
extern const bfd_arch_info_type bfd_m32r_arch;
extern const bfd_arch_info_type bfd_m68hc11_arch;
extern const bfd_arch_info_type bfd_m68hc12_arch;
extern const bfd_arch_info_type bfd_m68k_arch;
extern const bfd_arch_info_type bfd_m88k_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_mips_arch;
extern const bfd_arch_info_type bfd_mmix_arch;
extern const bfd_arch_info_type bfd_mn10200_arch;
extern const bfd_arch_info_type bfd_mn10300_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_or32_arch;
extern const bfd_arch_info_type bfd_pdp11_arch;
extern const bfd_arch_info_type bfd_powerpc_arch;
extern const bfd_arch_info_type bfd_rs6000_arch;
extern const bfd_arch_info_type bfd_pj_arch;
extern const bfd_arch_info_type bfd_powerpc_archs[];
#define bfd_powerpc_arch bfd_powerpc_archs[0]
extern const bfd_arch_info_type bfd_rs6000_arch;
extern const bfd_arch_info_type bfd_s390_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
extern const bfd_arch_info_type bfd_tic80_arch;
extern const bfd_arch_info_type bfd_v850_arch;
extern const bfd_arch_info_type bfd_vax_arch;
extern const bfd_arch_info_type bfd_we32k_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
extern const bfd_arch_info_type bfd_ns32k_arch;
extern const bfd_arch_info_type bfd_w65_arch;
extern const bfd_arch_info_type bfd_v850_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
extern const bfd_arch_info_type bfd_s390_arch;
extern const bfd_arch_info_type bfd_openrisc_arch;
extern const bfd_arch_info_type bfd_mmix_arch;
extern const bfd_arch_info_type bfd_xstormy16_arch;
extern const bfd_arch_info_type bfd_z8k_arch;
static const bfd_arch_info_type * const bfd_archures_list[] = {
static const bfd_arch_info_type * const bfd_archures_list[] =
{
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
@ -350,9 +359,11 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_alpha_arch,
&bfd_arc_arch,
&bfd_arm_arch,
&bfd_avr_arch,
&bfd_cris_arch,
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_fr30_arch,
&bfd_h8300_arch,
&bfd_h8500_arch,
&bfd_hppa_arch,
@ -360,36 +371,35 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_i386_arch,
&bfd_i860_arch,
&bfd_i960_arch,
&bfd_ia64_arch,
&bfd_m32r_arch,
&bfd_m68hc11_arch,
&bfd_m68hc12_arch,
&bfd_m68k_arch,
&bfd_m88k_arch,
&bfd_mcore_arch,
&bfd_mips_arch,
&bfd_mmix_arch,
&bfd_mn10200_arch,
&bfd_mn10300_arch,
&bfd_ns32k_arch,
&bfd_openrisc_arch,
&bfd_or32_arch,
&bfd_pdp11_arch,
&bfd_powerpc_arch,
&bfd_rs6000_arch,
&bfd_s390_arch,
&bfd_sh_arch,
&bfd_sparc_arch,
&bfd_tic30_arch,
&bfd_tic54x_arch,
&bfd_tic80_arch,
&bfd_vax_arch,
&bfd_we32k_arch,
&bfd_z8k_arch,
&bfd_ns32k_arch,
&bfd_w65_arch,
&bfd_v850_arch,
&bfd_fr30_arch,
&bfd_mcore_arch,
&bfd_avr_arch,
&bfd_ia64_arch,
&bfd_s390_arch,
&bfd_openrisc_arch,
&bfd_mmix_arch,
&bfd_vax_arch,
&bfd_w65_arch,
&bfd_we32k_arch,
&bfd_xstormy16_arch,
&bfd_z8k_arch,
#endif
0
};

View File

@ -1,6 +1,6 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@ -71,7 +71,7 @@ extern "C" {
#endif
#endif
/* forward declaration */
/* Forward declaration. */
typedef struct _bfd bfd;
/* To squelch erroneous compiler warnings ("illegal pointer
@ -88,8 +88,16 @@ typedef struct _bfd bfd;
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
/* And even worse if your compiler provides a stdbool.h that conflicts
with these definitions... gcc 2.95 and later do. If so, it must
be included first. -drow */
#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
#else
#if defined (__bool_true_false_are_defined)
/* We have <stdbool.h>. */
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#endif
#ifdef MPW
/* Pre-emptive strike - get the file with the enum. */
@ -191,15 +199,17 @@ extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
typedef unsigned int flagword; /* 32 bits of flags */
typedef unsigned char bfd_byte;
/** File formats */
/* File formats. */
typedef enum bfd_format {
bfd_unknown = 0, /* file format is unknown */
bfd_object, /* linker/assember/compiler output */
bfd_archive, /* object archive file */
bfd_core, /* core dump */
bfd_type_end} /* marks the end; don't use it! */
bfd_format;
typedef enum bfd_format
{
bfd_unknown = 0, /* File format is unknown. */
bfd_object, /* Linker/assember/compiler output. */
bfd_archive, /* Object archive file. */
bfd_core, /* Core dump. */
bfd_type_end /* Marks the end; don't use it! */
}
bfd_format;
/* Values that may appear in the flags field of a BFD. These also
appear in the object_flags field of the bfd_target structure, where
@ -258,7 +268,7 @@ typedef enum bfd_format {
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
/* symbols and relocation */
/* Symbols and relocation. */
/* A count of carsyms (canonical archive symbols). */
typedef unsigned long symindex;
@ -283,32 +293,39 @@ typedef const struct reloc_howto_struct reloc_howto_type;
/* A canonical archive symbol. */
/* This is a type pun with struct ranlib on purpose! */
typedef struct carsym {
typedef struct carsym
{
char *name;
file_ptr file_offset; /* look here to find the file */
} carsym; /* to make these you call a carsymogen */
file_ptr file_offset; /* Look here to find the file. */
}
carsym; /* To make these you call a carsymogen. */
/* Used in generating armaps (archive tables of contents).
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
char **name; /* symbol name */
union {
struct orl /* Output ranlib. */
{
char **name; /* Symbol name. */
union
{
file_ptr pos;
bfd *abfd;
} u; /* bfd* or file position */
int namidx; /* index into string table */
} u; /* bfd* or file position. */
int namidx; /* Index into string table. */
};
/* Linenumber stuff */
typedef struct lineno_cache_entry {
unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
bfd_vma offset; /* Offset into section */
/* Linenumber stuff. */
typedef struct lineno_cache_entry
{
unsigned int line_number; /* Linenumber from start of function. */
union
{
struct symbol_cache_entry *sym; /* Function name. */
bfd_vma offset; /* Offset into section. */
} u;
} alent;
}
alent;
/* object and core file sections */
/* Object and core file sections. */
#define align_power(addr, align) \
( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
@ -447,7 +464,7 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
/* User program access to BFD facilities */
/* User program access to BFD facilities. */
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
@ -663,6 +680,9 @@ extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
extern boolean bfd_m68k_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern boolean bfd_mips_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
/* SunOS shared library support routines for the linker. */
@ -688,7 +708,8 @@ extern boolean bfd_sparclinux_size_dynamic_sections
struct _bfd_window_internal;
typedef struct _bfd_window_internal bfd_window_internal;
typedef struct _bfd_window {
typedef struct _bfd_window
{
/* What the user asked for. */
PTR data;
bfd_size_type size;
@ -699,7 +720,8 @@ typedef struct _bfd_window {
application; don't want to give the same region back when the
application wants two writable copies! */
struct _bfd_window_internal *i;
} bfd_window;
}
bfd_window;
extern void bfd_init_window PARAMS ((bfd_window *));
extern void bfd_free_window PARAMS ((bfd_window *));

View File

@ -6,7 +6,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@ -77,7 +77,7 @@ extern "C" {
#endif
#endif
/* forward declaration */
/* Forward declaration. */
typedef struct _bfd bfd;
/* To squelch erroneous compiler warnings ("illegal pointer
@ -94,8 +94,16 @@ typedef struct _bfd bfd;
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
/* It gets worse if the host also defines a true/false enum... -sts */
/* And even worse if your compiler has built-in boolean types... -law */
/* And even worse if your compiler provides a stdbool.h that conflicts
with these definitions... gcc 2.95 and later do. If so, it must
be included first. -drow */
#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
#define TRUE_FALSE_ALREADY_DEFINED
#else
#if defined (__bool_true_false_are_defined)
/* We have <stdbool.h>. */
#define TRUE_FALSE_ALREADY_DEFINED
#endif
#endif
#ifdef MPW
/* Pre-emptive strike - get the file with the enum. */
@ -197,15 +205,17 @@ extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
typedef unsigned int flagword; /* 32 bits of flags */
typedef unsigned char bfd_byte;
/** File formats */
/* File formats. */
typedef enum bfd_format {
bfd_unknown = 0, /* file format is unknown */
bfd_object, /* linker/assember/compiler output */
bfd_archive, /* object archive file */
bfd_core, /* core dump */
bfd_type_end} /* marks the end; don't use it! */
bfd_format;
typedef enum bfd_format
{
bfd_unknown = 0, /* File format is unknown. */
bfd_object, /* Linker/assember/compiler output. */
bfd_archive, /* Object archive file. */
bfd_core, /* Core dump. */
bfd_type_end /* Marks the end; don't use it! */
}
bfd_format;
/* Values that may appear in the flags field of a BFD. These also
appear in the object_flags field of the bfd_target structure, where
@ -264,7 +274,7 @@ typedef enum bfd_format {
memory. If this is set, iostream points to a bfd_in_memory struct. */
#define BFD_IN_MEMORY 0x800
/* symbols and relocation */
/* Symbols and relocation. */
/* A count of carsyms (canonical archive symbols). */
typedef unsigned long symindex;
@ -289,32 +299,39 @@ typedef const struct reloc_howto_struct reloc_howto_type;
/* A canonical archive symbol. */
/* This is a type pun with struct ranlib on purpose! */
typedef struct carsym {
typedef struct carsym
{
char *name;
file_ptr file_offset; /* look here to find the file */
} carsym; /* to make these you call a carsymogen */
file_ptr file_offset; /* Look here to find the file. */
}
carsym; /* To make these you call a carsymogen. */
/* Used in generating armaps (archive tables of contents).
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
char **name; /* symbol name */
union {
struct orl /* Output ranlib. */
{
char **name; /* Symbol name. */
union
{
file_ptr pos;
bfd *abfd;
} u; /* bfd* or file position */
int namidx; /* index into string table */
} u; /* bfd* or file position. */
int namidx; /* Index into string table. */
};
/* Linenumber stuff */
typedef struct lineno_cache_entry {
unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
bfd_vma offset; /* Offset into section */
/* Linenumber stuff. */
typedef struct lineno_cache_entry
{
unsigned int line_number; /* Linenumber from start of function. */
union
{
struct symbol_cache_entry *sym; /* Function name. */
bfd_vma offset; /* Offset into section. */
} u;
} alent;
}
alent;
/* object and core file sections */
/* Object and core file sections. */
#define align_power(addr, align) \
( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
@ -453,7 +470,7 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
/* User program access to BFD facilities */
/* User program access to BFD facilities. */
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
@ -669,6 +686,9 @@ extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
extern boolean bfd_m68k_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
extern boolean bfd_mips_elf32_create_embedded_relocs
PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
char **));
/* SunOS shared library support routines for the linker. */
@ -694,7 +714,8 @@ extern boolean bfd_sparclinux_size_dynamic_sections
struct _bfd_window_internal;
typedef struct _bfd_window_internal bfd_window_internal;
typedef struct _bfd_window {
typedef struct _bfd_window
{
/* What the user asked for. */
PTR data;
bfd_size_type size;
@ -705,7 +726,8 @@ typedef struct _bfd_window {
application; don't want to give the same region back when the
application wants two writable copies! */
struct _bfd_window_internal *i;
} bfd_window;
}
bfd_window;
extern void bfd_init_window PARAMS ((bfd_window *));
extern void bfd_free_window PARAMS ((bfd_window *));
@ -982,25 +1004,20 @@ typedef struct sec
{
/* The name of the section; the name isn't a copy, the pointer is
the same as that passed to bfd_make_section. */
const char *name;
/* A unique sequence number. */
int id;
/* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
int index;
/* The next section in the list belonging to the BFD, or NULL. */
struct sec *next;
/* The field flags contains attributes of the section. Some
flags are read in from the object file, and some are
synthesized from other information. */
flagword flags;
#define SEC_NO_FLAGS 0x000
@ -1209,25 +1226,21 @@ typedef struct sec
backend can assign addresses (for example, in <<a.out>>, where
the default address for <<.data>> is dependent on the specific
target and various flags). */
bfd_vma vma;
/* The load address of the section - where it would be in a
rom image; really only used for writing section header
information. */
bfd_vma lma;
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
size of <<.bss>>). This will be filled in after relocation. */
bfd_size_type _cooked_size;
/* The original size on disk of the section, in octets. Normally this
value is the same as the size, but if some relaxing has
been done, then this value will be bigger. */
bfd_size_type _raw_size;
/* If this section is going to be output, then this value is the
@ -1237,49 +1250,39 @@ typedef struct sec
100th octet (8-bit quantity) in the output section, this value
would be 100. However, if the target byte size is 16 bits
(bfd_octets_per_byte is "2"), this value would be 50. */
bfd_vma output_offset;
/* The output section through which to map on output. */
struct sec *output_section;
/* The alignment requirement of the section, as an exponent of 2 -
e.g., 3 aligns to 2^3 (or 8). */
unsigned int alignment_power;
/* If an input section, a pointer to a vector of relocation
records for the data in this section. */
struct reloc_cache_entry *relocation;
/* If an output section, a pointer to a vector of pointers to
relocation records for the data in this section. */
struct reloc_cache_entry **orelocation;
/* The number of relocation records in one of the above */
/* The number of relocation records in one of the above. */
unsigned reloc_count;
/* Information below is back end specific - and not always used
or updated. */
/* File position of section data. */
file_ptr filepos;
/* File position of relocation info. */
file_ptr rel_filepos;
/* File position of line data. */
file_ptr line_filepos;
/* Pointer to data for applications. */
PTR userdata;
/* If the SEC_IN_MEMORY flag is set, this points to the actual
@ -1287,48 +1290,40 @@ typedef struct sec
unsigned char *contents;
/* Attached line number information. */
alent *lineno;
/* Number of line number records. */
unsigned int lineno_count;
/* Entity size for merging purposes. */
unsigned int entsize;
/* Optional information about a COMDAT entry; NULL if not COMDAT. */
struct bfd_comdat_info *comdat;
/* When a section is being output, this value changes as more
linenumbers are written out. */
file_ptr moving_line_filepos;
/* What the section number is in the target world. */
int target_index;
PTR used_by_bfd;
/* If this is a constructor section then here is a list of the
relocations created to relocate items within it. */
struct relent_chain *constructor_chain;
/* The BFD which owns the section. */
bfd *owner;
/* A symbol which points at this section only */
/* A symbol which points at this section only. */
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
struct bfd_link_order *link_order_head;
struct bfd_link_order *link_order_tail;
} asection ;
} asection;
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
@ -1340,18 +1335,18 @@ typedef struct sec
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
/* the absolute section */
/* The absolute section. */
extern const asection bfd_abs_section;
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
/* Pointer to the undefined section */
/* Pointer to the undefined section. */
extern const asection bfd_und_section;
#define bfd_und_section_ptr ((asection *) &bfd_und_section)
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
/* Pointer to the common section */
/* Pointer to the common section. */
extern const asection bfd_com_section;
#define bfd_com_section_ptr ((asection *) &bfd_com_section)
/* Pointer to the indirect section */
/* Pointer to the indirect section. */
extern const asection bfd_ind_section;
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
@ -1453,8 +1448,8 @@ _bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *se
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known */
bfd_arch_obscure, /* Arch known, not one of these */
bfd_arch_unknown, /* File arch not known. */
bfd_arch_obscure, /* Arch known, not one of these. */
bfd_arch_m68k, /* Motorola 68xxx */
#define bfd_mach_m68000 1
#define bfd_mach_m68008 2
@ -1487,6 +1482,8 @@ enum bfd_architecture
#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
bfd_arch_or32, /* OpenRISC 32 */
bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
@ -1494,12 +1491,12 @@ enum bfd_architecture
#define bfd_mach_sparc_sparclet 2
#define bfd_mach_sparc_sparclite 3
#define bfd_mach_sparc_v8plus 4
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
#define bfd_mach_sparc_sparclite_le 6
#define bfd_mach_sparc_v9 7
#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */
#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */
#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */
#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
/* Nonzero if MACH has the v9 instruction set. */
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
@ -1547,6 +1544,7 @@ enum bfd_architecture
bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
#define bfd_mach_ppc 0
#define bfd_mach_ppc64 1
#define bfd_mach_ppc_403 403
#define bfd_mach_ppc_403gc 4030
#define bfd_mach_ppc_505 505
@ -1588,11 +1586,12 @@ enum bfd_architecture
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
#define bfd_mach_sh5 0x50
bfd_arch_alpha, /* Dec Alpha */
#define bfd_mach_alpha_ev4 0x10
#define bfd_mach_alpha_ev5 0x20
#define bfd_mach_alpha_ev6 0x30
bfd_arch_arm, /* Advanced Risc Machines ARM */
bfd_arch_arm, /* Advanced Risc Machines ARM. */
#define bfd_mach_arm_2 1
#define bfd_mach_arm_2a 2
#define bfd_mach_arm_3 3
@ -1618,7 +1617,7 @@ enum bfd_architecture
#define bfd_mach_arc_7 2
#define bfd_mach_arc_8 3
bfd_arch_m32r, /* Mitsubishi M32R/D */
#define bfd_mach_m32r 0 /* backwards compatibility */
#define bfd_mach_m32r 0 /* For backwards compatibility. */
#define bfd_mach_m32rx 'x'
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
@ -1631,7 +1630,7 @@ enum bfd_architecture
#define bfd_mach_ia64_elf64 0
#define bfd_mach_ia64_elf32 1
bfd_arch_pj,
bfd_arch_avr, /* Atmel AVR microcontrollers */
bfd_arch_avr, /* Atmel AVR microcontrollers. */
#define bfd_mach_avr1 1
#define bfd_mach_avr2 2
#define bfd_mach_avr3 3
@ -1642,7 +1641,7 @@ enum bfd_architecture
#define bfd_mach_s390_esa 0
#define bfd_mach_s390_esame 1
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
#define bfd_mach_xstormy16 0
bfd_arch_last
@ -1667,7 +1666,9 @@ typedef struct bfd_arch_info
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
const struct bfd_arch_info *next;
} bfd_arch_info_type;
}
bfd_arch_info_type;
const char *
bfd_printable_name PARAMS ((bfd *abfd));
@ -1717,7 +1718,7 @@ bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
typedef enum bfd_reloc_status
{
/* No errors detected */
/* No errors detected. */
bfd_reloc_ok,
/* The relocation was performed, but there was an overflow. */
@ -1726,13 +1727,13 @@ typedef enum bfd_reloc_status
/* The address to relocate was not within the section supplied. */
bfd_reloc_outofrange,
/* Used by special functions */
/* Used by special functions. */
bfd_reloc_continue,
/* Unsupported relocation size requested. */
bfd_reloc_notsupported,
/* Unused */
/* Unused. */
bfd_reloc_other,
/* The symbol to relocate against was undefined. */
@ -1749,19 +1750,21 @@ typedef enum bfd_reloc_status
typedef struct reloc_cache_entry
{
/* A pointer into the canonical table of pointers */
/* A pointer into the canonical table of pointers. */
struct symbol_cache_entry **sym_ptr_ptr;
/* offset in section */
/* offset in section. */
bfd_size_type address;
/* addend for relocation value */
/* addend for relocation value. */
bfd_vma addend;
/* Pointer to how to perform the required relocation */
/* Pointer to how to perform the required relocation. */
reloc_howto_type *howto;
} arelent;
}
arelent;
enum complain_overflow
{
/* Do not complain on overflow. */
@ -1868,6 +1871,7 @@ struct reloc_howto_struct
empty (e.g., m88k bcs); this flag signals the fact. */
boolean pcrel_offset;
};
#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
{ (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
@ -1892,6 +1896,7 @@ struct reloc_howto_struct
} \
} \
}
unsigned int
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
@ -1899,7 +1904,9 @@ typedef struct relent_chain
{
arelent relent;
struct relent_chain *next;
} arelent_chain;
}
arelent_chain;
bfd_reloc_status_type
bfd_check_overflow PARAMS ((enum complain_overflow how,
unsigned int bitsize,
@ -2129,6 +2136,11 @@ GP register. */
BFD_RELOC_ALPHA_GPREL_HI16,
BFD_RELOC_ALPHA_GPREL_LO16,
/* Like BFD_RELOC_23_PCREL_S2, except that the source and target must
share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD. */
BFD_RELOC_ALPHA_BRSGP,
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
@ -2182,6 +2194,55 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_REL16,
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
BFD_RELOC_SH_GOT_LOW16,
BFD_RELOC_SH_GOT_MEDLOW16,
BFD_RELOC_SH_GOT_MEDHI16,
BFD_RELOC_SH_GOT_HI16,
BFD_RELOC_SH_GOTPLT_LOW16,
BFD_RELOC_SH_GOTPLT_MEDLOW16,
BFD_RELOC_SH_GOTPLT_MEDHI16,
BFD_RELOC_SH_GOTPLT_HI16,
BFD_RELOC_SH_PLT_LOW16,
BFD_RELOC_SH_PLT_MEDLOW16,
BFD_RELOC_SH_PLT_MEDHI16,
BFD_RELOC_SH_PLT_HI16,
BFD_RELOC_SH_GOTOFF_LOW16,
BFD_RELOC_SH_GOTOFF_MEDLOW16,
BFD_RELOC_SH_GOTOFF_MEDHI16,
BFD_RELOC_SH_GOTOFF_HI16,
BFD_RELOC_SH_GOTPC_LOW16,
BFD_RELOC_SH_GOTPC_MEDLOW16,
BFD_RELOC_SH_GOTPC_MEDHI16,
BFD_RELOC_SH_GOTPC_HI16,
BFD_RELOC_SH_COPY64,
BFD_RELOC_SH_GLOB_DAT64,
BFD_RELOC_SH_JMP_SLOT64,
BFD_RELOC_SH_RELATIVE64,
BFD_RELOC_SH_GOT10BY4,
BFD_RELOC_SH_GOT10BY8,
BFD_RELOC_SH_GOTPLT10BY4,
BFD_RELOC_SH_GOTPLT10BY8,
BFD_RELOC_SH_GOTPLT32,
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,
/* i386/elf relocations */
@ -2978,7 +3039,6 @@ typedef struct symbol_cache_entry
instead, except that some symbols point to the global sections
bfd_{abs,com,und}_section. This could be fixed by making
these globals be per-bfd (or per-target-flavor). FIXME. */
struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
/* The text of the symbol. The name is left alone, and not copied; the
@ -2990,8 +3050,7 @@ typedef struct symbol_cache_entry
a pointer to another symbol is stored here. */
symvalue value;
/* Attributes of a symbol: */
/* Attributes of a symbol. */
#define BSF_NO_FLAGS 0x00
/* The symbol has local scope; <<static>> in <<C>>. The value
@ -3004,11 +3063,11 @@ typedef struct symbol_cache_entry
/* The symbol has global scope and is exported. The value is
the offset into the section of the data. */
#define BSF_EXPORT BSF_GLOBAL /* no real difference */
#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
/* A normal C symbol would be one of:
<<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
<<BSF_GLOBAL>> */
<<BSF_GLOBAL>>. */
/* The symbol is a debugging record. The value has an arbitary
meaning, unless BSF_DEBUGGING_RELOC is also set. */
@ -3042,7 +3101,6 @@ typedef struct symbol_cache_entry
which is also <<C_EXT>> symbol appears where it was
declared and not at the end of a section. This bit is set
by the target BFD part to convey this information. */
#define BSF_NOT_AT_END 0x400
/* Signal that the symbol is the label of constructor section. */
@ -3086,11 +3144,14 @@ typedef struct symbol_cache_entry
{
PTR p;
bfd_vma i;
} udata;
}
udata;
}
asymbol;
} asymbol;
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
boolean
bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
@ -3099,9 +3160,11 @@ bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
#define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
#define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
(abfd, location))
boolean
bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
@ -3110,11 +3173,13 @@ bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
asymbol *
_bfd_generic_make_empty_symbol PARAMS ((bfd *));
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
int
bfd_decode_symclass PARAMS ((asymbol *symbol));
@ -3130,6 +3195,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
struct _bfd
{
/* The filename the application opened the BFD with. */
@ -3139,8 +3205,8 @@ struct _bfd
const struct bfd_target *xvec;
/* To avoid dragging too many header files into every file that
includes `<<bfd.h>>', IOSTREAM has been declared as a "char
*", and MTIME as a "long". Their correct types, to which they
includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
and MTIME as a "long". Their correct types, to which they
are cast when used, are "FILE *" and "time_t". The iostream
is the result of an fopen on the filename. However, if the
BFD_IN_MEMORY flag is set, then iostream is actually a pointer
@ -3149,61 +3215,53 @@ struct _bfd
/* Is the file descriptor being cached? That is, can it be closed as
needed, and re-opened when accessed later? */
boolean cacheable;
/* Marks whether there was a default target specified when the
BFD was opened. This is used to select which matching algorithm
to use to choose the back end. */
boolean target_defaulted;
/* The caching routines use these to maintain a
least-recently-used list of BFDs */
least-recently-used list of BFDs. */
struct _bfd *lru_prev, *lru_next;
/* When a file is closed by the caching routines, BFD retains
state information on the file here: */
state information on the file here... */
ufile_ptr where;
/* and here: (``once'' means at least once) */
/* ... and here: (``once'' means at least once). */
boolean opened_once;
/* Set if we have a locally maintained mtime value, rather than
getting it from the file each time: */
getting it from the file each time. */
boolean mtime_set;
/* File modified time, if mtime_set is true: */
/* File modified time, if mtime_set is true. */
long mtime;
/* Reserved for an unimplemented file locking extension.*/
/* Reserved for an unimplemented file locking extension. */
int ifd;
/* The format which belongs to the BFD. (object, core, etc.) */
bfd_format format;
/* The direction the BFD was opened with*/
enum bfd_direction {no_direction = 0,
/* The direction with which the BFD was opened. */
enum bfd_direction
{
no_direction = 0,
read_direction = 1,
write_direction = 2,
both_direction = 3} direction;
/* Format_specific flags*/
both_direction = 3
}
direction;
/* Format_specific flags. */
flagword flags;
/* Currently my_archive is tested before adding origin to
anything. I believe that this can become always an add of
origin, with origin set to 0 for non archive files. */
ufile_ptr origin;
/* Remember when output has begun, to stop strange things
@ -3219,23 +3277,23 @@ struct _bfd
/* The place where we add to the section list. */
struct sec **section_tail;
/* The number of sections */
/* The number of sections. */
unsigned int section_count;
/* Stuff only useful for object files:
The start address. */
bfd_vma start_address;
/* Used for input and output*/
/* Used for input and output. */
unsigned int symcount;
/* Symbol table for output BFD (with symcount entries) */
/* Symbol table for output BFD (with symcount entries). */
struct symbol_cache_entry **outsymbols;
/* Pointer to structure which contains architecture information*/
/* Pointer to structure which contains architecture information. */
const struct bfd_arch_info *arch_info;
/* Stuff only useful for archives:*/
/* Stuff only useful for archives. */
PTR arelt_data;
struct _bfd *my_archive; /* The containing archive BFD. */
struct _bfd *next; /* The next BFD in the archive. */
@ -3250,7 +3308,6 @@ struct _bfd
int archive_pass;
/* Used by the back end to hold private data. */
union
{
struct aout_data_struct *aout_data;
@ -3283,9 +3340,10 @@ struct _bfd
struct versados_data_struct *versados_data;
struct netbsd_core_struct *netbsd_core_data;
PTR any;
} tdata;
}
tdata;
/* Used by the application to hold private data*/
/* Used by the application to hold private data. */
PTR usrdata;
/* Where all the allocated stuff under this BFD goes. This is a
@ -3316,7 +3374,8 @@ typedef enum bfd_error
bfd_error_file_truncated,
bfd_error_file_too_big,
bfd_error_invalid_error_code
} bfd_error_type;
}
bfd_error_type;
bfd_error_type
bfd_get_error PARAMS ((void));
@ -3354,9 +3413,7 @@ bfd_canonicalize_reloc PARAMS ((bfd *abfd,
asymbol **syms));
void
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
);
bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
boolean
bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
@ -3511,7 +3568,9 @@ core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
enum bfd_flavour {
enum bfd_flavour
{
bfd_target_unknown_flavour,
bfd_target_aout_flavour,
bfd_target_coff_flavour,
@ -3540,15 +3599,40 @@ typedef struct bfd_link_info _bfd_link_info;
typedef struct bfd_target
{
/* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
char *name;
/* The "flavour" of a back end is a general indication about
the contents of a file. */
enum bfd_flavour flavour;
/* The order of bytes within the data area of a file. */
enum bfd_endian byteorder;
/* The order of bytes within the header parts of a file. */
enum bfd_endian header_byteorder;
/* A mask of all the flags which an executable may have set -
from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. */
flagword object_flags;
/* A mask of all the flags which a section may have set - from
the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. */
flagword section_flags;
/* The character normally found at the front of a symbol.
(if any), perhaps `_'. */
char symbol_leading_char;
/* The pad character for file names within an archive header. */
char ar_pad_char;
/* The maximum number of characters in an archive header. */
unsigned short ar_max_namelen;
/* Entries for byte swapping for data. These are different from the
other entry points, since they don't take a BFD asthe first argument.
Certain other handlers could do the same. */
bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
@ -3558,6 +3642,8 @@ typedef struct bfd_target
bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
/* Byte swapping for the headers. */
bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
@ -3567,10 +3653,20 @@ typedef struct bfd_target
bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
/* Format dependent routines: these are vectors of entry points
within the target vector structure, one for each format to check. */
/* Check the format of a file being read. Return a <<bfd_target *>> or zero. */
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
/* Set the format of a file being written. */
boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
/* Write cached information into a file being written, at <<bfd_close>>. */
boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
/* Generic entry points. */
#define BFD_JUMP_TABLE_GENERIC(NAME) \
CONCAT2 (NAME,_close_and_cleanup), \
@ -3613,10 +3709,10 @@ CONCAT2 (NAME,_bfd_print_private_bfd_data) \
to another. */
boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
bfd *, asymbol *));
/* Called to set private backend flags */
/* Called to set private backend flags. */
boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
/* Called to print private BFD data */
/* Called to print private BFD data. */
boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
/* Core file entry points. */
@ -3780,9 +3876,12 @@ CONCAT2 (NAME,_canonicalize_dynamic_reloc)
/* Opposite endian version of this target. */
const struct bfd_target * alternative_target;
/* Data for use by back-end routines, which isn't
generic enough to belong in this structure. */
PTR backend_data;
} bfd_target;
boolean
bfd_set_default_target PARAMS ((const char *name));

View File

@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -43,8 +43,8 @@ CODE_FRAGMENT
. const struct bfd_target *xvec;
.
. {* To avoid dragging too many header files into every file that
. includes `<<bfd.h>>', IOSTREAM has been declared as a "char
. *", and MTIME as a "long". Their correct types, to which they
. includes `<<bfd.h>>', IOSTREAM has been declared as a "char *",
. and MTIME as a "long". Their correct types, to which they
. are cast when used, are "FILE *" and "time_t". The iostream
. is the result of an fopen on the filename. However, if the
. BFD_IN_MEMORY flag is set, then iostream is actually a pointer
@ -53,61 +53,53 @@ CODE_FRAGMENT
.
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
.
. boolean cacheable;
.
. {* Marks whether there was a default target specified when the
. BFD was opened. This is used to select which matching algorithm
. to use to choose the back end. *}
.
. boolean target_defaulted;
.
. {* The caching routines use these to maintain a
. least-recently-used list of BFDs *}
.
. least-recently-used list of BFDs. *}
. struct _bfd *lru_prev, *lru_next;
.
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
.
. state information on the file here... *}
. ufile_ptr where;
.
. {* and here: (``once'' means at least once) *}
.
. {* ... and here: (``once'' means at least once). *}
. boolean opened_once;
.
. {* Set if we have a locally maintained mtime value, rather than
. getting it from the file each time: *}
.
. getting it from the file each time. *}
. boolean mtime_set;
.
. {* File modified time, if mtime_set is true: *}
.
. {* File modified time, if mtime_set is true. *}
. long mtime;
.
. {* Reserved for an unimplemented file locking extension.*}
.
. {* Reserved for an unimplemented file locking extension. *}
. int ifd;
.
. {* The format which belongs to the BFD. (object, core, etc.) *}
.
. bfd_format format;
.
. {* The direction the BFD was opened with*}
.
. enum bfd_direction {no_direction = 0,
. {* The direction with which the BFD was opened. *}
. enum bfd_direction
. {
. no_direction = 0,
. read_direction = 1,
. write_direction = 2,
. both_direction = 3} direction;
.
. {* Format_specific flags*}
. both_direction = 3
. }
. direction;
.
. {* Format_specific flags. *}
. flagword flags;
.
. {* Currently my_archive is tested before adding origin to
. anything. I believe that this can become always an add of
. origin, with origin set to 0 for non archive files. *}
.
. ufile_ptr origin;
.
. {* Remember when output has begun, to stop strange things
@ -123,23 +115,23 @@ CODE_FRAGMENT
. {* The place where we add to the section list. *}
. struct sec **section_tail;
.
. {* The number of sections *}
. {* The number of sections. *}
. unsigned int section_count;
.
. {* Stuff only useful for object files:
. The start address. *}
. bfd_vma start_address;
.
. {* Used for input and output*}
. {* Used for input and output. *}
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries) *}
. {* Symbol table for output BFD (with symcount entries). *}
. struct symbol_cache_entry **outsymbols;
.
. {* Pointer to structure which contains architecture information*}
. {* Pointer to structure which contains architecture information. *}
. const struct bfd_arch_info *arch_info;
.
. {* Stuff only useful for archives:*}
. {* Stuff only useful for archives. *}
. PTR arelt_data;
. struct _bfd *my_archive; {* The containing archive BFD. *}
. struct _bfd *next; {* The next BFD in the archive. *}
@ -154,7 +146,6 @@ CODE_FRAGMENT
. int archive_pass;
.
. {* Used by the back end to hold private data. *}
.
. union
. {
. struct aout_data_struct *aout_data;
@ -187,9 +178,10 @@ CODE_FRAGMENT
. struct versados_data_struct *versados_data;
. struct netbsd_core_struct *netbsd_core_data;
. PTR any;
. } tdata;
. }
. tdata;
.
. {* Used by the application to hold private data*}
. {* Used by the application to hold private data. *}
. PTR usrdata;
.
. {* Where all the allocated stuff under this BFD goes. This is a
@ -270,7 +262,8 @@ CODE_FRAGMENT
. bfd_error_file_truncated,
. bfd_error_file_too_big,
. bfd_error_invalid_error_code
.} bfd_error_type;
.}
.bfd_error_type;
.
*/
@ -632,7 +625,7 @@ FUNCTION
SYNOPSIS
void bfd_set_reloc
(bfd *abfd, asection *sec, arelent **rel, unsigned int count)
(bfd *abfd, asection *sec, arelent **rel, unsigned int count);
DESCRIPTION
Set the relocation pointer and count within

View File

@ -2232,7 +2232,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
{
_bfd_error_handler
/* xgettext: c-format */
(_("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"),
(_("ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
bfd_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
);
@ -2247,10 +2247,10 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (APCS_FLOAT_FLAG (ibfd))
/* xgettext: c-format */
msg = _("%s: ERROR: passes floats in float registers whereas target %s uses integer registers");
msg = _("ERROR: %s passes floats in float registers, whereas %s passes them in integer registers");
else
/* xgettext: c-format */
msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers");
msg = _("ERROR: %s passes floats in integer registers, whereas %s passes them in float registers");
_bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2265,10 +2265,10 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (PIC_FLAG (ibfd))
/* xgettext: c-format */
msg = _("%s: ERROR: compiled as position independent code, whereas target %s is absolute position");
msg = _("ERROR: %s is compiled as position independent code, whereas target %s is absolute position");
else
/* xgettext: c-format */
msg = _("%s: ERROR: compiled as absolute position code, whereas target %s is position independent");
msg = _("ERROR: %s is compiled as absolute position code, whereas target %s is position independent");
_bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2297,10 +2297,10 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
if (INTERWORK_FLAG (ibfd))
/* xgettext: c-format */
msg = _("Warning: input file %s supports interworking, whereas %s does not.");
msg = _("Warning: %s supports interworking, whereas %s does not");
else
/* xgettext: c-format */
msg = _("Warning: input file %s does not support interworking, whereas %s does.");
msg = _("Warning: %s does not support interworking, whereas %s does");
_bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2398,7 +2398,7 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
{
if (flag)
/* xgettext: c-format */
_bfd_error_handler (_("Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"),
_bfd_error_handler (_("Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
bfd_archive_filename (abfd));
else
/* xgettext: c-format */
@ -2461,7 +2461,8 @@ coff_arm_copy_private_bfd_data (src, dest)
if (INTERWORK_FLAG (dest))
{
/* xgettext:c-format */
_bfd_error_handler (("Warning: Clearing the interworking bit of %s, because the non-interworking code in %s has been copied into it"),
_bfd_error_handler (("\
Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
bfd_get_filename (dest),
bfd_archive_filename (src));
}

View File

@ -3062,7 +3062,7 @@ xcoff_generate_rtinit (abfd, init, fini)
bfd_byte reloc_ext[RELSZ * 2];
bfd_byte *data_buffer;
bfd_size_type data_buffer_size;
bfd_byte *string_table, *st_tmp;
bfd_byte *string_table = NULL, *st_tmp = NULL;
bfd_size_type string_table_size;
bfd_vma val;
size_t initsz, finisz;

File diff suppressed because it is too large Load Diff

View File

@ -1787,7 +1787,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
#endif
#ifdef ARM
/* Set the flags field from the COFF header read in */
/* Set the flags field from the COFF header read in. */
if (! _bfd_coff_arm_set_private_flags (abfd, internal_f->f_flags))
coff->flags = 0;
#endif
@ -1822,6 +1822,13 @@ coff_set_arch_mach_hook (abfd, filehdr)
machine = 0;
switch (internal_f->f_magic)
{
#ifdef OR32_MAGIC_BIG
case OR32_MAGIC_BIG:
case OR32_MAGIC_LITTLE:
arch = bfd_arch_or32;
machine = 0;
break;
#endif
#ifdef PPCMAGIC
case PPCMAGIC:
arch = bfd_arch_powerpc;
@ -1864,7 +1871,12 @@ coff_set_arch_mach_hook (abfd, filehdr)
case F_ARM_3M: machine = bfd_mach_arm_3M; break;
case F_ARM_4: machine = bfd_mach_arm_4; break;
case F_ARM_4T: machine = bfd_mach_arm_4T; break;
case F_ARM_5: machine = bfd_mach_arm_5; break;
/* The COFF header does not have enough bits available
to cover all the different ARM architectures. So
we interpret F_ARM_5, the highest flag value to mean
"the highest ARM architecture known to BFD" which is
currently the XScale. */
case F_ARM_5: machine = bfd_mach_arm_XScale; break;
}
break;
#endif
@ -2617,7 +2629,8 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_mach_arm_4: * flagsp |= F_ARM_4; break;
case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break;
case bfd_mach_arm_5: * flagsp |= F_ARM_5; break;
/* FIXME: we do not have F_ARM vaues greater than F_ARM_5. */
/* FIXME: we do not have F_ARM vaues greater than F_ARM_5.
See also the comment in coff_set_arch_mach_hook(). */
case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break;
case bfd_mach_arm_5TE: * flagsp |= F_ARM_5; break;
case bfd_mach_arm_XScale: * flagsp |= F_ARM_5; break;
@ -2779,6 +2792,15 @@ coff_set_flags (abfd, magicp, flagsp)
return true;
#endif
#ifdef OR32_MAGIC_BIG
case bfd_arch_or32:
if (bfd_big_endian (abfd))
* magicp = OR32_MAGIC_BIG;
else
* magicp = OR32_MAGIC_LITTLE;
return true;
#endif
default: /* Unknown architecture. */
/* Fall through to "return false" below, to avoid
"statement never reached" errors on the one below. */
@ -3830,6 +3852,11 @@ coff_write_object_contents (abfd)
internal_a.magic = MIPS_PE_MAGIC;
#endif
#ifdef OR32
#define __A_MAGIC_SET__
internal_a.magic = NMAGIC; /* Assume separate i/d. */
#endif
#ifndef __A_MAGIC_SET__
#include "Your aouthdr magic number is not being set!"
#else

View File

@ -43,6 +43,7 @@ m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
m68*) targ_archs=bfd_m68k_arch ;;
m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
or32*) targ_archs=bfd_or32_arch ;;
pdp11*) targ_archs=bfd_pdp11_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
@ -56,6 +57,7 @@ v850*) targ_archs=bfd_v850_arch ;;
x86_64) targ_archs=bfd_i386_arch ;;
xscale*) targ_archs=bfd_arm_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
sh*) targ_archs=bfd_sh_arch ;;
*) targ_archs=bfd_${targ_cpu}_arch ;;
esac
@ -301,7 +303,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*)
hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems*)
targ_defvec=bfd_elf32_hppa_vec
targ_selvecs=bfd_elf32_hppa_linux_vec
;;
@ -759,6 +761,15 @@ case "${targ}" in
targ_defvec=bfd_elf32_openrisc_vec
;;
or32-*-coff | or32-*-rtems*)
targ_defvec=or32coff_big_vec
targ_underscore=yes
;;
or32-*-elf)
targ_defvec=bfd_elf32_or32_big_vec
;;
pdp11-*-*)
targ_defvec=pdp11_aout_vec
targ_underscore=yes
@ -780,6 +791,9 @@ case "${targ}" in
case "${targ}" in
*-*-aix4.[3456789]* | *-*-aix[56789]*)
want64=true;;
*)
targ_cflags=-DSMALL_ARCHIVE;;
esac
;;
#ifdef BFD64
@ -832,9 +846,20 @@ case "${targ}" in
;;
#endif
#ifdef BFD64
sh64-*-elf*)
targ_defvec=bfd_elf32_sh64_vec
targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec"
targ_underscore=yes
;;
#endif /* BFD64 */
sh-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
#ifdef BFD64
targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
#endif
;;
sh*eb-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
@ -847,6 +872,13 @@ case "${targ}" in
targ_defvec=bfd_elf32_shlnbsd_vec
targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
;;
sh-*-netbsdelf*)
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
#ifdef BFD64
targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
#endif
;;
sh*-*-netbsdelf*)
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
@ -855,6 +887,9 @@ case "${targ}" in
sh-*-elf* | sh-*-rtemself*)
targ_defvec=bfd_elf32_sh_vec
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
#ifdef BFD64
targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
#endif
targ_underscore=yes
;;
sh-*-pe)

File diff suppressed because it is too large Load Diff

View File

@ -196,7 +196,7 @@ changequote([,])dnl
COREFILE=
;;
changequote(,)dnl
i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
i[3456]86-*-bsd* | i[34567]86-*-freebsd[123] | i[34567]86-*-freebsd[123]\.* | i[34567]86-*-freebsd4\.[01234]* | i[34567]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
@ -515,6 +515,17 @@ do
# This list is alphabetized to make it easy to compare
# with the two vector lists in targets.c. For the same reason,
# use one entry per line, even though this leads to long lines.
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo"
target_size=64 ;;
bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo"
target_size=64 ;;
bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf"
target_size=64 ;;
bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf"
target_size=64 ;;
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
@ -573,6 +584,7 @@ do
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
@ -669,6 +681,7 @@ do
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;;
pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
pdp11_aout_vec) tb="$tb pdp11.lo" ;;

View File

@ -1,5 +1,6 @@
/* BFD PowerPC CPU definition
Copyright 1994, 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
Copyright 1994, 1995, 1996, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -47,7 +48,7 @@ powerpc_compatible (a,b)
/*NOTREACHED*/
}
static const bfd_arch_info_type arch_info_struct[] =
const bfd_arch_info_type bfd_powerpc_archs[] =
{
{
32, /* 32 bits in a word */
@ -61,7 +62,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[1]
&bfd_powerpc_archs[1]
},
{
32, /* 32 bits in a word */
@ -75,7 +76,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[2]
&bfd_powerpc_archs[2]
},
{
32, /* 32 bits in a word */
@ -89,7 +90,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[3]
&bfd_powerpc_archs[3]
},
{
32, /* 32 bits in a word */
@ -103,7 +104,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[4]
&bfd_powerpc_archs[4]
},
{
32, /* 32 bits in a word */
@ -117,7 +118,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[5]
&bfd_powerpc_archs[5]
},
{
64, /* 64 bits in a word */
@ -128,10 +129,10 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc",
"powerpc:620",
3,
BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[6]
&bfd_powerpc_archs[6]
},
{
64, /* 64 bits in a word */
@ -145,7 +146,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[7]
&bfd_powerpc_archs[7]
},
{
64, /* 64 bits in a word */
@ -159,7 +160,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[8]
&bfd_powerpc_archs[8]
},
{
64, /* 64 bits in a word */
@ -173,7 +174,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[9]
&bfd_powerpc_archs[9]
},
{
64, /* 64 bits in a word */
@ -187,7 +188,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[10]
&bfd_powerpc_archs[10]
},
{
32, /* 32 bits in a word */
@ -201,7 +202,7 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[11]
&bfd_powerpc_archs[11]
},
{
32, /* 32 bits in a word */
@ -215,11 +216,22 @@ static const bfd_arch_info_type arch_info_struct[] =
false, /* not the default */
powerpc_compatible,
bfd_default_scan,
0
}
};
const bfd_arch_info_type bfd_powerpc_arch =
&bfd_powerpc_archs[12]
},
{
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_powerpc,
bfd_mach_ppc64,
"powerpc",
"powerpc:common64",
3,
BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */
powerpc_compatible,
bfd_default_scan,
&bfd_powerpc_archs[13]
},
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
@ -232,5 +244,6 @@ const bfd_arch_info_type bfd_powerpc_arch =
BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[0]
};
0
}
};

View File

@ -1,9 +1,26 @@
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* chew.c (WORD): Eliminate.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* Makefile.in: Regenerate.
2002-01-31 Alan Modra <amodra@bigpond.net.au>
* chew.c (courierize): Don't modify @command params.
2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
* proto.str (ENUMDOC): Place two spaces between the end of
the text and the closing comment marker.
2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
* doc/bfdint.texi (BFD target vector miscellaneous): Add
* bfdint.texi (BFD target vector miscellaneous): Add
bfd_target_mmo_flavour.
* doc/bfd.texinfo (BFD back ends): Add entry for mmo.
* doc/Makefile.am (DOCFILES): Add mmo.texi.
* bfd.texinfo (BFD back ends): Add entry for mmo.
* Makefile.am (DOCFILES): Add mmo.texi.
(SRCDOC): Add mmo.c.
(s-mmo, mmo.texi): New rules.
@ -16,6 +33,11 @@
* bfd.texinfo: Change footer to refer to FSF. Change subtitle
to refer to original creation date.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* Makefile.am (install): Depend on install-info.
* Makefile.in: Regenerate.
2001-10-03 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (BFD_H_DEP): Add ../version.h.

View File

@ -272,3 +272,7 @@ CLEANFILES = s-* *.p *.ip
DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
MAINTAINERCLEANFILES = $(DOCFILES)
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info

View File

@ -116,6 +116,7 @@ WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_default_target_size = @bfd_default_target_size@
bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_version = @bfd_version@
bfd_version_date = @bfd_version_date@
@ -631,6 +632,10 @@ bfd.h: $(BFD_H_DEP)
echo "#endif" >> $@
echo "#endif" >> $@
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,5 +1,6 @@
/* chew
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
2002
Free Software Foundation, Inc.
Contributed by steve chamberlain @cygnus
@ -289,8 +290,6 @@ struct dict_struct
typedef struct dict_struct dict_type;
#define WORD(x) static void x()
static void
die (msg)
char *msg;
@ -362,7 +361,8 @@ exec (word)
(*pc) ();
}
WORD (call)
static void
call ()
{
stinst_type *oldpc = pc;
dict_type *e;
@ -371,7 +371,8 @@ WORD (call)
pc = oldpc + 2;
}
WORD (remchar)
static void
remchar ()
{
if (tos->write_idx)
tos->write_idx--;
@ -388,7 +389,8 @@ strip_trailing_newlines ()
pc++;
}
WORD (push_number)
static void
push_number ()
{
isp++;
icheck_range ();
@ -397,7 +399,8 @@ WORD (push_number)
pc++;
}
WORD (push_text)
static void
push_text ()
{
tos++;
check_range ();
@ -551,7 +554,8 @@ paramstuff (void)
/* turn {*
and *} into comments */
WORD (translatecomments)
static void
translatecomments ()
{
unsigned int idx = 0;
string_type out;
@ -587,7 +591,8 @@ WORD (translatecomments)
/* turn everything not starting with a . into a comment */
WORD (manglecomments)
static void
manglecomments ()
{
unsigned int idx = 0;
string_type out;
@ -665,7 +670,8 @@ outputdots (void)
}
/* Find lines starting with . and | and put example around them on tos */
WORD (courierize)
static void
courierize ()
{
string_type out;
unsigned int idx = 0;
@ -686,37 +692,47 @@ WORD (courierize)
while (at (tos, idx) && at (tos, idx) != '\n')
{
if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
if (command > 1)
{
/* We are inside {} parameters of some command;
Just pass through until matching brace. */
if (at (tos, idx) == '{')
++command;
else if (at (tos, idx) == '}')
--command;
}
else if (command != 0)
{
if (at (tos, idx) == '{')
++command;
else if (!islower ((unsigned char) at (tos, idx)))
--command;
}
else if (at (tos, idx) == '@'
&& islower ((unsigned char) at (tos, idx + 1)))
{
++command;
}
else if (at (tos, idx) == '{' && at (tos, idx + 1) == '*')
{
cattext (&out, "/*");
idx += 2;
continue;
}
else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}')
{
cattext (&out, "*/");
idx += 2;
continue;
}
else if (at (tos, idx) == '{' && !command)
{
cattext (&out, "@{");
idx++;
}
else if (at (tos, idx) == '}' && !command)
{
cattext (&out, "@}");
idx++;
}
else
{
if (at (tos, idx) == '@')
command = 1;
else if (isspace ((unsigned char) at (tos, idx))
else if (at (tos, idx) == '{'
|| at (tos, idx) == '}')
command = 0;
catchar (&out, at (tos, idx));
idx++;
{
catchar (&out, '@');
}
catchar (&out, at (tos, idx));
idx++;
}
catchar (&out, '\n');
}
@ -741,7 +757,8 @@ WORD (courierize)
on @itemize @bullet, and @items each of them. Then ends with @end
itemize, inplace at TOS*/
WORD (bulletize)
static void
bulletize ()
{
unsigned int idx = 0;
int on = 0;
@ -795,7 +812,8 @@ WORD (bulletize)
/* Turn <<foo>> into @code{foo} in place at TOS*/
WORD (do_fancy_stuff)
static void
do_fancy_stuff ()
{
unsigned int idx = 0;
string_type out;
@ -891,7 +909,8 @@ copy_past_newline (ptr, idx, dst)
}
WORD (icopy_past_newline)
static void
icopy_past_newline ()
{
tos++;
check_range ();
@ -903,7 +922,8 @@ WORD (icopy_past_newline)
/* indent
Take the string at the top of the stack, do some prettying. */
WORD (kill_bogus_lines)
static void
kill_bogus_lines ()
{
int sl;
@ -989,7 +1009,8 @@ WORD (kill_bogus_lines)
}
WORD (indent)
static void
indent ()
{
string_type out;
int tab = 0;
@ -1039,7 +1060,8 @@ WORD (indent)
}
WORD (get_stuff_in_command)
static void
get_stuff_in_command ()
{
tos++;
check_range ();
@ -1054,7 +1076,8 @@ WORD (get_stuff_in_command)
pc++;
}
WORD (swap)
static void
swap ()
{
string_type t;
@ -1064,7 +1087,8 @@ WORD (swap)
pc++;
}
WORD (other_dup)
static void
other_dup ()
{
tos++;
check_range ();
@ -1073,21 +1097,24 @@ WORD (other_dup)
pc++;
}
WORD (drop)
static void
drop ()
{
tos--;
check_range ();
pc++;
}
WORD (idrop)
static void
idrop ()
{
isp--;
icheck_range ();
pc++;
}
WORD (icatstr)
static void
icatstr ()
{
tos--;
check_range ();
@ -1096,7 +1123,8 @@ WORD (icatstr)
pc++;
}
WORD (skip_past_newline)
static void
skip_past_newline ()
{
while (at (ptr, idx)
&& at (ptr, idx) != '\n')
@ -1105,7 +1133,8 @@ WORD (skip_past_newline)
pc++;
}
WORD (internalmode)
static void
internalmode ()
{
internal_mode = *(isp);
isp--;
@ -1113,7 +1142,8 @@ WORD (internalmode)
pc++;
}
WORD (maybecatstr)
static void
maybecatstr ()
{
if (internal_wanted == internal_mode)
{
@ -1390,19 +1420,22 @@ bang (void)
pc++;
}
WORD (atsign)
static void
atsign ()
{
isp[0] = *(long *) (isp[0]);
pc++;
}
WORD (hello)
static void
hello ()
{
printf ("hello\n");
pc++;
}
WORD (stdout_)
static void
stdout_ ()
{
isp++;
icheck_range ();
@ -1410,7 +1443,8 @@ WORD (stdout_)
pc++;
}
WORD (stderr_)
static void
stderr_ ()
{
isp++;
icheck_range ();
@ -1418,7 +1452,8 @@ WORD (stderr_)
pc++;
}
WORD (print)
static void
print ()
{
if (*isp == 1)
write_buffer (tos, stdout);

View File

@ -1,5 +1,5 @@
/* DWARF 2 support.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
@ -396,7 +396,7 @@ read_indirect_string (unit, buf, bytes_read_ptr)
if (offset >= stash->dwarf_str_size)
{
(*_bfd_error_handler) (_("Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."),
offset, stash->dwarf_str_size );
offset, stash->dwarf_str_size);
bfd_set_error (bfd_error_bad_value);
return NULL;
}
@ -556,8 +556,8 @@ read_abbrevs (abfd, offset, stash)
if (offset >= stash->dwarf_abbrev_size)
{
(*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."),
offset, stash->dwarf_abbrev_size );
(*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size (%u)."),
offset, stash->dwarf_abbrev_size);
bfd_set_error (bfd_error_bad_value);
return 0;
}
@ -949,7 +949,7 @@ decode_line_info (unit, stash)
below. */
if (unit->line_offset >= stash->dwarf_line_size)
{
(*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."),
(*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."),
unit->line_offset, stash->dwarf_line_size);
bfd_set_error (bfd_error_bad_value);
return 0;
@ -1456,16 +1456,13 @@ parse_comp_unit (abfd, stash, unit_length, offset_size)
unsigned int offset_size;
{
struct comp_unit* unit;
unsigned short version;
unsigned int abbrev_offset = 0;
unsigned char addr_size;
struct abbrev_info** abbrevs;
unsigned int abbrev_number, bytes_read, i;
struct abbrev_info *abbrev;
struct attribute attr;
char *info_ptr = stash->info_ptr;
char *end_ptr = info_ptr + unit_length;
bfd_size_type amt;
@ -1490,7 +1487,7 @@ parse_comp_unit (abfd, stash, unit_length, offset_size)
if (version != 2)
{
(*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."), version );
(*_bfd_error_handler) (_("Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."), version);
bfd_set_error (bfd_error_bad_value);
return 0;
}
@ -1506,7 +1503,7 @@ parse_comp_unit (abfd, stash, unit_length, offset_size)
if (addr_size != 2 && addr_size != 4 && addr_size != 8)
{
(*_bfd_error_handler) ("Dwarf Error: found address size '%u', this reader can only handle address sizes '2', '4' and '8'.", addr_size );
(*_bfd_error_handler) ("Dwarf Error: found address size '%u', this reader can only handle address sizes '2', '4' and '8'.", addr_size);
bfd_set_error (bfd_error_bad_value);
return 0;
}

View File

@ -586,16 +586,12 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
}
/* For shared libraries, try to get rid of as many RELATIVE relocs
as possible.
FIXME: For this to work, ELF backends need to perform the
relocation if omitting dynamic relocs, not skip it. */
if (0
&& info->shared
as possible. */
if (info->shared
&& (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr)
cie.make_relative = 1;
if (0
&& info->shared
if (info->shared
&& (cie.lsda_encoding & 0xf0) == DW_EH_PE_absptr)
cie.make_lsda_relative = 1;
@ -636,6 +632,16 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
}
else
{
if (info->shared
&& (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr
&& cie.make_relative == 0)
{
/* If shared library uses absolute pointers
which we cannot turn into PC relative,
don't create the binary search table,
since it is affected by runtime relocations. */
hdr_info->table = false;
}
cie_usage_count++;
hdr_info->fde_count++;
}
@ -856,7 +862,7 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
if (sec_info->entry[mid].make_relative
&& ! sec_info->entry[mid].cie
&& offset == sec_info->entry[mid].offset + 8)
return (bfd_vma) -1;
return (bfd_vma) -2;
/* If converting LSDA pointers to DW_EH_PE_pcrel, there will be no need
for run-time relocation against LSDA field. */
@ -865,7 +871,7 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
&& (offset
== (sec_info->entry[mid].offset + 8
+ sec_info->entry[mid].lsda_offset)))
return (bfd_vma) -1;
return (bfd_vma) -2;
return (offset + sec_info->entry[mid].new_offset
- sec_info->entry[mid].offset);

View File

@ -1148,26 +1148,24 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
}
skip = false;
relocate = false;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
if (skip)
{
memset (&outrel, 0, sizeof outrel);
relocate = false;
}
else if (r_type == R_ARM_PC24)
{
BFD_ASSERT (h != NULL && h->dynindx != -1);
if ((input_section->flags & SEC_ALLOC) != 0)
relocate = false;
else
if ((input_section->flags & SEC_ALLOC) == 0)
relocate = true;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_PC24);
}
@ -1184,9 +1182,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
else
{
BFD_ASSERT (h->dynindx != -1);
if ((input_section->flags & SEC_ALLOC) != 0)
relocate = false;
else
if ((input_section->flags & SEC_ALLOC) == 0)
relocate = true;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_ABS32);
}
@ -2112,11 +2108,11 @@ elf32_arm_set_private_flags (abfd, flags)
{
if (flags & EF_ARM_INTERWORK)
(*_bfd_error_handler) (_("\
Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"),
Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"),
bfd_archive_filename (abfd));
else
_bfd_error_handler (_("\
Warning: Clearing the interwork flag of %s due to outside request"),
Warning: Clearing the interworking flag of %s due to outside request"),
bfd_archive_filename (abfd));
}
}
@ -2164,7 +2160,7 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
{
if (out_flags & EF_ARM_INTERWORK)
_bfd_error_handler (_("\
Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"),
Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"),
bfd_get_filename (obfd),
bfd_archive_filename (ibfd));
@ -2259,7 +2255,7 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
{
_bfd_error_handler (_("\
Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"),
bfd_archive_filename (ibfd),
(in_flags & EF_ARM_EABIMASK) >> 24,
bfd_get_filename (obfd),
@ -2273,7 +2269,7 @@ Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
{
_bfd_error_handler (_("\
Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"),
bfd_archive_filename (ibfd),
in_flags & EF_ARM_APCS_26 ? 26 : 32,
bfd_get_filename (obfd),
@ -2285,12 +2281,12 @@ Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
{
if (in_flags & EF_ARM_APCS_FLOAT)
_bfd_error_handler (_("\
Error: %s passes floats in FP registers, whereas %s passes them in integer registers"),
ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
else
_bfd_error_handler (_("\
Error: %s passes floats in integer registers, whereas %s passes them in FP registers"),
ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2301,12 +2297,12 @@ Error: %s passes floats in integer registers, whereas %s passes them in FP regis
{
if (in_flags & EF_ARM_VFP_FLOAT)
_bfd_error_handler (_("\
Error: %s uses VFP instructions, whereas %s FPA instructions"),
ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
else
_bfd_error_handler (_("\
Error: %s uses FPA instructions, whereas %s VFP instructions"),
ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2325,13 +2321,13 @@ Error: %s uses FPA instructions, whereas %s VFP instructions"),
|| (in_flags & EF_ARM_VFP_FLOAT) == 0)
{
if (in_flags & EF_ARM_SOFT_FLOAT)
_bfd_error_handler (_ ("\
Error: %s uses software FP, whereas %s uses hardware FP"),
_bfd_error_handler (_("\
ERROR: %s uses software FP, whereas %s uses hardware FP"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
else
_bfd_error_handler (_ ("\
Error: %s uses hardware FP, whereas %s uses software FP"),
_bfd_error_handler (_("\
ERROR: %s uses hardware FP, whereas %s uses software FP"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@ -2395,9 +2391,9 @@ elf32_arm_print_private_bfd_data (abfd, ptr)
fprintf (file, _(" [interworking enabled]"));
if (flags & EF_ARM_APCS_26)
fprintf (file, _(" [APCS-26]"));
fprintf (file, " [APCS-26]");
else
fprintf (file, _(" [APCS-32]"));
fprintf (file, " [APCS-32]");
if (flags & EF_ARM_VFP_FLOAT)
fprintf (file, _(" [VFP float format]"));

View File

@ -3152,7 +3152,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared && r_symndx != 0)
{
Elf_Internal_Rela outrel;
boolean skip;
int skip;
#ifdef DEBUG
fprintf (stderr, "ppc_elf_relocate_section need to create relocation for %s\n",
@ -3183,13 +3183,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (sreloc != NULL);
}
skip = false;
skip = 0;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
if (outrel.r_offset == (bfd_vma) -1
|| outrel.r_offset == (bfd_vma) -2)
skip = (int) outrel.r_offset;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@ -3260,7 +3261,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* This reloc will be computed at runtime, so there's no
need to do anything now, unless this is a RELATIVE
reloc in an unallocated section. */
if (skip
if (skip != -1
|| (input_section->flags & SEC_ALLOC) != 0
|| ELF32_R_TYPE (outrel.r_info) != R_PPC_RELATIVE)
continue;

View File

@ -1438,7 +1438,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
&& (input_section->flags & SEC_ALLOC))
{
Elf_Internal_Rela outrel;
boolean skip;
boolean skip, relocate = false;
/* When generating a shared object, these relocations
are copied into the output file to be resolved at run
@ -1471,6 +1471,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@ -1571,6 +1573,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
/* This reloc will be computed at runtime, so there's no
need to do anything now. */
if (! relocate)
continue;
}
break;

View File

@ -156,11 +156,8 @@ static boolean ppc64_elf_finish_dynamic_sections
/* Since .opd is an array of descriptors and each entry will end up
with identical R_PPC64_RELATIVE relocs, there is really no need to
propagate .opd relocs; The dynamic linker should be taught to
relocate .opd without reloc entries. FIXME: the dynamic linker
will need to know where and how large .opd is via a couple of new
DT_PPC64_* tags, or perhaps just with one reloc that specifies the
start of .opd via its offset and the size via its addend. Also,
.opd should be trimmed of unused values. */
relocate .opd without reloc entries. FIXME: .opd should be trimmed
of unused values. */
#ifndef NO_OPD_RELOCS
#define NO_OPD_RELOCS 0
#endif
@ -2500,20 +2497,15 @@ func_desc_adjust (h, inf)
fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1,
false, false, true);
if (fdh == NULL && info->shared)
if (fdh == NULL
&& info->shared
&& (h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak))
{
bfd *abfd;
asymbol *newsym;
/* Create it as undefined. */
if (h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak)
abfd = h->root.u.undef.abfd;
else if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
abfd = h->root.u.def.section->owner;
else
abort ();
newsym = bfd_make_empty_symbol (abfd);
newsym->name = h->root.root.string + 1;
newsym->section = bfd_und_section_ptr;
@ -2529,6 +2521,7 @@ func_desc_adjust (h, inf)
{
return false;
}
fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
}
if (fdh != NULL
@ -2540,13 +2533,16 @@ func_desc_adjust (h, inf)
if (fdh->dynindx == -1)
if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
return false;
fdh->plt.refcount = h->plt.refcount;
fdh->elf_link_hash_flags |= (h->elf_link_hash_flags
& (ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_REF_DYNAMIC
| ELF_LINK_HASH_REF_REGULAR_NONWEAK
| ELF_LINK_NON_GOT_REF));
if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
{
fdh->plt.refcount = h->plt.refcount;
fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
}
((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
fdh->root.root.string = h->root.root.string + 1;
}
@ -2557,7 +2553,7 @@ func_desc_adjust (h, inf)
This prevents a shared library from exporting syms that have
been imported from another library. Function code syms that
are really in the library we must leave global to prevent the
linker dragging a definition in from a static library. */
linker dragging in a definition from a static library. */
force_local = (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0;
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
}
@ -2996,10 +2992,12 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
linker script /DISCARD/, so we'll be discarding
the relocs too. */
}
else
else if (p->count != 0)
{
srel = elf_section_data (p->sec)->sreloc;
srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
}
}
@ -3127,6 +3125,13 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
return false;
}
if (NO_OPD_RELOCS)
{
if (!add_dynamic_entry (DT_PPC64_OPD, 0)
|| !add_dynamic_entry (DT_PPC64_OPDSZ, 0))
return false;
}
if (relocs)
{
if (!add_dynamic_entry (DT_RELA, 0)
@ -3136,7 +3141,9 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
/* If any dynamic relocs apply to a read-only section,
then we need a DT_TEXTREL entry. */
elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, (PTR) info);
if ((info->flags & DF_TEXTREL) == 0)
elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
(PTR) info);
if ((info->flags & DF_TEXTREL) != 0)
{
@ -3248,7 +3255,7 @@ ppc64_elf_size_stubs (obfd, info, changed)
/* If the .plt doesn't have any entries crossing a 64k boundary,
then there is no need for bigger stubs. */
if (next_64k <= plt_offset + htab->splt->_raw_size)
if (plt_offset + htab->splt->_raw_size <= next_64k)
return true;
/* OK, so we have at least one transition. Since .plt entries are
@ -3955,22 +3962,21 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
time. */
skip = false;
relocate = false;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
outrel.r_addend = addend;
if (skip)
{
relocate = false;
memset (&outrel, 0, sizeof outrel);
}
else if (h != NULL
&& h->dynindx != -1
&& !is_opd
@ -3979,10 +3985,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| !info->symbolic
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
{
relocate = false;
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
}
else
{
/* This symbol is local, or marked to become local,
@ -4351,6 +4354,7 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
asection *s;
bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
@ -4364,6 +4368,18 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
+ htab->sglink->output_offset);
break;
case DT_PPC64_OPD:
s = bfd_get_section_by_name (output_bfd, ".opd");
if (s != NULL)
dyn.d_un.d_ptr = s->vma;
break;
case DT_PPC64_OPDSZ:
s = bfd_get_section_by_name (output_bfd, ".opd");
if (s != NULL)
dyn.d_un.d_val = s->_raw_size;
break;
case DT_PLTGOT:
dyn.d_un.d_ptr = (htab->splt->output_section->vma
+ htab->splt->output_offset);

View File

@ -1331,11 +1331,9 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (p->name != NULL && strcmp (p->name, *namep))
{
(*_bfd_error_handler)
(_("Register %%g%d used incompatibly: %s in %s"),
(_("Register %%g%d used incompatibly: %s in %s, previously %s in %s"),
(int) sym->st_value,
**namep ? *namep : "#scratch", bfd_archive_filename (abfd));
(*_bfd_error_handler)
(_(" previously %s in %s"),
**namep ? *namep : "#scratch", bfd_archive_filename (abfd),
*p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
return false;
}
@ -1356,10 +1354,8 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
(_("Symbol `%s' has differing types: %s in %s"),
*namep, "REGISTER", bfd_archive_filename (abfd));
(*_bfd_error_handler)
(_(" previously %s in %s"),
(_("Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"),
*namep, bfd_archive_filename (abfd),
stt_types[type], bfd_archive_filename (p->abfd));
return false;
}
@ -1405,11 +1401,9 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (type > STT_FUNC)
type = 0;
(*_bfd_error_handler)
(_("Symbol `%s' has differing types: %s in %s"),
*namep, stt_types[type], bfd_archive_filename (abfd));
(*_bfd_error_handler)
(_(" previously %s in %s"),
"REGISTER", bfd_archive_filename (p->abfd));
(_("Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"),
*namep, stt_types[type], bfd_archive_filename (abfd),
bfd_archive_filename (p->abfd));
return false;
}
}
@ -2167,7 +2161,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_UA16:
{
Elf_Internal_Rela outrel;
boolean skip;
boolean skip, relocate;
if (sreloc == NULL)
{
@ -2190,12 +2184,15 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
skip = false;
relocate = false;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@ -2307,6 +2304,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* This reloc will be computed at runtime, so there's no
need to do anything now. */
if (! relocate)
continue;
}
break;

View File

@ -1466,21 +1466,21 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
}
skip = false;
relocate = false;
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rela->r_offset);
if (outrel.r_offset == (bfd_vma) -1)
skip = true;
else if (outrel.r_offset == (bfd_vma) -1)
skip = true, relocate = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
if (skip)
{
memset (&outrel, 0, sizeof outrel);
relocate = false;
}
/* h->dynindx may be -1 if this symbol was marked to
become local. */
else if (h != NULL
@ -1489,7 +1489,6 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
& ELF_LINK_HASH_DEF_REGULAR) == 0))
{
BFD_ASSERT (h->dynindx != -1);
relocate = false;
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
outrel.r_addend = relocation + rela->r_addend;
}
@ -1530,7 +1529,6 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (sindx > 0);
}
relocate = false;
outrel.r_info = ELF64_R_INFO (sindx, r_type);
outrel.r_addend = relocation + rela->r_addend;
}

View File

@ -220,14 +220,9 @@ elf_core_file_p (abfd)
elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
}
/* Process each program header. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
goto fail;
}
/* Set the machine architecture. */
/* Set the machine architecture. Do this before processing the
program headers since we need to know the architecture type
when processing the notes of some systems' core files. */
if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
{
/* It's OK if this fails for the generic target. */
@ -235,6 +230,13 @@ elf_core_file_p (abfd)
goto fail;
}
/* Process each program header. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
goto fail;
}
/* Save the entry point from the ELF header. */
bfd_get_start_address (abfd) = i_ehdrp->e_entry;

View File

@ -3107,7 +3107,7 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
outrel.r_info = ELFNN_R_INFO (dynindx, type);
outrel.r_addend = addend;
outrel.r_offset = _bfd_elf_section_offset (abfd, info, sec, offset);
if (outrel.r_offset == (bfd_vma) -1)
if ((outrel.r_offset | 1) == (bfd_vma) -1)
{
/* Run for the hills. We shouldn't be outputting a relocation
for this. So do what everyone else does and output a no-op. */

View File

@ -1,25 +1,25 @@
/* BFD back-end for ieee-695 objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define KEEPMINUSPCININST 0

View File

@ -860,7 +860,7 @@ ihex_write_object_contents (abfd)
sprintf_vma (buf, where);
(*_bfd_error_handler)
(_("%s: address 0x%s out of range for Intex Hex file"),
(_("%s: address 0x%s out of range for Intel Hex file"),
bfd_get_filename (abfd), buf);
bfd_set_error (bfd_error_bad_value);
return false;

View File

@ -1,24 +1,24 @@
/* Assorted BFD support routines, only used internally.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@ -1448,6 +1448,7 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
/* Give a warning at runtime if someone compiles code which calls
old routines. */
void
warn_deprecated (what, file, line, func)
const char *what;
@ -1460,11 +1461,13 @@ warn_deprecated (what, file, line, func)
if (~(size_t) func & ~mask)
{
fprintf (stderr, _("Deprecated %s called"), what);
/* Note: seperate sentances in order to allow
for translation into other languages. */
if (func)
fprintf (stderr, _(" at %s line %d in %s\n"), file, line, func);
fprintf (stderr, _("Deprecated %s called at %s line %d in %s\n"),
what, file, line, func);
else
fprintf (stderr, "\n");
fprintf (stderr, _("Deprecated %s called\n"), what);
mask |= ~(size_t) func;
}
}

View File

@ -721,6 +721,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ALPHA_CODEADDR",
"BFD_RELOC_ALPHA_GPREL_HI16",
"BFD_RELOC_ALPHA_GPREL_LO16",
"BFD_RELOC_ALPHA_BRSGP",
"BFD_RELOC_MIPS_JMP",
"BFD_RELOC_MIPS16_JMP",
"BFD_RELOC_MIPS16_GPREL",
@ -751,6 +752,55 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
"BFD_RELOC_SH_GOT_LOW16",
"BFD_RELOC_SH_GOT_MEDLOW16",
"BFD_RELOC_SH_GOT_MEDHI16",
"BFD_RELOC_SH_GOT_HI16",
"BFD_RELOC_SH_GOTPLT_LOW16",
"BFD_RELOC_SH_GOTPLT_MEDLOW16",
"BFD_RELOC_SH_GOTPLT_MEDHI16",
"BFD_RELOC_SH_GOTPLT_HI16",
"BFD_RELOC_SH_PLT_LOW16",
"BFD_RELOC_SH_PLT_MEDLOW16",
"BFD_RELOC_SH_PLT_MEDHI16",
"BFD_RELOC_SH_PLT_HI16",
"BFD_RELOC_SH_GOTOFF_LOW16",
"BFD_RELOC_SH_GOTOFF_MEDLOW16",
"BFD_RELOC_SH_GOTOFF_MEDHI16",
"BFD_RELOC_SH_GOTOFF_HI16",
"BFD_RELOC_SH_GOTPC_LOW16",
"BFD_RELOC_SH_GOTPC_MEDLOW16",
"BFD_RELOC_SH_GOTPC_MEDHI16",
"BFD_RELOC_SH_GOTPC_HI16",
"BFD_RELOC_SH_COPY64",
"BFD_RELOC_SH_GLOB_DAT64",
"BFD_RELOC_SH_JMP_SLOT64",
"BFD_RELOC_SH_RELATIVE64",
"BFD_RELOC_SH_GOT10BY4",
"BFD_RELOC_SH_GOT10BY8",
"BFD_RELOC_SH_GOTPLT10BY4",
"BFD_RELOC_SH_GOTPLT10BY8",
"BFD_RELOC_SH_GOTPLT32",
"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",
"BFD_RELOC_386_GOT32",
"BFD_RELOC_386_PLT32",

View File

@ -191,8 +191,8 @@ const bfd_target osf_core_vec =
{
"osf-core",
bfd_target_unknown_flavour,
BFD_ENDIAN_BIG, /* target byte order */
BFD_ENDIAN_BIG, /* target headers byte order */
BFD_ENDIAN_LITTLE, /* target byte order */
BFD_ENDIAN_LITTLE, /* target headers byte order */
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),

View File

@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI; the common executable parts.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Most of this hacked by Steve Chamberlain <sac@cygnus.com>.
PE/PEI rearrangement (and code added): Donn Terry
Softway Systems, Inc.
*/
Softway Systems, Inc. */
/* Hey look, some documentation [and in a place you expect to find it]!
@ -51,8 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
FIXME: Please add more docs here so the next poor fool that has to hack
on this code has a chance of getting something accomplished without
wasting too much time.
*/
wasting too much time. */
/* This expands into COFF_WITH_pe or COFF_WITH_pep depending on whether
we're compiling for straight PE or PE+. */
@ -1129,9 +1127,9 @@ pe_print_idata (abfd, vfile)
_("\nThe Import Tables (interpreted %s section contents)\n"),
section->name);
fprintf (file,
_(" vma: Hint Time Forward DLL First\n"));
fprintf (file,
_(" Table Stamp Chain Name Thunk\n"));
_("\
vma: Hint Time Forward DLL First\n\
Table Stamp Chain Name Thunk\n"));
amt = dataoff + datasize;
data = (bfd_byte *) bfd_malloc (amt);
@ -1539,10 +1537,9 @@ pe_print_pdata (abfd, vfile)
fprintf (file,
_(" vma:\t\t\tBegin Address End Address Unwind Info\n"));
#else
fprintf (file,
_(" vma:\t\tBegin End EH EH PrologEnd Exception\n"));
fprintf (file,
_(" \t\tAddress Address Handler Data Address Mask\n"));
fprintf (file, _("\
vma:\t\tBegin End EH EH PrologEnd Exception\n\
\t\tAddress Address Handler Data Address Mask\n"));
#endif
datasize = bfd_section_size (abfd, section);

View File

@ -37,6 +37,7 @@ coff-i960.c
coff-m68k.c
coff-m88k.c
coff-mips.c
coff-or32.c
coff-rs6000.c
coff-sh.c
coff-sparc.c
@ -84,6 +85,7 @@ cpu-mips.c
cpu-mmix.c
cpu-ns32k.c
cpu-openrisc.c
cpu-or32.c
cpu-pdp11.c
cpu-pj.c
cpu-powerpc.c
@ -138,12 +140,14 @@ elf32-m88k.c
elf32-mcore.c
elf32-mips.c
elf32-openrisc.c
elf32-or32.c
elf32-pj.c
elf32-ppc.c
elf32-s390.c
elf32-sh-lin.c
elf32-sh-nbsd.c
elf32-sh.c
elf32-sh64.c
elf32-sparc.c
elf32-v850.c
elf32-xstormy16.c
@ -156,6 +160,7 @@ elf64-mips.c
elf64-mmix.c
elf64-ppc.c
elf64-s390.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
elf64.c

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* BFD support for handling relocation entries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -65,7 +65,7 @@ CODE_FRAGMENT
.
.typedef enum bfd_reloc_status
.{
. {* No errors detected *}
. {* No errors detected. *}
. bfd_reloc_ok,
.
. {* The relocation was performed, but there was an overflow. *}
@ -74,13 +74,13 @@ CODE_FRAGMENT
. {* The address to relocate was not within the section supplied. *}
. bfd_reloc_outofrange,
.
. {* Used by special functions *}
. {* Used by special functions. *}
. bfd_reloc_continue,
.
. {* Unsupported relocation size requested. *}
. bfd_reloc_notsupported,
.
. {* Unused *}
. {* Unused. *}
. bfd_reloc_other,
.
. {* The symbol to relocate against was undefined. *}
@ -97,20 +97,21 @@ CODE_FRAGMENT
.
.typedef struct reloc_cache_entry
.{
. {* A pointer into the canonical table of pointers *}
. {* A pointer into the canonical table of pointers. *}
. struct symbol_cache_entry **sym_ptr_ptr;
.
. {* offset in section *}
. {* offset in section. *}
. bfd_size_type address;
.
. {* addend for relocation value *}
. {* addend for relocation value. *}
. bfd_vma addend;
.
. {* Pointer to how to perform the required relocation *}
. {* Pointer to how to perform the required relocation. *}
. reloc_howto_type *howto;
.
.} arelent;
.}
.arelent;
.
*/
/*
@ -276,7 +277,7 @@ SUBSUBSECTION
information that libbfd needs to know to tie up a back end's data.
CODE_FRAGMENT
.struct symbol_cache_entry; {* Forward declaration *}
.struct symbol_cache_entry; {* Forward declaration. *}
.
.struct reloc_howto_struct
.{
@ -366,7 +367,7 @@ CODE_FRAGMENT
. empty (e.g., m88k bcs); this flag signals the fact. *}
. boolean pcrel_offset;
.};
.
*/
/*
@ -413,7 +414,7 @@ DESCRIPTION
. } \
. } \
. }
.
*/
/*
@ -457,8 +458,9 @@ DESCRIPTION
.{
. arelent relent;
. struct relent_chain *next;
.} arelent_chain;
.}
.arelent_chain;
.
*/
/* N_ONES produces N one bits, without overflowing machine arithmetic. */
@ -819,11 +821,9 @@ space consuming. For each target:
bfd_arch_bits_per_address (abfd),
relocation);
/*
Either we are relocating all the way, or we don't want to apply
/* Either we are relocating all the way, or we don't want to apply
the relocation to the reloc entry (probably because there isn't
any room in the output format to describe addends to relocs)
*/
any room in the output format to describe addends to relocs). */
/* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
(OSF version 1.3, compiler version 3.11). It miscompiles the
@ -850,11 +850,10 @@ space consuming. For each target:
relocation >>= (bfd_vma) howto->rightshift;
/* Shift everything up to where it's going to be used */
/* Shift everything up to where it's going to be used. */
relocation <<= (bfd_vma) howto->bitpos;
/* Wait for the day when all have the mask in them */
/* Wait for the day when all have the mask in them. */
/* What we do:
i instruction to be left alone
@ -975,7 +974,6 @@ DESCRIPTION
For now, this function should be considered reserved for the
assembler.
*/
bfd_reloc_status_type
@ -1105,7 +1103,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
If we've relocated with a symbol with a section, change
into a ref to the section belonging to the symbol. */
reloc_entry->address += input_section->output_offset;
/* WTF?? */
@ -1181,8 +1178,7 @@ space consuming. For each target:
6) if the resulting object files are the same, you have at least
made it no worse
7) if they are different you have to figure out which version is
right
*/
right. */
relocation -= reloc_entry->addend;
#endif
reloc_entry->addend = 0;
@ -1207,11 +1203,9 @@ space consuming. For each target:
bfd_arch_bits_per_address (abfd),
relocation);
/*
Either we are relocating all the way, or we don't want to apply
/* Either we are relocating all the way, or we don't want to apply
the relocation to the reloc entry (probably because there isn't
any room in the output format to describe addends to relocs)
*/
any room in the output format to describe addends to relocs). */
/* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
(OSF version 1.3, compiler version 3.11). It miscompiles the
@ -1238,11 +1232,10 @@ space consuming. For each target:
relocation >>= (bfd_vma) howto->rightshift;
/* Shift everything up to where it's going to be used */
/* Shift everything up to where it's going to be used. */
relocation <<= (bfd_vma) howto->bitpos;
/* Wait for the day when all have the mask in them */
/* Wait for the day when all have the mask in them. */
/* What we do:
i instruction to be left alone
@ -1962,6 +1955,13 @@ ENUMDOC
The GPREL_HI/LO relocations together form a 32-bit offset from the
GP register.
ENUM
BFD_RELOC_ALPHA_BRSGP
ENUMDOC
Like BFD_RELOC_23_PCREL_S2, except that the source and target must
share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD.
ENUM
BFD_RELOC_MIPS_JMP
ENUMDOC
@ -2050,6 +2050,107 @@ ENUMX
ENUMX
BFD_RELOC_MIPS_JALR
COMMENT
COMMENT
ENUMX
BFD_RELOC_SH_GOT_LOW16
ENUMX
BFD_RELOC_SH_GOT_MEDLOW16
ENUMX
BFD_RELOC_SH_GOT_MEDHI16
ENUMX
BFD_RELOC_SH_GOT_HI16
ENUMX
BFD_RELOC_SH_GOTPLT_LOW16
ENUMX
BFD_RELOC_SH_GOTPLT_MEDLOW16
ENUMX
BFD_RELOC_SH_GOTPLT_MEDHI16
ENUMX
BFD_RELOC_SH_GOTPLT_HI16
ENUMX
BFD_RELOC_SH_PLT_LOW16
ENUMX
BFD_RELOC_SH_PLT_MEDLOW16
ENUMX
BFD_RELOC_SH_PLT_MEDHI16
ENUMX
BFD_RELOC_SH_PLT_HI16
ENUMX
BFD_RELOC_SH_GOTOFF_LOW16
ENUMX
BFD_RELOC_SH_GOTOFF_MEDLOW16
ENUMX
BFD_RELOC_SH_GOTOFF_MEDHI16
ENUMX
BFD_RELOC_SH_GOTOFF_HI16
ENUMX
BFD_RELOC_SH_GOTPC_LOW16
ENUMX
BFD_RELOC_SH_GOTPC_MEDLOW16
ENUMX
BFD_RELOC_SH_GOTPC_MEDHI16
ENUMX
BFD_RELOC_SH_GOTPC_HI16
ENUMX
BFD_RELOC_SH_COPY64
ENUMX
BFD_RELOC_SH_GLOB_DAT64
ENUMX
BFD_RELOC_SH_JMP_SLOT64
ENUMX
BFD_RELOC_SH_RELATIVE64
ENUMX
BFD_RELOC_SH_GOT10BY4
ENUMX
BFD_RELOC_SH_GOT10BY8
ENUMX
BFD_RELOC_SH_GOTPLT10BY4
ENUMX
BFD_RELOC_SH_GOTPLT10BY8
ENUMX
BFD_RELOC_SH_GOTPLT32
COMMENT
ENUMX
BFD_RELOC_SH_SHMEDIA_CODE
ENUMX
BFD_RELOC_SH_IMMU5
ENUMX
BFD_RELOC_SH_IMMS6
ENUMX
BFD_RELOC_SH_IMMS6BY32
ENUMX
BFD_RELOC_SH_IMMU6
ENUMX
BFD_RELOC_SH_IMMS10
ENUMX
BFD_RELOC_SH_IMMS10BY2
ENUMX
BFD_RELOC_SH_IMMS10BY4
ENUMX
BFD_RELOC_SH_IMMS10BY8
ENUMX
BFD_RELOC_SH_IMMS16
ENUMX
BFD_RELOC_SH_IMMU16
ENUMX
BFD_RELOC_SH_IMM_LOW16
ENUMX
BFD_RELOC_SH_IMM_LOW16_PCREL
ENUMX
BFD_RELOC_SH_IMM_MEDLOW16
ENUMX
BFD_RELOC_SH_IMM_MEDLOW16_PCREL
ENUMX
BFD_RELOC_SH_IMM_MEDHI16
ENUMX
BFD_RELOC_SH_IMM_MEDHI16_PCREL
ENUMX
BFD_RELOC_SH_IMM_HI16
ENUMX
BFD_RELOC_SH_IMM_HI16_PCREL
ENUMX
BFD_RELOC_SH_PT_16
COMMENT
ENUMDOC
MIPS ELF relocations.
@ -3374,7 +3475,6 @@ DESCRIPTION
don't do relaxing -- i.e., does nothing.
*/
/*ARGSUSED*/
boolean
bfd_generic_relax_section (abfd, section, link_info, again)
bfd *abfd ATTRIBUTE_UNUSED;
@ -3399,7 +3499,6 @@ DESCRIPTION
don't do section gc -- i.e., does nothing.
*/
/*ARGSUSED*/
boolean
bfd_generic_gc_sections (abfd, link_info)
bfd *abfd ATTRIBUTE_UNUSED;
@ -3421,7 +3520,6 @@ DESCRIPTION
which don't have SEC_MERGE support -- i.e., does nothing.
*/
/*ARGSUSED*/
boolean
bfd_generic_merge_sections (abfd, link_info)
bfd *abfd ATTRIBUTE_UNUSED;
@ -3459,7 +3557,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
boolean relocateable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff */
/* Get enough memory to hold the stuff. */
bfd *input_bfd = link_order->u.indirect.section->owner;
asection *input_section = link_order->u.indirect.section;
@ -3474,7 +3572,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
/* read in the section */
/* Read in the section. */
if (!bfd_get_section_contents (input_bfd,
input_section,
(PTR) data,
@ -3482,7 +3580,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
input_section->_raw_size))
goto error_return;
/* We're not relaxing the section, so just copy the size info */
/* We're not relaxing the section, so just copy the size info. */
input_section->_cooked_size = input_section->_raw_size;
input_section->reloc_done = true;
@ -3512,7 +3610,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
{
asection *os = input_section->output_section;
/* A partial link, so keep the relocs */
/* A partial link, so keep the relocs. */
os->orelocation[os->reloc_count] = *parent;
os->reloc_count++;
}

View File

@ -0,0 +1,735 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
2001, 2002
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
them with octal escapes), and isn't useful without an understanding of what
character set it is.
Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This port currently only handles reading object files, except when
compiled on an RS/6000 host. -- no archive support, no core files.
In all cases, it does not support writing.
This is in a separate file from coff-rs6000.c, because it includes
system include files that conflict with coff/rs6000.h. */
/* Internalcoff.h and coffcode.h modify themselves based on this flag. */
#define RS6000COFF_C 1
/* The AIX 4.1 kernel is obviously compiled with -D_LONG_LONG, so
we have to define _LONG_LONG for older versions of gcc to get the
proper alignments in the user structure. */
#if defined(_AIX41) && !defined(_LONG_LONG)
#define _LONG_LONG
#endif
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#ifdef AIX_CORE
/* AOUTHDR is defined by the above. We need another defn of it, from the
system include files. Punt the old one and get us a new name for the
typedef in the system include files. */
#ifdef AOUTHDR
#undef AOUTHDR
#endif
#define AOUTHDR second_AOUTHDR
#undef SCNHDR
/* ------------------------------------------------------------------------ */
/* Support for core file stuff.. */
/* ------------------------------------------------------------------------ */
#include <sys/user.h>
#define __LDINFO_PTRACE32__ /* for __ld_info32 */
#define __LDINFO_PTRACE64__ /* for __ld_info64 */
#include <sys/ldr.h>
#include <sys/core.h>
#include <sys/systemcfg.h>
#define core_hdr(bfd) ((CoreHdr *) bfd->tdata.any)
/* AIX 4.1 changed the names and locations of a few items in the core file.
AIX 4.3 defined an entirely new structure, core_dumpx, but kept support for
the previous 4.1 structure, core_dump.
AIX_CORE_DUMPX_CORE is defined (by configure) on AIX 4.3+, and
CORE_VERSION_1 is defined (by AIX core.h) as 2 on AIX 4.3+ and as 1 on AIX
4.1 and 4.2. AIX pre-4.1 (aka 3.x) either doesn't define CORE_VERSION_1
or else defines it as 0. */
#if defined(CORE_VERSION_1) && !CORE_VERSION_1
# undef CORE_VERSION_1
#endif
/* The following union and macros allow this module to compile on all AIX
versions and to handle both core_dumpx and core_dump on 4.3+. CNEW_*()
and COLD_*() macros respectively retrieve core_dumpx and core_dump
values. */
/* Union of 32-bit and 64-bit versions of ld_info. */
typedef union {
#ifdef __ld_info32
struct __ld_info32 l32;
struct __ld_info64 l64;
#else
struct ld_info l32;
struct ld_info l64;
#endif
} LdInfo;
/* Union of old and new core dump structures. */
typedef union {
#ifdef AIX_CORE_DUMPX_CORE
struct core_dumpx new; /* new AIX 4.3+ core dump */
#else
struct core_dump new; /* for simpler coding */
#endif
struct core_dump old; /* old AIX 4.2- core dump, still used on
4.3+ with appropriate SMIT config */
} CoreHdr;
/* Union of old and new vm_info structures. */
#ifdef CORE_VERSION_1
typedef union {
#ifdef AIX_CORE_DUMPX_CORE
struct vm_infox new;
#else
struct vm_info new;
#endif
struct vm_info old;
} VmInfo;
#endif
/* Return whether CoreHdr C is in new or old format. */
#ifdef AIX_CORE_DUMPX_CORE
# define CORE_NEW(c) (!(c).old.c_entries)
#else
# define CORE_NEW(c) 0
#endif
/* Return the c_stackorg field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_STACKORG(c) (c).c_stackorg
#else
# define CNEW_STACKORG(c) 0
#endif
/* Return the offset to the loader region from struct core_dump C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_LOADER(c) (c).c_loader
#else
# define CNEW_LOADER(c) 0
#endif
/* Return the offset to the loader region from struct core_dump C. */
#define COLD_LOADER(c) (c).c_tab
/* Return the c_lsize field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_LSIZE(c) (c).c_lsize
#else
# define CNEW_LSIZE(c) 0
#endif
/* Return the c_dataorg field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_DATAORG(c) (c).c_dataorg
#else
# define CNEW_DATAORG(c) 0
#endif
/* Return the c_datasize field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_DATASIZE(c) (c).c_datasize
#else
# define CNEW_DATASIZE(c) 0
#endif
/* Return the c_impl field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_IMPL(c) (c).c_impl
#else
# define CNEW_IMPL(c) 0
#endif
/* Return the command string from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_COMM(c) (c).c_u.U_proc.pi_comm
#else
# define CNEW_COMM(c) 0
#endif
/* Return the command string from struct core_dump C. */
#ifdef CORE_VERSION_1
# define COLD_COMM(c) (c).c_u.U_comm
#else
# define COLD_COMM(c) (c).c_u.u_comm
#endif
/* Return the struct __context64 pointer from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_CONTEXT64(c) (c).c_flt.hctx.r64
#else
# define CNEW_CONTEXT64(c) c
#endif
/* Return the struct mstsave pointer from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_MSTSAVE(c) (c).c_flt.hctx.r32
#else
# define CNEW_MSTSAVE(c) c
#endif
/* Return the struct mstsave pointer from struct core_dump C. */
#ifdef CORE_VERSION_1
# define COLD_MSTSAVE(c) (c).c_mst
#else
# define COLD_MSTSAVE(c) (c).c_u.u_save
#endif
/* Return whether struct core_dumpx is from a 64-bit process. */
#ifdef AIX_CORE_DUMPX_CORE
# define CNEW_PROC64(c) IS_PROC64(&(c).c_u.U_proc)
#else
# define CNEW_PROC64(c) 0
#endif
/* Magic end-of-stack addresses for old core dumps. This is _very_ fragile,
but I don't see any easy way to get that info right now. */
#ifdef CORE_VERSION_1
# define COLD_STACKEND 0x2ff23000
#else
# define COLD_STACKEND 0x2ff80000
#endif
/* Size of the leading portion that old and new core dump structures have in
common. */
#define CORE_COMMONSZ ((int) &((struct core_dump *) 0)->c_entries \
+ sizeof (((struct core_dump *) 0)->c_entries))
/* Try to read into CORE the header from the core file associated with ABFD.
Return success. */
static boolean
read_hdr (bfd *abfd, CoreHdr *core)
{
bfd_size_type size;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
/* Read the leading portion that old and new core dump structures have in
common. */
size = CORE_COMMONSZ;
if (bfd_bread (core, size, abfd) != size)
return false;
/* Read the trailing portion of the structure. */
if (CORE_NEW (*core))
size = sizeof (core->new);
else
size = sizeof (core->old);
size -= CORE_COMMONSZ;
return bfd_bread ((char *) core + CORE_COMMONSZ, size, abfd) == size;
}
static asection *
make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
bfd *abfd;
const char *name;
flagword flags;
bfd_size_type _raw_size;
bfd_vma vma;
file_ptr filepos;
{
asection *asect;
asect = bfd_make_section_anyway (abfd, name);
if (!asect)
return NULL;
asect->flags = flags;
asect->_raw_size = _raw_size;
asect->vma = vma;
asect->filepos = filepos;
asect->alignment_power = 8;
return asect;
}
/* Decide if a given bfd represents a `core' file or not. There really is no
magic number or anything like, in rs6000coff. */
const bfd_target *
rs6000coff_core_p (abfd)
bfd *abfd;
{
CoreHdr core;
struct stat statbuf;
bfd_size_type size;
char *tmpptr;
/* Values from new and old core structures. */
int c_flag;
file_ptr c_stack, c_regoff, c_loader;
bfd_size_type c_size, c_regsize, c_lsize;
bfd_vma c_stackend;
void *c_regptr;
int proc64;
if (!read_hdr (abfd, &core))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
/* Copy fields from new or old core structure. */
if (CORE_NEW (core))
{
c_flag = core.new.c_flag;
c_stack = (file_ptr) core.new.c_stack;
c_size = core.new.c_size;
c_stackend = CNEW_STACKORG (core.new) + c_size;
c_lsize = CNEW_LSIZE (core.new);
c_loader = CNEW_LOADER (core.new);
proc64 = CNEW_PROC64 (core.new);
}
else
{
c_flag = core.old.c_flag;
c_stack = (file_ptr) core.old.c_stack;
c_size = core.old.c_size;
c_stackend = COLD_STACKEND;
c_lsize = 0x7ffffff;
c_loader = (file_ptr) COLD_LOADER (core.old);
proc64 = 0;
}
if (proc64)
{
c_regsize = sizeof (CNEW_CONTEXT64 (core.new));
c_regptr = &CNEW_CONTEXT64 (core.new);
}
else if (CORE_NEW (core))
{
c_regsize = sizeof (CNEW_MSTSAVE (core.new));
c_regptr = &CNEW_MSTSAVE (core.new);
}
else
{
c_regsize = sizeof (COLD_MSTSAVE (core.old));
c_regptr = &COLD_MSTSAVE (core.old);
}
c_regoff = (char *) c_regptr - (char *) &core;
if (bfd_stat (abfd, &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
return NULL;
}
/* If the core file ulimit is too small, the system will first
omit the data segment, then omit the stack, then decline to
dump core altogether (as far as I know UBLOCK_VALID and LE_VALID
are always set) (this is based on experimentation on AIX 3.2).
Now, the thing is that GDB users will be surprised
if segments just silently don't appear (well, maybe they would
think to check "info files", I don't know).
For the data segment, we have no choice but to keep going if it's
not there, since the default behavior is not to dump it (regardless
of the ulimit, it's based on SA_FULLDUMP). But for the stack segment,
if it's not there, we refuse to have anything to do with this core
file. The usefulness of a core dump without a stack segment is pretty
limited anyway. */
if (!(c_flag & UBLOCK_VALID)
|| !(c_flag & LE_VALID))
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
if (!(c_flag & USTACK_VALID))
{
bfd_set_error (bfd_error_file_truncated);
return NULL;
}
/* Don't check the core file size for a full core, AIX 4.1 includes
additional shared library sections in a full core. */
if (!(c_flag & (FULL_CORE | CORE_TRUNC)))
{
/* If the size is wrong, it means we're misinterpreting something. */
if (c_stack + (file_ptr) c_size != statbuf.st_size)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
}
/* Sanity check on the c_tab field. */
if (!CORE_NEW (core) && (c_loader < (file_ptr) sizeof core.old ||
c_loader >= statbuf.st_size ||
c_loader >= c_stack))
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
/* Issue warning if the core file was truncated during writing. */
if (c_flag & CORE_TRUNC)
(*_bfd_error_handler) (_("%s: warning core file truncated"),
bfd_get_filename (abfd));
/* Allocate core file header. */
size = CORE_NEW (core) ? sizeof (core.new) : sizeof (core.old);
tmpptr = (char *) bfd_zalloc (abfd, (bfd_size_type) size);
if (!tmpptr)
return NULL;
/* Copy core file header. */
memcpy (tmpptr, &core, size);
set_tdata (abfd, tmpptr);
/* Set architecture. */
if (CORE_NEW (core))
{
enum bfd_architecture arch;
unsigned long mach;
switch (CNEW_IMPL (core.new))
{
case POWER_RS1:
case POWER_RSC:
case POWER_RS2:
arch = bfd_arch_rs6000;
mach = bfd_mach_rs6k;
break;
default:
arch = bfd_arch_powerpc;
mach = bfd_mach_ppc;
break;
}
bfd_default_set_arch_mach (abfd, arch, mach);
}
/* .stack section. */
if (!make_bfd_asection (abfd, ".stack",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
c_size, c_stackend - c_size, c_stack))
goto fail;
/* .reg section for all registers. */
if (!make_bfd_asection (abfd, ".reg",
SEC_HAS_CONTENTS,
c_regsize, (bfd_vma) 0, c_regoff))
goto fail;
/* .ldinfo section.
To actually find out how long this section is in this particular
core dump would require going down the whole list of struct ld_info's.
See if we can just fake it. */
if (!make_bfd_asection (abfd, ".ldinfo",
SEC_HAS_CONTENTS,
c_lsize, (bfd_vma) 0, c_loader))
goto fail;
#ifndef CORE_VERSION_1
/* .data section if present.
AIX 3 dumps the complete data section and sets FULL_CORE if the
ulimit is large enough, otherwise the data section is omitted.
AIX 4 sets FULL_CORE even if the core file is truncated, we have
to examine core.c_datasize below to find out the actual size of
the .data section. */
if (c_flag & FULL_CORE)
{
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
(bfd_size_type) core.old.c_u.u_dsize,
(bfd_vma)
CDATA_ADDR (core.old.c_u.u_dsize),
c_stack + c_size))
goto fail;
}
#endif
#ifdef CORE_VERSION_1
/* AIX 4 adds data sections from loaded objects to the core file,
which can be found by examining ldinfo, and anonymously mmapped
regions. */
{
LdInfo ldinfo;
bfd_size_type ldi_datasize;
file_ptr ldi_core;
uint ldi_next;
bfd_vma ldi_dataorg;
/* Fields from new and old core structures. */
bfd_size_type c_datasize, c_vmregions;
file_ptr c_data, c_vmm;
if (CORE_NEW (core))
{
c_datasize = CNEW_DATASIZE (core.new);
c_data = (file_ptr) core.new.c_data;
c_vmregions = core.new.c_vmregions;
c_vmm = (file_ptr) core.new.c_vmm;
}
else
{
c_datasize = core.old.c_datasize;
c_data = (file_ptr) core.old.c_data;
c_vmregions = core.old.c_vmregions;
c_vmm = (file_ptr) core.old.c_vmm;
}
/* .data section from executable. */
if (c_datasize)
{
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
c_datasize,
(bfd_vma) CDATA_ADDR (c_datasize),
c_data))
goto fail;
}
/* .data sections from loaded objects. */
if (proc64)
size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
else
size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
while (1)
{
if (bfd_seek (abfd, c_loader, SEEK_SET) != 0)
goto fail;
if (bfd_bread (&ldinfo, size, abfd) != size)
goto fail;
if (proc64)
{
ldi_core = ldinfo.l64.ldinfo_core;
ldi_datasize = ldinfo.l64.ldinfo_datasize;
ldi_dataorg = (bfd_vma) ldinfo.l64.ldinfo_dataorg;
ldi_next = ldinfo.l64.ldinfo_next;
}
else
{
ldi_core = ldinfo.l32.ldinfo_core;
ldi_datasize = ldinfo.l32.ldinfo_datasize;
ldi_dataorg = (bfd_vma) (long) ldinfo.l32.ldinfo_dataorg;
ldi_next = ldinfo.l32.ldinfo_next;
}
if (ldi_core)
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
ldi_datasize, ldi_dataorg, ldi_core))
goto fail;
if (ldi_next == 0)
break;
c_loader += ldi_next;
}
/* .vmdata sections from anonymously mmapped regions. */
if (c_vmregions)
{
bfd_size_type i;
if (bfd_seek (abfd, c_vmm, SEEK_SET) != 0)
goto fail;
for (i = 0; i < c_vmregions; i++)
{
VmInfo vminfo;
bfd_size_type vminfo_size;
file_ptr vminfo_offset;
bfd_vma vminfo_addr;
size = CORE_NEW (core) ? sizeof (vminfo.new) : sizeof (vminfo.old);
if (bfd_bread (&vminfo, size, abfd) != size)
goto fail;
if (CORE_NEW (core))
{
vminfo_addr = (bfd_vma) vminfo.new.vminfo_addr;
vminfo_size = vminfo.new.vminfo_size;
vminfo_offset = vminfo.new.vminfo_offset;
}
else
{
vminfo_addr = (bfd_vma) (long) vminfo.old.vminfo_addr;
vminfo_size = vminfo.old.vminfo_size;
vminfo_offset = vminfo.old.vminfo_offset;
}
if (vminfo_offset)
if (!make_bfd_asection (abfd, ".vmdata",
SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS,
vminfo_size, vminfo_addr,
vminfo_offset))
goto fail;
}
}
}
#endif
return abfd->xvec; /* This is garbage for now. */
fail:
bfd_release (abfd, abfd->tdata.any);
abfd->tdata.any = NULL;
bfd_section_list_clear (abfd);
return NULL;
}
/* Return `true' if given core is from the given executable. */
boolean
rs6000coff_core_file_matches_executable_p (core_bfd, exec_bfd)
bfd *core_bfd;
bfd *exec_bfd;
{
CoreHdr core;
bfd_size_type size;
char *path, *s;
size_t alloc;
const char *str1, *str2;
boolean ret;
file_ptr c_loader;
if (!read_hdr (core_bfd, &core))
return false;
if (CORE_NEW (core))
c_loader = CNEW_LOADER (core.new);
else
c_loader = (file_ptr) COLD_LOADER (core.old);
if (CORE_NEW (core) && CNEW_PROC64 (core.new))
size = (int) ((LdInfo *) 0)->l64.ldinfo_filename;
else
size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
if (bfd_seek (core_bfd, c_loader + size, SEEK_SET) != 0)
return false;
alloc = 100;
path = bfd_malloc ((bfd_size_type) alloc);
if (path == NULL)
return false;
s = path;
while (1)
{
if (bfd_bread (s, (bfd_size_type) 1, core_bfd) != 1)
{
free (path);
return false;
}
if (*s == '\0')
break;
++s;
if (s == path + alloc)
{
char *n;
alloc *= 2;
n = bfd_realloc (path, (bfd_size_type) alloc);
if (n == NULL)
{
free (path);
return false;
}
s = n + (path - s);
path = n;
}
}
str1 = strrchr (path, '/');
str2 = strrchr (exec_bfd->filename, '/');
/* step over character '/' */
str1 = str1 != NULL ? str1 + 1 : path;
str2 = str2 != NULL ? str2 + 1 : exec_bfd->filename;
if (strcmp (str1, str2) == 0)
ret = true;
else
ret = false;
free (path);
return ret;
}
char *
rs6000coff_core_file_failing_command (abfd)
bfd *abfd;
{
CoreHdr *core = core_hdr (abfd);
char *com = CORE_NEW (*core) ?
CNEW_COMM (core->new) : COLD_COMM (core->old);
if (*com)
return com;
else
return 0;
}
int
rs6000coff_core_file_failing_signal (abfd)
bfd *abfd;
{
CoreHdr *core = core_hdr (abfd);
return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo;
}
#endif /* AIX_CORE */

View File

@ -170,25 +170,20 @@ CODE_FRAGMENT
.{
. {* The name of the section; the name isn't a copy, the pointer is
. the same as that passed to bfd_make_section. *}
.
. const char *name;
.
. {* A unique sequence number. *}
.
. int id;
.
. {* Which section in the bfd; 0..n-1 as sections are created in a bfd. *}
.
. int index;
.
. {* The next section in the list belonging to the BFD, or NULL. *}
.
. struct sec *next;
.
. {* The field flags contains attributes of the section. Some
. flags are read in from the object file, and some are
. synthesized from other information. *}
.
. flagword flags;
.
.#define SEC_NO_FLAGS 0x000
@ -397,25 +392,21 @@ CODE_FRAGMENT
. backend can assign addresses (for example, in <<a.out>>, where
. the default address for <<.data>> is dependent on the specific
. target and various flags). *}
.
. bfd_vma vma;
.
. {* The load address of the section - where it would be in a
. rom image; really only used for writing section header
. information. *}
.
. bfd_vma lma;
.
. {* The size of the section in octets, as it will be output.
. Contains a value even if the section has no contents (e.g., the
. size of <<.bss>>). This will be filled in after relocation. *}
.
. bfd_size_type _cooked_size;
.
. {* The original size on disk of the section, in octets. Normally this
. value is the same as the size, but if some relaxing has
. been done, then this value will be bigger. *}
.
. bfd_size_type _raw_size;
.
. {* If this section is going to be output, then this value is the
@ -425,49 +416,39 @@ CODE_FRAGMENT
. 100th octet (8-bit quantity) in the output section, this value
. would be 100. However, if the target byte size is 16 bits
. (bfd_octets_per_byte is "2"), this value would be 50. *}
.
. bfd_vma output_offset;
.
. {* The output section through which to map on output. *}
.
. struct sec *output_section;
.
. {* The alignment requirement of the section, as an exponent of 2 -
. e.g., 3 aligns to 2^3 (or 8). *}
.
. unsigned int alignment_power;
.
. {* If an input section, a pointer to a vector of relocation
. records for the data in this section. *}
.
. struct reloc_cache_entry *relocation;
.
. {* If an output section, a pointer to a vector of pointers to
. relocation records for the data in this section. *}
.
. struct reloc_cache_entry **orelocation;
.
. {* The number of relocation records in one of the above *}
.
. {* The number of relocation records in one of the above. *}
. unsigned reloc_count;
.
. {* Information below is back end specific - and not always used
. or updated. *}
.
. {* File position of section data. *}
.
. file_ptr filepos;
.
. {* File position of relocation info. *}
.
. file_ptr rel_filepos;
.
. {* File position of line data. *}
.
. file_ptr line_filepos;
.
. {* Pointer to data for applications. *}
.
. PTR userdata;
.
. {* If the SEC_IN_MEMORY flag is set, this points to the actual
@ -475,48 +456,40 @@ CODE_FRAGMENT
. unsigned char *contents;
.
. {* Attached line number information. *}
.
. alent *lineno;
.
. {* Number of line number records. *}
.
. unsigned int lineno_count;
.
. {* Entity size for merging purposes. *}
.
. unsigned int entsize;
.
. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
.
. struct bfd_comdat_info *comdat;
.
. {* When a section is being output, this value changes as more
. linenumbers are written out. *}
.
. file_ptr moving_line_filepos;
.
. {* What the section number is in the target world. *}
.
. int target_index;
.
. PTR used_by_bfd;
.
. {* If this is a constructor section then here is a list of the
. relocations created to relocate items within it. *}
.
. struct relent_chain *constructor_chain;
.
. {* The BFD which owns the section. *}
.
. bfd *owner;
.
. {* A symbol which points at this section only *}
. {* A symbol which points at this section only. *}
. struct symbol_cache_entry *symbol;
. struct symbol_cache_entry **symbol_ptr_ptr;
.
. struct bfd_link_order *link_order_head;
. struct bfd_link_order *link_order_tail;
.} asection ;
.} asection;
.
.{* These sections are global, and are managed by BFD. The application
. and target back end are not permitted to change the values in
@ -528,18 +501,18 @@ CODE_FRAGMENT
.#define BFD_COM_SECTION_NAME "*COM*"
.#define BFD_IND_SECTION_NAME "*IND*"
.
.{* the absolute section *}
.{* The absolute section. *}
.extern const asection bfd_abs_section;
.#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
.#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
.{* Pointer to the undefined section *}
.{* Pointer to the undefined section. *}
.extern const asection bfd_und_section;
.#define bfd_und_section_ptr ((asection *) &bfd_und_section)
.#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
.{* Pointer to the common section *}
.{* Pointer to the common section. *}
.extern const asection bfd_com_section;
.#define bfd_com_section_ptr ((asection *) &bfd_com_section)
.{* Pointer to the indirect section *}
.{* Pointer to the indirect section. *}
.extern const asection bfd_ind_section;
.#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
.#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)

View File

@ -1,6 +1,6 @@
/* Generic symbol-table support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@ -192,7 +192,6 @@ CODE_FRAGMENT
. instead, except that some symbols point to the global sections
. bfd_{abs,com,und}_section. This could be fixed by making
. these globals be per-bfd (or per-target-flavor). FIXME. *}
.
. struct _bfd *the_bfd; {* Use bfd_asymbol_bfd(sym) to access this field. *}
.
. {* The text of the symbol. The name is left alone, and not copied; the
@ -204,8 +203,7 @@ CODE_FRAGMENT
. a pointer to another symbol is stored here. *}
. symvalue value;
.
. {* Attributes of a symbol: *}
.
. {* Attributes of a symbol. *}
.#define BSF_NO_FLAGS 0x00
.
. {* The symbol has local scope; <<static>> in <<C>>. The value
@ -218,11 +216,11 @@ CODE_FRAGMENT
.
. {* The symbol has global scope and is exported. The value is
. the offset into the section of the data. *}
.#define BSF_EXPORT BSF_GLOBAL {* no real difference *}
.#define BSF_EXPORT BSF_GLOBAL {* No real difference. *}
.
. {* A normal C symbol would be one of:
. <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
. <<BSF_GLOBAL>> *}
. <<BSF_GLOBAL>>. *}
.
. {* The symbol is a debugging record. The value has an arbitary
. meaning, unless BSF_DEBUGGING_RELOC is also set. *}
@ -256,7 +254,6 @@ CODE_FRAGMENT
. which is also <<C_EXT>> symbol appears where it was
. declared and not at the end of a section. This bit is set
. by the target BFD part to convey this information. *}
.
.#define BSF_NOT_AT_END 0x400
.
. {* Signal that the symbol is the label of constructor section. *}
@ -300,9 +297,11 @@ CODE_FRAGMENT
. {
. PTR p;
. bfd_vma i;
. } udata;
. }
. udata;
.}
.asymbol;
.
.} asymbol;
*/
#include "bfd.h"
@ -335,7 +334,7 @@ DESCRIPTION
.#define bfd_get_symtab_upper_bound(abfd) \
. BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
.
*/
/*
@ -380,6 +379,7 @@ DESCRIPTION
.#define bfd_is_local_label_name(abfd, name) \
. BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
.
*/
/*
@ -396,7 +396,7 @@ DESCRIPTION
.#define bfd_canonicalize_symtab(abfd, location) \
. BFD_SEND (abfd, _bfd_canonicalize_symtab,\
. (abfd, location))
.
*/
/*
@ -492,6 +492,7 @@ DESCRIPTION
.#define bfd_make_empty_symbol(abfd) \
. BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
.
*/
/*
@ -530,6 +531,7 @@ DESCRIPTION
.#define bfd_make_debug_symbol(abfd,ptr,size) \
. BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
.
*/
struct section_to_type
@ -716,7 +718,7 @@ DESCRIPTION
.#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
. BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
. (ibfd, isymbol, obfd, osymbol))
.
*/
/* The generic version of the function which returns mini symbols.

View File

@ -125,7 +125,7 @@ DESCRIPTION
. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
. (bfd_assert (__FILE__,__LINE__), NULL))
.#endif
.
This is the structure which defines the type of BFD this is. The
<<xvec>> member of the struct <<bfd>> itself points here. Each
module that implements access to a different target under BFD,
@ -135,7 +135,8 @@ DESCRIPTION
the entry points which call them. Too bad we can't have one
macro to define them both!
.enum bfd_flavour {
.enum bfd_flavour
.{
. bfd_target_unknown_flavour,
. bfd_target_aout_flavour,
. bfd_target_coff_flavour,
@ -164,51 +165,40 @@ DESCRIPTION
.
.typedef struct bfd_target
.{
Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
. {* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. *}
. char *name;
The "flavour" of a back end is a general indication about the contents
of a file.
.
. {* The "flavour" of a back end is a general indication about
. the contents of a file. *}
. enum bfd_flavour flavour;
The order of bytes within the data area of a file.
.
. {* The order of bytes within the data area of a file. *}
. enum bfd_endian byteorder;
The order of bytes within the header parts of a file.
.
. {* The order of bytes within the header parts of a file. *}
. enum bfd_endian header_byteorder;
A mask of all the flags which an executable may have set -
from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>.
.
. {* A mask of all the flags which an executable may have set -
. from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. *}
. flagword object_flags;
A mask of all the flags which a section may have set - from
the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>.
.
. {* A mask of all the flags which a section may have set - from
. the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. *}
. flagword section_flags;
The character normally found at the front of a symbol
(if any), perhaps `_'.
.
. {* The character normally found at the front of a symbol.
. (if any), perhaps `_'. *}
. char symbol_leading_char;
The pad character for file names within an archive header.
.
. {* The pad character for file names within an archive header. *}
. char ar_pad_char;
The maximum number of characters in an archive header.
.
. {* The maximum number of characters in an archive header. *}
. unsigned short ar_max_namelen;
Entries for byte swapping for data. These are different from the other
entry points, since they don't take a BFD asthe first argument.
Certain other handlers could do the same.
.
. {* Entries for byte swapping for data. These are different from the
. other entry points, since they don't take a BFD asthe first argument.
. Certain other handlers could do the same. *}
. bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
@ -218,9 +208,8 @@ Certain other handlers could do the same.
. bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
Byte swapping for the headers
.
. {* Byte swapping for the headers. *}
. bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
@ -230,25 +219,21 @@ Byte swapping for the headers
. bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
Format dependent routines: these are vectors of entry points
within the target vector structure, one for each format to check.
Check the format of a file being read. Return a <<bfd_target *>> or zero.
.
. {* Format dependent routines: these are vectors of entry points
. within the target vector structure, one for each format to check. *}
.
. {* Check the format of a file being read. Return a <<bfd_target *>> or zero. *}
. const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
Set the format of a file being written.
.
. {* Set the format of a file being written. *}
. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
Write cached information into a file being written, at <<bfd_close>>.
.
. {* Write cached information into a file being written, at <<bfd_close>>. *}
. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
.
The general target vector. These vectors are initialized using the
BFD_JUMP_TABLE macros.
.
. {* Generic entry points. *}
Do not "beautify" the CONCAT* macro args. Traditional C will not
@ -295,10 +280,10 @@ the tokens.
. to another. *}
. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
. bfd *, asymbol *));
. {* Called to set private backend flags *}
. {* Called to set private backend flags. *}
. boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
.
. {* Called to print private BFD data *}
. {* Called to print private BFD data. *}
. boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
.
. {* Core file entry points. *}
@ -470,13 +455,12 @@ to find an alternative output format that is suitable.
. const struct bfd_target * alternative_target;
.
Data for use by back-end routines, which isn't generic enough to belong
in this structure.
. {* Data for use by back-end routines, which isn't
. generic enough to belong in this structure. *}
. PTR backend_data;
.
.} bfd_target;
.
*/
/* All known xvecs (even those that don't compile on all systems).
@ -541,6 +525,7 @@ extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
extern const bfd_target bfd_elf32_openrisc_vec;
extern const bfd_target bfd_elf32_or32_big_vec;
extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
@ -637,6 +622,7 @@ extern const bfd_target nlm32_i386_vec;
extern const bfd_target nlm32_powerpc_vec;
extern const bfd_target nlm32_sparc_vec;
extern const bfd_target oasys_vec;
extern const bfd_target or32coff_big_vec;
extern const bfd_target pc532machaout_vec;
extern const bfd_target pc532netbsd_vec;
extern const bfd_target pdp11_aout_vec;
@ -696,6 +682,10 @@ extern const bfd_target ptrace_core_vec;
extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
extern const bfd_target bfd_elf64_sh64_vec;
extern const bfd_target bfd_elf64_sh64l_vec;
static const bfd_target * const _bfd_target_vector[] = {
#ifdef SELECT_VECS
@ -786,6 +776,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
&bfd_elf32_openrisc_vec,
&bfd_elf32_or32_big_vec,
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
@ -919,6 +910,9 @@ static const bfd_target * const _bfd_target_vector[] = {
can be annoying target mis-matches. */
&oasys_vec,
#endif
/* Entry for the OpenRISC family. */
&or32coff_big_vec,
&pc532machaout_vec,
&pc532netbsd_vec,
&pdp11_aout_vec,

View File

@ -211,7 +211,7 @@ trad_unix_core_file_p (abfd)
0 is at the place pointed to by u_ar0 (by setting the vma of the start
of the section to -u_ar0). GDB uses this info to locate the regs,
using minor trickery to get around the offset-or-absolute-addr problem. */
core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
core_regsec (abfd)->vma = - (bfd_vma) (unsigned long) u.u_ar0;
core_datasec (abfd)->filepos = NBPG * UPAGES;
core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize

View File

@ -1 +1 @@
#define BFD_VERSION_DATE 20020127
#define BFD_VERSION_DATE 20020209

View File

@ -1,3 +1,79 @@
2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
* NEWS: Mention support for MMIX.
2002-02-13 Matt Fredette <fredette@netbsd.org>
* readelf.c (get_machine_flags): Recognize EF_M68000.
2002-02-12 Alexandre Oliva <aoliva@redhat.com>
* MAINTAINERS: Added self as MN10300 co-maintainer.
2002-02-12 Alan Modra <amodra@bigpond.net.au>
* readelf.c (get_ppc64_dynamic_type): Handle DT_PPC64_OPD and
DT_PPC64_OPDSZ.
2002-02-11 Daniel Jacobowitz <drow@mvista.com>
* MAINTAINERS: List myself as branch maintainer.
2002-02-11 Alan Modra <amodra@bigpond.net.au>
* objcopy.c (MKDIR): Define.
(copy_archive): Make name_list.name const. Use MKDIR.
Handle duplicate files in archives by making more temp dirs.
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* nlmconv.c: Back out localtime PARAMS change.
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* coffdump.c: Include "getopt.h" after "bucomm.h"
so that macros are defined correctly.
* nlmconv.c: Add PARAMS ((const time_t *)) to localtime
prototype. Prototype main.
* nlmheader.y: Add PARAMS ((int)) to strerror prototype.
2002-02-06 Alexandre Oliva <aoliva@redhat.com>
* MAINTAINERS: Added self as SH co-maintainer.
2002-02-05 Nick Clifton <nickc@redhat.com>
* po/tr.po: Updated translation.
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am"
* Makefile.in: Regenerate.
2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* nm.c (print_value): Mark abfd unused.
2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* unwind-ia64.c (unw_decoder): Change second argument
to unsigned int, to match function prototypes.
2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* objdump.c: Include "getopt.h" after "bucomm.h" so that
__GNU_LIBRARY__ will be defined.
* size.c: Likewise.
2002-01-27 Daniel Jacobowitz <drow@mvista.com>
* configure: Regenerated.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* doc/Makefile.am (install): Depend on install-info.
* doc/Makefile.in: Regenerate.
2002-01-25 Jason R. Thorpe <thorpej@wasabisystems.com>
* objcopy.c (strip_usage): Document -d as an alias

View File

@ -67,6 +67,7 @@ responsibility among the other maintainers.
ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com>
M68HC11 M68HC12 Stephane Carrez <Stephane.Carrez@worldnet.fr>
MN10300 Eric Christopher <echristo@redhat.com>
MN10300 Alexandre Oliva <aoliva@redhat.com>
MIPS Eric Christopher <echristo@redhat.com>
M88k Ben Elliston <bje@redhat.com>
MMIX Hans-Peter Nilsson <hp@bitrange.com>
@ -75,6 +76,7 @@ responsibility among the other maintainers.
s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
SH J<>örn Rennecke <amylaar@onetel.net.uk>
SH Hans-Peter Nilsson <hp@bitrange.com>
SH Alexandre Oliva <aoliva@redhat.com>
SPARC Jakub Jelinek <jakub@redhat.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
z8k Christian Groessler <cpg@aladdin.de>
@ -126,4 +128,4 @@ burden of maintaining the branch in sync with the mainline becomes too
great). If you are uncertain as to whether a patch is appropriate for
the branch, ask the branch maintainer. This is:
Philip Blundell <philb@gnu.org>
Daniel Jacobowitz <dan@debian.org>

View File

@ -415,10 +415,10 @@ objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
$(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
$(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
@ -433,8 +433,8 @@ rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
budbg.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h
srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c
@ -481,18 +481,18 @@ winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.h
readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/arm.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/d10v.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h \
$(INCDIR)/elf/h8.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/fr30.h \
$(INCDIR)/elf/mcore.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/i960.h \
$(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \
$(INCDIR)/elf/cris.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/x86-64.h \
$(INCDIR)/elf/s390.h $(INCDIR)/elf/xstormy16.h bucomm.h \
config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \
$(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/h8.h \
$(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h \
$(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \
$(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/v850.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
unwind-ia64.h
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -667,7 +667,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
test "$$subdir" != "." || dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -1134,10 +1134,10 @@ objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
$(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
$(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
@ -1152,8 +1152,8 @@ rddbg.o: rddbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
budbg.h
size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
$(INCDIR)/getopt.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h
srconv.o: srconv.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sysroff.c
@ -1200,18 +1200,18 @@ winduni.o: winduni.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.h
readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/arm.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/d10v.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h \
$(INCDIR)/elf/h8.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/fr30.h \
$(INCDIR)/elf/mcore.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/i960.h \
$(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \
$(INCDIR)/elf/cris.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/x86-64.h \
$(INCDIR)/elf/s390.h $(INCDIR)/elf/xstormy16.h bucomm.h \
config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/alpha.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \
$(INCDIR)/elf/avr.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/d10v.h \
$(INCDIR)/elf/d30v.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/h8.h \
$(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i860.h \
$(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mips.h \
$(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/v850.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
unwind-ia64.h
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \

View File

@ -1,5 +1,7 @@
-*- text -*-
* Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
* size: Add --totals to display summary of sizes (Berkeley format only).
* readelf: Add --wide option to not break section header or segment listing

View File

@ -24,11 +24,11 @@
it out so we can test the grokker. */
#include <bfd.h>
#include <getopt.h>
#include <libiberty.h>
#include "coffgrok.h"
#include "bucomm.h"
#include "getopt.h"
static int atnl;

File diff suppressed because it is too large Load Diff

View File

@ -155,6 +155,10 @@ $(DEMANGLER_NAME).1: cxxfilt.man Makefile
-e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
> $(DEMANGLER_NAME).1
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# Maintenance
# We need it for the taz target in ../../Makefile.in.

View File

@ -547,6 +547,10 @@ $(DEMANGLER_NAME).1: cxxfilt.man Makefile
-e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
> $(DEMANGLER_NAME).1
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# Maintenance
# We need it for the taz target in ../../Makefile.in.

View File

@ -1,6 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001
2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@ -1268,6 +1268,13 @@ copy_object (ibfd, obfd)
}
}
#undef MKDIR
#if defined (_WIN32) && !defined (__CYGWIN32__)
#define MKDIR(DIR, MODE) mkdir (DIR)
#else
#define MKDIR(DIR, MODE) mkdir (DIR, MODE)
#endif
/* Read each archive element in turn from IBFD, copy the
contents to temp file, and keep the temp file handle. */
@ -1280,7 +1287,7 @@ copy_archive (ibfd, obfd, output_target)
struct name_list
{
struct name_list *next;
char *name;
const char *name;
bfd *obfd;
} *list, *l;
bfd **ptr = &obfd->archive_head;
@ -1288,11 +1295,7 @@ copy_archive (ibfd, obfd, output_target)
char *dir = make_tempname (bfd_get_filename (obfd));
/* Make a temp directory to hold the contents. */
#if defined (_WIN32) && !defined (__CYGWIN32__)
if (mkdir (dir) != 0)
#else
if (mkdir (dir, 0700) != 0)
#endif
if (MKDIR (dir, 0700) != 0)
{
fatal (_("cannot mkdir %s for archive copying (error: %s)"),
dir, strerror (errno));
@ -1308,14 +1311,35 @@ copy_archive (ibfd, obfd, output_target)
while (!status && this_element != (bfd *) NULL)
{
/* Create an output file for this member. */
char *output_name = concat (dir, "/", bfd_get_filename (this_element),
(char *) NULL);
bfd *output_bfd = bfd_openw (output_name, output_target);
char *output_name;
bfd *output_bfd;
bfd *last_element;
struct stat buf;
int stat_status = 0;
/* Create an output file for this member. */
output_name = concat (dir, "/",
bfd_get_filename (this_element), (char *) 0);
/* If the file already exists, make another temp dir. */
if (stat (output_name, &buf) >= 0)
{
output_name = make_tempname (output_name);
if (MKDIR (output_name, 0700) != 0)
{
fatal (_("cannot mkdir %s for archive copying (error: %s)"),
output_name, strerror (errno));
}
l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
l->obfd = NULL;
list = l;
output_name = concat (output_name, "/",
bfd_get_filename (this_element), (char *) 0);
}
output_bfd = bfd_openw (output_name, output_target);
if (preserve_dates)
{
stat_status = bfd_stat_arch_elt (this_element, &buf);
@ -1370,10 +1394,15 @@ copy_archive (ibfd, obfd, output_target)
/* Delete all the files that we opened. */
for (l = list; l != NULL; l = l->next)
{
if (l->obfd == NULL)
rmdir (l->name);
else
{
bfd_close (l->obfd);
unlink (l->name);
}
}
rmdir (dir);
}

View File

@ -20,9 +20,9 @@ along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "getopt.h"
#include "progress.h"
#include "bucomm.h"
#include "getopt.h"
#include "safe-ctype.h"
#include "dis-asm.h"
#include "libiberty.h"

View File

@ -49,34 +49,35 @@
#define RELOC_MACROS_GEN_FUNC
#include "elf/i386.h"
#include "elf/v850.h"
#include "elf/ppc.h"
#include "elf/mips.h"
#include "elf/alpha.h"
#include "elf/arc.h"
#include "elf/arm.h"
#include "elf/m68k.h"
#include "elf/sparc.h"
#include "elf/m32r.h"
#include "elf/avr.h"
#include "elf/cris.h"
#include "elf/d10v.h"
#include "elf/d30v.h"
#include "elf/sh.h"
#include "elf/fr30.h"
#include "elf/h8.h"
#include "elf/hppa.h"
#include "elf/i386.h"
#include "elf/i860.h"
#include "elf/i960.h"
#include "elf/ia64.h"
#include "elf/m32r.h"
#include "elf/m68k.h"
#include "elf/mcore.h"
#include "elf/mips.h"
#include "elf/mmix.h"
#include "elf/mn10200.h"
#include "elf/mn10300.h"
#include "elf/hppa.h"
#include "elf/h8.h"
#include "elf/arc.h"
#include "elf/fr30.h"
#include "elf/mcore.h"
#include "elf/mmix.h"
#include "elf/i960.h"
#include "elf/or32.h"
#include "elf/pj.h"
#include "elf/avr.h"
#include "elf/ia64.h"
#include "elf/cris.h"
#include "elf/i860.h"
#include "elf/x86-64.h"
#include "elf/ppc.h"
#include "elf/s390.h"
#include "elf/sh.h"
#include "elf/sparc.h"
#include "elf/v850.h"
#include "elf/x86-64.h"
#include "elf/xstormy16.h"
#include "bucomm.h"
@ -596,6 +597,8 @@ guess_is_rela (e_machine)
case EM_386:
case EM_486:
case EM_960:
case EM_OPENRISC:
case EM_OR32:
case EM_M32R:
case EM_CYGNUS_M32R:
case EM_D10V:
@ -1027,6 +1030,11 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_h8_reloc_type (type);
break;
case EM_OPENRISC:
case EM_OR32:
rtype = elf_or32_reloc_type (type);
break;
case EM_PJ:
case EM_PJ_OLD:
rtype = elf_pj_reloc_type (type);
@ -1185,6 +1193,8 @@ get_ppc64_dynamic_type (type)
switch (type)
{
case DT_PPC64_GLINK: return "PPC64_GLINK";
case DT_PPC64_OPD: return "PPC64_OPD";
case DT_PPC64_OPDSZ: return "PPC64_OPDSZ";
default:
return NULL;
}
@ -1458,6 +1468,8 @@ get_machine_name (e_machine)
case EM_S390_OLD:
case EM_S390: return "IBM S/390";
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
@ -1629,6 +1641,8 @@ get_machine_flags (e_flags, e_machine)
case EM_68K:
if (e_flags & EF_CPU32)
strcat (buf, ", cpu32");
if (e_flags & EF_M68000)
strcat (buf, ", m68000");
break;
case EM_PPC:

View File

@ -29,9 +29,9 @@
out of luck; there's no --compatibility or --pedantic option. */
#include "bfd.h"
#include "getopt.h"
#include "bucomm.h"
#include "libiberty.h"
#include "getopt.h"
#ifndef BSD_DEFAULT
#define BSD_DEFAULT 1

View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2002-01-10'
timestamp='2002-01-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -837,7 +837,9 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_targets=`cd /; ld --help 2>&1 \
# Export LANG=C to prevent ld from outputting information in other
# languages.
ld_supported_targets=`LANG=C; export LANG; cd /; ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
@ -874,8 +876,12 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c
@ -1061,8 +1067,10 @@ EOF
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_MACHINE=pc
fi
echo i386-${UNAME_MACHINE}-nto-qnx
else
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
fi
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx

View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
timestamp='2002-01-02'
timestamp='2002-02-01'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -242,11 +242,11 @@ case $basic_machine in
| mipsisa32 \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
@ -305,7 +305,7 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
@ -714,6 +714,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@ -1006,6 +1010,9 @@ case $basic_machine in
sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@ -1259,6 +1266,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;

View File

@ -3,7 +3,7 @@
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
# Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@ -804,57 +804,46 @@ fi
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
# ./config.status by hand. Do the same for various Makefile fragments
# so that they can specify these vars.
for file in Mafefile ${package_makefile_rules_frag} \
${site:+config/ms-${site}} ${host_makefile_frag} \
${target_makefile_frag} ${package_makefile_frag}
do
if ! test -r $file; then
file=${srcdir}/${file}
if ! test -r $file; then continue; fi
fi
if [ -z "${CC}" ]; then
# ./config.status by hand.
if [ -z "${CC}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CC=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
fi
if [ -z "${CFLAGS}" ]; then
if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CFLAGS=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
fi
if [ -z "${CXX}" ]; then
if [ -z "${CXX}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CXX=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
fi
if [ -z "${CXXFLAGS}" ]; then
if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CXXFLAGS=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
done
fi
# Generate a default definition for YACC. This is used if the makefile can't
# locate bison or byacc in objdir.

View File

@ -904,6 +904,9 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
sh64-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
sparc-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"

View File

@ -1,3 +1,726 @@
2002-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (md_parse_option): Complain about invalid -mabi
option input.
2002-02-18 Daniel Jacobowitz <drow@mvista.com>
* config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh.
2002-02-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
* config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types
that implicitly use LR and RR selectors.
2002-02-16 Nick Clifton <nickc@cambridge.redhat.com>
* doc/as.texinfo (Machine Dependencies): Fix typo: MMIX used
instead of CRIS.
2002-02-15 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (md_estimate_size_before_relax): Really
make sure we treat weak like extern only for ELF. (Fixes
patch from 2001-07-25.)
2002-02-15 Ben Elliston <bje@redhat.com>
* doc/as.texinfo: Add duplicate directory entry so that "info gas"
works as expected.
Fri Feb 15 15:18:51 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (md_assemble): Support 32bit address prefix.
(i386_displacement): Likewise.
(i386_index_check): Accept 32bit addressing in 64bit mode.
2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
* NEWS: Mention support for MMIX.
2002-02-13 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (mips_need_elf_addend_fixup): Restructure into
a sequence of indpendent 'if' statements for easier debugging
and future modification.
2002-02-13 Matt Fredette <fredette@netbsd.org>
* config/tc-m68k.c (md_show_usage): No longer display a
hard-coded "68020" for the default CPU, instead display the
canonical name of the true, configured default CPU.
(m68k_elf_final_processing): Mark objects for sub-68020
CPUs with the new EF_M68000 flag.
2002-02-13 Andreas Schwab <schwab@suse.de>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
pc-relative relocations to merge sections in 64-bit mode.
2002-02-12 Alexandre Oliva <aoliva@redhat.com>
* config/tc-mn10300.c (other_registers): Added `epsw'. Mark `pc'
and `epsw' as available on AM33 and above only.
(other_register_name): Add logic to handle machine type encoded in
reg_number.
2002-02-11 Tom Rix <trix@redhat.com>
* config/tc-ppc.c (md_apply_fix3): Check for insert fop invalid for
xcoff64.
2002-02-11 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sparc.c (U0x80000000, U0xffffffff): New constants.
Use all over.
2002-02-11 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c (dot): Removed unused function.
2002-02-10 Richard Henderson <rth@redhat.com>
* doc/c-alpha.texi: New file.
* doc/Makefile.am (CPU_DOCS): Add it.
* doc/all.texi, doc/as.texinfo: Add hooks for Alpha.
2002-02-09 Richard Henderson <rth@redhat.com>
* config/tc-alpha.c (O_samegp): New.
(USER_RELOC_P): Include it.
(alpha_reloc_op_tag, debug_exp, find_macro_match): Add it.
(md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP.
(alpha_force_relocation, alpha_fix_adjustable): Likewise.
(alpha_validate_fix): New.
* config/tc-alpha.h (TC_VALIDATE_FIX): New.
2002-02-09 Hans-Peter Nilsson <hp@axis.com>
* doc/c-cris.texi: New.
* doc/all.texi: @set CRIS.
* doc/as.texinfo: Ditto. Add CRIS gas manpage option overview.
Include c-cris.texi.
* doc/Makefile.am (CPU_DOCS): Add c-cris.texi
* doc/Makefile.in: Regenerate.
2002-02-08 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (IS_SEXT_32BIT_NUM): New macro to
determine if a number is a sign-extended 32-bit number.
(load_register): Use IS_SEXT_32BIT_NUM.
(macro): Check if load/store macro handling is using a
constant 32-bit address on 64-bit address systems, and if
so optimize the generation of that address.
2002-02-08 Richard Henderson <rth@redhat.com>
* config/tc-alpha.c (alpha_force_relocation): Don't assert that
we've eliminated all foreign relocation types yet.
(alpha_fix_adjustable): Likewise.
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
Contribute sh64-elf.
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
Stephen Clarke <Stephen.Clarke@st.com>
* doc/c-sh64.texi: Fix citation of SH64 architecture manual.
2002-01-31 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c (md_relax_table): Added default sizes for
non-PC-relative UNDEF_MOVI, and relaxation sequences for
MOVI_16, MOVI_32 and MOVI_48.
* config/tc-sh64.c (shmedia_md_apply_fix3): Fix warning.
(shmedia_md_convert_frag): Handle non-PC-relative UNDEF_MOVI
and MOVI_16.
(shmedia_md_estimate_size_before_relax): Remove redundant
blocks. Set fragP->fr_var even if relaxation type unchanged.
Retain UNDEF_MOVI until expression decays to number.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh64.c (shmedia_init_reloc): Handle new SHmedia PIC
relocation types. Take fixP->fx_addnumber into account too.
(shmedia_md_apply_fix): Likewise.
(shmedia_md_convert_frag): Likewise.
(shmedia_build_Mytes): Likewise.
(sh64_consume_datalabel): Complain about nested datalabel.
Support PIC relocs. Call sh_parse_name.
* config/tc-sh64.h (TC_RELOC_RTSYM_LOC_FIXUP): Extend definition
in tc-sh.h to SHmedia reloc types.
* config/tc-sh.c (SH64PCRELPLT, MOVI_PLT, MOVI_GOTOFF,
MOVI_GOTPC): New relaxation constants.
(md_relax_table): Introduce relaxation directives for PIC-related
constants.
(sh_PIC_related_p): Handle datalabel.
(sh_check_fixup): Choose SH5 PIC relocations.
(sh_cons_fix_new): Added BDF_RELOC_64.
(md_apply_fix3, sh_parse_name): Handle GOTPLT.
2002-01-18 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh64.c (sh64_max_mem_for_rs_align_code): If the
current ISA is SHmedia, get 7 bytes.
2001-11-28 Nick Clifton <nickc@cambridge.redhat.com>
* config/tc-sh.c (md_apply_fix3): Treat shmedia_md_apply_fix3 as a
void function.
* config/tc-sh64.c (shmedia_apply_fix): Rename to
shmedia_apply_fix3 and make void.
2001-05-17 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh64.c (s_sh64_abi): Remove unused arguments passed to
as_bad.
2001-04-12 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh64.h (md_parse_name): Take &c as argument.
2001-03-14 DJ Delorie <dj@redhat.com>
* doc/Makefile.am (CPU_DOCS): Added c-sh64.texi
* doc/Makefile.in(CPU_DOCS): Ditto.
* doc/c-sh64.texi: New file.
* doc/as.texinfo: Add SH64 support.
2001-03-13 DJ Delorie <dj@redhat.com>
* config/tc-sh64.c (shmedia_get_operands): Rename A_RESV_Fx to
A_REUSE_PREV so that its purpose is more obvious.
(shmedia_build_Mytes): Ditto.
2001-03-07 DJ Delorie <dj@redhat.com>
* config/tc-sh64.c (sh64_vtable_entry): New, strip datalabels
before processing.
(sh64_vtable_inherit): Ditto.
(strip_datalabels): New, strip "datalabel" from given line.
* config/tc-sh.c (md_pseudo_table): Add sh64-specific vtable
pseudos.
2001-03-06 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Move dwarf2_emit_insn
call ...
(shmedia_build_Mytes): ... to here.
2001-03-06 DJ Delorie <dj@redhat.com>
* config/tc-sh.c: Remove sh64-specific uaquad now that there
is a generic one.
2001-01-21 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.h (DWARF2_LINE_MIN_INSN_LENGTH): Override.
* config/tc-sh64.c (shmedia_md_assemble): Offset recorded insn
address by one in call to dwarf2_emit_insn.
2001-01-13 Hans-Peter Nilsson <hpn@cygnus.com>
Implement ".abi" pseudo and correct .cranges descriptors. Correct
alignment handling broken by imported changes.
* config/tc-sh64.h (HANDLE_ALIGN): Override definition in tc-sh.h.
(sh64_handle_align): Declare.
(MAX_MEM_FOR_RS_ALIGN_CODE): Override definition in tc-sh.h.
(sh64_max_mem_for_rs_align_code): Declare.
(enum sh64_isa_values): Moved here from tc-sh64.c.
(md_do_align): Define.
(sh64_do_align): Declare.
(struct sh64_tc_frag_data): New.
(TC_FRAG_TYPE): Change to struct sh64_tc_frag_data. Users
changed.
(TC_FRAG_INIT): Change to set new datatype.
(struct sh64_segment_info_type): Rename member
last_flushed_location to last_contents_mark. All users changed.
(md_elf_section_change_hook, TC_CONS_FIX_NEW): Do not define.
(shmedia_elf_new_section, sh64_tc_cons_fix_new): Do not prototype.
* config/tc-sh.c (md_pseudo_table): Add ".abi".
(sh_elf_cons) [HAVE_SH64]: Call sh64_update_contents_mark instead
of unsetting seen_insn.
(md_assemble) [HAVE_SH64] <before new SHcompact sequence>: Also
call sh64_update_contents_mark.
(sh_handle_align): Remove HAVE_SH64-conditioned code.
* config/tc-sh64.c (sh64_isa_mode): Correct type from boolean to
enum sh64_isa_values.
(sh64_set_contents_type): Drop segT parameter. All callers changed.
(emitting_crange): Boolean guard moved to file scope from function
scope in sh64_set_contents_type.
(s_sh64_abi): New.
(sh64_update_contents_mark): New; most split out from
sh64_flush_pending_output.
(shmedia_md_end): Call sh64_update_contents_mark. Set
sh64_isa_mode to sh64_isa_sh5_guard unless sh64_isa_unspecified.
(sh64_do_align): New function.
(sh64_max_mem_for_rs_align_code): New function.
(sh64_handle_align): Rename from shmedia_do_align. Make
non-static. Add head comment. Emit zero bytes for n bytes modulo
four. Change return-type to void.
(shmedia_elf_new_section): Remove.
(shmedia_md_assemble): Call sh64_update_contents_mark.
(s_sh64_mode): Ditto. Do not call md_flush_pending_output. Make
new frag. Call sh64_update_contents_mark after making the new
frag.
(sh64_flush_pending_output): Just call sh64_update_contents_mark
and sh_flush_pending_output.
(sh64_flag_output): Also call md_flush_pending_output, but add
condition on not emitting_crange.
(sh64_tc_cons_fix_new): Remove.
2001-01-12 Nick Clifton <nickc@redhat.com>
* config/tc-sh64.c (shmedia_do_align): Fix to work with new
alignment handling scheme imported from sourceware.
2001-01-12 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.h (TARGET_FORMAT): Define.
(sh64_target_format): Prototype.
* config/tc-sh64.c (sh64_target_mach): New function.
2001-01-07 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_end): When equating a symbol, use
zero_address_frag instead of copying the frag of the symbol.
(shmedia_frob_file_before_adjust): Ditto.
(shmedia_md_apply_fix) <case BFD_RELOC_SH_IMM_MEDLOW16>: Cast mask
to valueT to remove signedness.
(shmedia_md_convert_frag): Add parameter final. Rename parameter
headers to output_bfd. Do not evaluate symbols if final is false;
do emit fixups.
(shmedia_md_estimate_size_before_relax) <case C (MOVI_IMM_32,
UNDEF_MOVI) et al>: If symbol cannot be modified to be PC-relative
to the current frag, call shmedia_md_convert_frag to emit fixups
and make frag_wane neutralize the frag. Update comments.
* config/tc-sh.c (md_convert_frag): Change caller of
shmedia_md_convert_frag.
2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.h: Tweak comments and correct formatting.
* config/tc-sh64.c: Ditto.
(shmedia_md_convert_frag) <PT/PTA/PTB 32, 48 and 64 bit
expansion, MOVI pcrel expansion>: Fix thinko calculating offset
for the no-relocation case.
(shmedia_check_limits): Fix range check being off-by-one for PTA.
* config/tc-sh.c: Ditto. Add proper comments to #ifdef/#ifndef
wrappers.
(SH64PCREL16_F): Increment for proper max-PTA handling. Update
comment.
(SH64PCREL16_M, MOVI_16_M): Correct range thinko.
(SH64PCREL48_M, MOVI_48_M): Similar; don't count in length of
expansion.
(SH64PCREL32_M, MOVI_32_M): Ditto; handle overflowing expression.
Correct comment.
2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_apply_fix) <second switch, case
BFD_RELOC_SH_PT_16>: Set lowest bit in field to be relocated to 1.
(shmedia_md_convert_frag) <case C (SH64PCREL16_32, SH64PCREL16) et
al>: Set lowest bit of field to relocate to 1 and rest to empty,
if reloc is emitted.
2000-12-31 Hans-Peter Nilsson <hpn@cygnus.com>
New options plus bugfixes.
* config/tc-sh.c (md_longopts): New options "-no-expand" and
"-expand-pt32".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
* config/tc-sh64.c (SHMEDIA_BFD_RELOC_PT): New macro.
(sh64_expand, sh64_pt32): New variables.
(shmedia_init_reloc): Handle BFD_RELOC_SH_PT_16.
(shmedia_md_apply_fix): Hold original fixP->fx_r_type in
orig_fx_r_type. Change SHMEDIA_BFD_RELOC_PT into
BFD_RELOC_SH_PT_16. Handle BFD_RELOC_SH_PT_16 as pc-relative.
<resolved previously-pc-relative relocs>: Handle
SHMEDIA_BFD_RELOC_PT and BFD_RELOC_SH_PT_16.
(shmedia_md_convert_frag) <case C (SH64PCREL16PT_64, SH64PCREL16),
case C (SH64PCREL16PT_32, SH64PCREL16)>: Modify to PTB if operand
points to SHcompact code.
<case C (SH64PCREL16_32, SH64PCREL16), case C (SH64PCREL16_64,
SH64PCREL16)>: Check that ISA of what operand points at and
PTA/PTB matches, or emit error.
(shmedia_check_limits): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT.
(shmedia_immediate_op): If pcrel, emit fixup also for constant
operand.
(shmedia_build_Mytes) <case A_IMMS16>: Also check sh64_expand in
condition for MOVI expansion.
<case A_PCIMMS16BY4>: Handle expansion to 32 bits only, if
sh64_pt32. Emit only a BFD_RELOC_SH_PT_16 fixup if not
sh64_expand.
<case A_PCIMMS16BY4_PT>: Likewise, but emit a SHMEDIA_BFD_RELOC_PT
fixup.
(sh64_target_format): Error-check setting of sh64_pt32 and
sh64_expand. Fix typo in check for sh64_shcompact_const_crange.
(shmedia_md_pcrel_from_section): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT as coming from SHmedia code.
2000-12-31 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c: Improve comments.
(shmedia_md_convert_frag): Remove inactive is_pt_variant code. Do
not say the linker will check correctness of PTA/PTB expansion.
(shmedia_md_end): Make non-static.
* config/tc-sh64.h (md_end): Define to shmedia_md_end. Add
prototype.
* config/tc-sh.c (sh_finalize): Remove.
* config/tc-sh.h (md_end): Do not define.
Remove prototype for sh_finalize.
2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_frob_section_type): Use a struct
sh64_section_data container when storing section type in tdata
field in elf_section_data.
* config/tc-sh.c (sh_elf_final_processing): Change from EF_SH64 to
EF_SH5.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
2000-12-22 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Don't protect
dwarf2_emit_insn call with test on debug_type.
2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (sh64_set_contents_type): Make contents-type
CRT_SH5_ISA32 sticky for 64-bit.
2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
Generate .crange sections when switching ISA mode or emitting
constants in same section as code.
* config/tc-sh64.c: Reformat structure definitions.
(sh64_end_of_assembly, sh64_mix, sh64_shcompact_const_crange): New
variables.
(sh64_set_contents_type): Rename from sh64_init_section. Rewrite
to emit a .cranges descriptor when contents type changes. Only
emit error if changing contents type and -no-mix is in effect.
(sh64_emit_crange, sh64_flush_last_crange, sh64_flag_output,
sh64_flush_pending_output, sh64_tc_cons_fix_new): New functions.
(shmedia_md_end): Set sh64_end_of_assembly. Pass
sh64_flush_last_crange over sections.
When checking main symbol of datalabel symbol, check for
STO_SH5_ISA32, not ISA type of section in definition.
(shmedia_frob_file_before_adjust): Check main symbol for
STO_SH5_ISA32; don't check ISA type of section in definition.
(shmedia_frob_section_type): Adjust for .cranges; set section flag
to SHF_SH5_ISA32_MIXED or SHF_SH5_ISA32 according to whether
.cranges entries have been output.
(shmedia_elf_new_section): Just call md_flush_pending_output.
(shmedia_md_assemble): Do not emit a BFD_RELOC_SH_SHMEDIA_CODE
fix. Do not set tc_segment_info_data.in_code for section. Call
sh64_set_contents_type for SHmedia code.
(s_sh64_mode): Do not call sh64_init_section or set seen_insn to
false. Call md_flush_pending_output.
(sh64_target_format): Check that -no-mix and
-shcompact-const-crange are used in sane combination with other
options.
(shmedia_md_pcrel_from_section): Check type of fix for how to
adjust pc-relative.
(sh64_consume_datalabel): Check symbol for having STO_SH5_ISA32,
not ISA type of section in definition.
* config/tc-sh64.h (struct sh64_segment_info_type): Rewrite to
hold contents-type state.
(md_flush_pending_output): Redefine to sh64_flush_pending_output.
(sh64_flush_pending_output): Declare.
(TC_CONS_FIX_NEW): Define to sh64_tc_cons_fix_new.
(sh64_tc_cons_fix_new): Declare.
* config/tc-sh.c (sh_elf_cons) [HAVE_SH64]: Unset seen_insn and
call sh64_flag_output.
(md_assemble) [HAVE_SH64]: Do not emit BFD_RELOC_SH_CODE. Just
call sh64_set_contents_type to mark SHcompact code and set
seen_insn.
(md_longopts): New options "-no-mix" and
"-shcompact-const-crange".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
(md_number_to_chars) [HAVE_SH64]: Call sh64_flag_output.
2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c: Delete investigated and obsolete fixme:s.
(sh64_last_insn_frag): New.
(shmedia_md_convert_frag): Use tc_frag_data field of incoming frag
to get frag for insn opcode for generating fixups; do not assume it
is the same frag.
(shmedia_build_Mytes): Set sh64_last_insn_frag after growing frag
for new insn.
* config/tc-sh64.h (ELF_TC_SPECIAL_SECTIONS): Define for .cranges
section.
(TC_FRAG_TYPE): Define as fragS *.
(TC_FRAG_INIT): Define to set tc_frag_data to sh64_last_insn_frag.
(sh64_last_insn_frag): Declare.
(sh64_consume_datalabel): Fix typo; check for seginfo != NULL,
not == NULL before dereferencing.
2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
Get rid of BFD section flag and EF_SH64_ABI64.
* config/tc-sh64.c (shmedia_frob_section_type): Use
elf_section_data (sec)->tdata, not a specific BFD section flag, to
communicate the section as containing SHmedia code. Describe why.
* config/tc-sh.c (sh_elf_final_processing): Tweak comment. Set
EF_SH64 regardless of ABI.
* config/tc-sh64.c (shmedia_md_apply_fix): Decapitalize "invalid"
in error message. Handle resolved expressions for
BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4 and BFD_RELOC_64.
(shmedia_check_limits): Handle BFD_RELOC_64.
(sh64_adjust_symtab): Do not decrement the GAS symbol value for
a STO_SH5_ISA32 symbol, only the BFD value.
2000-12-11 Ben Elliston <bje@redhat.com>
* config/tc-sh64.c: Call dwarf2_emit_insn, not the defunct
dwarf2_generate_asm_lineno.
2000-12-11 Hans-Peter Nilsson <hpn@cygnus.com>
Handle PC-relative MOVI expansions with assembler relaxation.
Generate PC-relative relocs from 16-bit PC-relative expressions.
* config/tc-sh64.c (SHMEDIA_MD_PCREL_FROM_FIX): Break out from...
(shmedia_md_pcrel_from_section): ...here.
(shmedia_md_apply_fix): Handle fixups for 16-bit operands that has
turned completely resolved. Adjust relocation type for 16-bit
immediate operands that has turned PC-relative. Adjust back for
MD_PCREL_FROM_SECTION being applied twice.
(shmedia_md_convert_frag): Always emit reloc for expression with
global or weak symbol. Handle relaxation result for PC-relative
expressions.
(shmedia_md_estimate_size_before_relax): An expression with a weak
or global symbol can not be relaxed. Break out tests for
relaxable symbol into variable sym_relaxable.
<cases C (MOVI_IMM_64, UNDEF_MOVI) and C (MOVI_IMM_32,
UNDEF_MOVI)>: Break out any PC-relative expression and change
relaxation type.
(shmedia_build_Mytes): CSE &operands->operands[j] into variable
opjp.
<case A_IMMS16>: Fix typo for initial minor relaxation type of
MOVI expansion. If X_op_symbol of the immediate expression is
set, make an expression symbol for the argument to frag_var.
* config/tc-sh.c (MOVI_IMM_32_PCREL, MOVI_IMM_64_PCREL): New
relaxations.
(END): Adjust for new relaxations.
(md_relax_table): Add entries for new relaxations.
2000-12-07 Ben Elliston <bje@redhat.com>
* config/tc-sh64.c (shmedia_parse_reg): Initialize variable len.
2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_convert_frag): Correct all MOVI and
SHORI operand offsets in PT/PTA/PTB expansions.
2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
Implement DataLabel semantics.
* config/tc-sh.c (sh_frob_file) [HAVE_SH64]: Call
shmedia_frob_file_before_adjust.
* config/tc-sh64.c [! OBJ_ELF]: Emit #error.
(DATALABEL_SUFFIX): Define.
(shmedia_md_end) <before adjusting STO_SH5_ISA32 symbols>: Walk
symbol list to update "datalabel" symbols to their main symbol
counterparts.
(shmedia_frob_file_before_adjust): New.
(sh64_adjust_symtab): For remaining datalabel symbols, set to
undefined and set STT_DATALABEL.
(sh64_frob_label): Initialize TC symbol field.
(sh64_consume_datalabel): Actually implement semantics. New
parameter operandf, call it instead of expression.
(sh64_exclude_symbol): New.
* config/tc-sh64.h (md_parse_name): Pass on the function operand
to sh64_consume_datalabel.
(tc_symbol_new_hook): Define to tc_frob_symbol.
(TC_SYMFIELD_TYPE): Define to symbolS *.
(tc_frob_symbol): Define to call sh64_exclude_symbol.
2000-12-01 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_init_reloc): Tweak comment for default
case.
(shmedia_md_assemble): Call dwarf2_generate_asm_lineno if
generating dwarf2 debug information.
2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (sh64_target_format): Use elf64-sh64l and
elf64-sh64 for the 64-bit ABI.
* config/tc-sh.c (md_show_usage): Tweak usage output for -abi=*
option.
2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh.c: Remove conditionalizing on HAVE_SH64 for
case-insensitivity.
2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c: Tweak comments, formatting and error messages.
(enum sh64_abi_values): New type.
(enum sh64_isa_values): New type.
(sh64_isa_mode): Replace shmedia_mode. All referers changed.
(seen_shcompact_mode, seen_shmedia_mode): Delete.
(sh64_abi): Replace shmedia_64.
(shmedia_md_convert_frag) <C (MOVI_IMM_64, MOVI_64),
C (MOVI_IMM_32, MOVI_32)>: Correct register number handling.
(s_sh64_mode): Check validity for this target.
(sh64_target_format): Initialize defaults for ISA and ABI.
Fallback to old object format if no SH64 ISA or ABI has been
specified.
* config/tc-sh.c (md_parse_option): Check combinations for errors.
(sh_elf_final_processing): Change to have EF_SH64_ABI64 for 64-bit
ABI and EF_SH64 for 32-bit ABI, if SH64 options are specified.
* config/tc-sh64.h: Fix typo in comment.
2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_estimate_size_before_relax)
<PT fixups for absolute values>: Size will be longest, not
shortest.
(shmedia_md_convert_frag): Disable PTB-warning machinery. Correct
all MOVI and SHORI operand offsets in PT/PTA/PTB expansions.
* config/tc-sh.c (parse_reg) [HAVE_SH64]: Add local variables l0
and l1 to hold lowercase of two first characters. Change all
remaining TO_LOWER to tolower.
* config/tc-sh64.c (TO_LOWER): Delete.
(shmedia_find_cooked_opcode): Use tolower, not TO_LOWER.
(md_parse_name): Define.
(sh64_consume_datalabel): Declare.
(DOLLAR_DOT): Define.
* config/tc-sh64.c (shmedia_parse_exp): New.
(sh64_consume_datalabel): New; just ignoring datalabel semantics.
(shmedia_parse_reg): Remove const from src
parameter.
(shmedia_get_operands): Ditto for args parameter and ptr variable.
(shmedia_md_assemble): Ditto for op_end variable.
(shmedia_get_operand): Ditto for ptr parameter and src variable.
Use shmedia_parse_exp, not parse_exp.
* config/tc-sh64.c (shmedia_parse_reg): Add shmedia_arg_type
parameter. All callers changed.
(shmedia_get_operand): Add shmedia_arg_type parameter. All
callers changed.
(shmedia_parse_reg): Put first two character in local variables.
Use tolower, not TO_LOWER. If no register is found and argtype
indicates a control register, scan shmedia_creg_table
case-insensitive.
2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
* Makefile.am (CPU_TYPES): Add sh64.
(TARGET_CPU_CFILES): Add config/tc-sh64.c.
(TARGET_CPU_HFILES): Add config/tc-sh64.h.
Regenerate dependencies.
* Makefile.in: Regenerate.
* configure.in: Add support for sh64-*-elf*.
* configure: Regenerate.
* config/tc-sh64.h: New.
* config/tc-sh64.c: New.
* config/tc-sh.c (md_pseudo_table) [HAVE_SH64]: New pseudos
.mode, .isa and .uaquad.
[HAVE_SH64] (SH64PCREL16_32, SH64PCREL16_64, SH64PCREL16PT_32,
SH64PCREL16PT_64, MOVI_IMM_32, MOVI_IMM_64): Define.
[HAVE_SH64] (END): Define as 10.
[HAVE_SH64] (UNDEF_SH64PCREL, SH64PCREL16, SH64PCREL32,
SH64PCREL48, SH64PCREL64, UNDEF_MOVI, MOVI_16, MOVI_32, MOVI_48,
MOVI_64): Define.
[HAVE_SH64] (SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH,
SH64PCREL32_F, SH64PCREL32_M, SH64PCREL32_LENGTH, SH64PCREL48_F,
SH64PCREL48_M, SH64PCREL48_LENGTH, SH64PCREL64_LENGTH,
MOVI_16_LENGTH, MOVI_32_LENGTH, MOVI_48_LENGTH, MOVI_64_LENGTH):
Define.
(md_relax_table) [HAVE_SH64]: Provide relaxations for SHmedia.
(md_begin) [HAVE_SH64]: Call shmedia_md_begin.
(parse_reg) [HAVE_SH64]: Parse register names case-insensitive.
(md_assemble) [HAVE_SH64]: Call shmedia_md_assemble if assembling
SHmedia instructions. Handle state-change after switching to
SHcompact.
(md_longopts) [HAVE_SH64]: New options --isa=* and --abi=*.
(md_parse_option) [HAVE_SH64]: Parse new options.
(md_show_usage) [HAVE_SH64]: Show usage of new options.
(md_convert_frag) [HAVE_SH64] <default>: Call
shmedia_md_convert_frag instead of abort.
(sh_force_relocation) [HAVE_SH64]: Also force relocation for
BFD_RELOC_SH_SHMEDIA_CODE.
(sh_elf_final_processing) [HAVE_SH64]: Set flags identifying
SHcompact or SHmedia code.
(md_apply_fix) [HAVE_SH64] <default>: Return result from calling
shmedia_md_apply_fix instead of abort.
(md_estimate_size_before_relax) [HAVE_SH64] <default>: Return
result from calling shmedia_md_estimate_size_before_relax instead
of calling abort.
(sh_do_align) [HAVE_SH64]: If shmedia_mode, let shmedia_do_align
do the work.
(tc_gen_reloc) [HAVE_SH64]: For unrecognized relocs, call
shmedia_init_reloc and do nothing more if it returns non-zero.
(sh_finalize) [HAVE_SH64]: Call shmedia_md_end.
* po/POTFILES.in: Regenerate.
* po/gas.pot: Regenerate.
2002-02-06 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c (parse_at): Install the correct version of
2002-02-04's patch.
* config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
assume fixP->fx_subsy is non-NULL.
2002-02-04 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
A_DISP_PC_ABS, and adjust it by -4.
(get_specific): Accept A_DISP_PC_ABS where A_DISP_PC is
expected.
(build_Mytes): Mark PCRELIMM fix-ups as pc-relative only if
the operand type is not A_DISP_PC_ABS.
2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
* config/tc-mmix.c (tc_gen_reloc): Don't try and take the value of
common and weak symbols. Handle common and weak symbols as
undefined symbols with regards to GREG handling and merging.
(mmix_frob_file): Ditto.
2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
* configure.in (hppa-*-netbsd*): New target.
* configure: Regenerate.
* config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.
2002-02-02 Alan Modra <amodra@bigpond.net.au>
* config/tc-v850.c: Add missing prototypes amd use old-style
function definitions.
(AREA_ZDA, AREA_SDA, AREA_TDA): Delete.
(sdata_section tdata_section, zdata_section, sbss_section,
tbss_section, zbss_section, rosdata_section, rozdata_section,
scommon_section, tcommon_section, zcommon_section,
call_table_data_section, call_table_text_section): Delete.
(v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
v850_zbss, v850_bss, v850_rosdata, v850_rozdata,
v850_call_table_data, v850_call_table_text): Delete.
(struct v850_seg_entry): New.
(v850_seg_table): New.
(SDATA_SECTION TDATA_SECTION, ZDATA_SECTION, SBSS_SECTION,
TBSS_SECTION, ZBSS_SECTION, BSS_SECTION, ROSDATA_SECTION,
ROZDATA_SECTION, SCOMMON_SECTION, TCOMMON_SECTION, ZCOMMON_SECTION,
CALL_TABLE_DATA_SECTION, CALL_TABLE_TEXT_SECTION): Define.
(do_v850_seg): New.
(v850_seg): New.
(v850_comm): Use do_v850_seg and v850_seg_table. Simplify
recording of alignment.
(md_pseudo_table): Use v850_seg.
(md_begin): Don't init .call_table_data and .call_table_text here.
Set v850_seg_table bss entry.
2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
Support on-demand global register allocation by passing on
base-plus-offset relocs to the linker.
* config/tc-mmix.c: Tweak and fix typos in comments.
(allocate_undefined_gregs_in_linker): New variable.
(OPTION_LINKER_ALLOCATED_GREGS): New option macro.
(md_longopts): Add --linker-allocated-gregs.
(md_parse_option) <case 'x'>: Imply --linker-allocated-gregs.
<case OPTION_LINKER_ALLOCATED_GREGS>: New.
(md_show_usage): Update text for -x. Add text for
--linker-allocated-gregs.
(tc_gen_reloc): Derive default value for addend from val and
baddsy. Use addsec and bfd_is_abs_section in more places. Don't
emit error for BFD_RELOC_MMIX_BASE_PLUS_OFFSET without suitable
GREG if allocate_undefined_gregs_in_linker.
* doc/as.texinfo (Overview) <Target MMIX options>: Add
--linker-allocated-gregs.
* doc/c-mmix.texi (MMIX-Opts): Add blurb about
--linker-allocated-gregs. Mention that it's implied by -x.
(MMIX-Pseudos) <GREG>: Mention when and how a GREG can be omitted.
(MMIX-mmixal): Clarify dated comparison and location of MMIXware.
* config/tc-mmix.h (md_parse_name): Use ISUPPER, not isupper.
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am"
* Makefile.in: Regenerate.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* config/tc-or32.c: New file.
* config/tc-or32.h: New file.
* configure.in: Add support for or32 targets.
* configure: Regenerate.
* config/obj-coff.c: Add support for or32 targets.
* config/obj-coff.h: Add support for or32 targets.
* Makefile.am: Add support for or32 targets.
* Makefile.in: Regenerate.
* NEWS: Mention support for OpenRISC.
* doc/Makefile.in: Regenerate.
* po/POTFILES.in: Regenerate.
* po/gas.pot: Regenerate.
2002-01-30 Richard Sandiford <rsandifo@redhat.com>
* config/tc-sh.c (parse_reg): Fix end-of-word check for is, ix, iy
and mod.
2002-01-29 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (tc_gen_reloc): Arrange for
BFD_RELOC_PCREL_HI16_S relocations to be output relative to
their LO16 parts, even for ELF.
2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* config/tc-i386.c: Protect definitions of true and false
from redefinition.
2002-01-28 Jakub Jelinek <jakub@redhat.com>
* config/obj-elf.c (elf_frob_file_before_adjust): Remove symbols
made because of .weak, if they are neither defined nor used in any
way.
2002-01-27 Daniel Jacobowitz <drow@mvista.com>
* configure: Regenerated.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* doc/Makefile.am (install): Depend on install-info.
* doc/Makefile.in: Regenerate.
2002-01-26 Nick Clifton <nick@redhat.com>
* po/fr.po: Updated version

View File

@ -65,6 +65,7 @@ CPU_TYPES = \
mn10300 \
ns32k \
openrisc \
or32 \
pdp11 \
pj \
ppc \
@ -78,6 +79,7 @@ CPU_TYPES = \
vax \
w65 \
v850 \
sh64 \
xstormy16 \
z8k
@ -251,11 +253,13 @@ TARGET_CPU_CFILES = \
config/tc-mn10300.c \
config/tc-ns32k.c \
config/tc-openrisc.c \
config/tc-or32.c \
config/tc-pdp11.c \
config/tc-pj.c \
config/tc-ppc.c \
config/tc-s390.c \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
config/tc-tahoe.c \
config/tc-tic30.c \
@ -296,11 +300,13 @@ TARGET_CPU_HFILES = \
config/tc-mn10300.h \
config/tc-ns32k.h \
config/tc-openrisc.h \
config/tc-or32.h \
config/tc-pdp11.h \
config/tc-pj.h \
config/tc-ppc.h \
config/tc-s390.h \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
config/tc-tahoe.h \
config/tc-tic30.h \
@ -1262,6 +1268,16 @@ DEPTC_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
cgen.h
DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
$(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
$(INCDIR)/elf/reloc-macros.h
DEPTC_or32_elf = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
$(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(srcdir)/config/tc-or32.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h
DEPTC_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
@ -1714,6 +1730,15 @@ DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
$(INCDIR)/obstack.h subsegs.h
DEPOBJ_or32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
@ -1762,6 +1787,20 @@ DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
$(srcdir)/../opcodes/sh64-opc.h $(srcdir)/config/tc-sh.c \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
dwarf2dbg.h $(INCDIR)/symcat.h
DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h $(INCDIR)/elf/sh.h
DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h
DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
@ -2058,6 +2097,12 @@ DEP_openrisc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-openrisc.h \
DEP_openrisc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h
DEP_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_or32_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h
DEP_pdp11_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-pdp11.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_pdp11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pdp11.h \

View File

@ -176,6 +176,7 @@ CPU_TYPES = \
mn10300 \
ns32k \
openrisc \
or32 \
pdp11 \
pj \
ppc \
@ -189,6 +190,7 @@ CPU_TYPES = \
vax \
w65 \
v850 \
sh64 \
xstormy16 \
z8k
@ -368,11 +370,13 @@ TARGET_CPU_CFILES = \
config/tc-mn10300.c \
config/tc-ns32k.c \
config/tc-openrisc.c \
config/tc-or32.c \
config/tc-pdp11.c \
config/tc-pj.c \
config/tc-ppc.c \
config/tc-s390.c \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
config/tc-tahoe.c \
config/tc-tic30.c \
@ -414,11 +418,13 @@ TARGET_CPU_HFILES = \
config/tc-mn10300.h \
config/tc-ns32k.h \
config/tc-openrisc.h \
config/tc-or32.h \
config/tc-pdp11.h \
config/tc-pj.h \
config/tc-ppc.h \
config/tc-s390.h \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
config/tc-tahoe.h \
config/tc-tic30.h \
@ -1033,6 +1039,18 @@ DEPTC_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
cgen.h
DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
$(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
$(INCDIR)/elf/reloc-macros.h
DEPTC_or32_elf = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
$(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
$(srcdir)/config/tc-or32.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h
DEPTC_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
@ -1589,6 +1607,17 @@ DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
$(INCDIR)/obstack.h subsegs.h
DEPOBJ_or32_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
@ -1648,6 +1677,23 @@ DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
$(srcdir)/../opcodes/sh64-opc.h $(srcdir)/config/tc-sh.c \
subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
dwarf2dbg.h $(INCDIR)/symcat.h
DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h $(INCDIR)/elf/sh.h
DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h
DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
@ -2035,6 +2081,14 @@ DEP_openrisc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h
DEP_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
$(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_or32_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h
DEP_pdp11_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-pdp11.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
@ -2228,7 +2282,7 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES)
OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS)

View File

@ -1,4 +1,8 @@
-*- text -*-
Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
Support for the OpenRISC 32-bit embedded processor by OpenCores.
The ARM assembler now accepts -march=..., -mcpu=... and -mfpu=... for
specifying the target instruction set. The old method of specifying the
target processor has been deprecated, but is still accepted for

View File

@ -203,7 +203,7 @@ dnl AM_PROG_LEX
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
AC_DEFUN(AM_PROG_LEX,
[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
AC_CHECK_PROGS(LEX, flex lex, $missing_dir/missing flex)
AC_PROG_LEX
AC_DECL_YYTEXT])

View File

@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001
1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS.
@ -1889,7 +1889,7 @@ count_entries_in_chain (idx)
{
if (fixup_ptr->fx_done == 0 && TC_COUNT_RELOC (fixup_ptr))
{
#ifdef TC_A29K
#if defined(TC_A29K) || defined(TC_OR32)
if (fixup_ptr->fx_r_type == RELOC_CONSTH)
nrelocs += 2;
else
@ -2047,6 +2047,20 @@ do_relocs_for (abfd, h, file_cursor)
(void) bfd_coff_swap_reloc_out (abfd, &intr, ext_ptr);
ext_ptr++;
}
#endif
#if defined(TC_OR32)
/* The or32 has a special kludge for the high 16 bit
reloc. Two relocations are emited, R_IHIHALF,
and R_IHCONST. The second one doesn't contain a
symbol, but uses the value for offset. */
if (intr.r_type == R_IHIHALF)
{
/* Now emit the second bit. */
intr.r_type = R_IHCONST;
intr.r_symndx = fix_ptr->fx_addnumber;
(void) bfd_coff_swap_reloc_out (abfd, & intr, ext_ptr);
ext_ptr ++;
}
#endif
}
@ -2127,12 +2141,14 @@ fill_section (abfd, h, file_cursor)
COFF_NOLOAD_PROBLEM, and have only one test here. */
#ifndef TC_I386
#ifndef TC_A29K
#ifndef TC_OR32
#ifndef COFF_NOLOAD_PROBLEM
/* Apparently the SVR3 linker (and exec syscall) and UDI
mondfe progrem are confused by noload sections. */
s->s_flags |= STYP_NOLOAD;
#endif
#endif
#endif
#endif
}
else if (strcmp (s->s_name, ".lit") == 0)
@ -4420,7 +4436,7 @@ fixup_segment (segP, this_segment_type)
break;
default:
#if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K)
#if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K) || defined(TC_OR32)
/* This really should be handled in the linker, but
backward compatibility forbids. */
add_number += S_GET_VALUE (add_symbolP);
@ -4466,7 +4482,7 @@ fixup_segment (segP, this_segment_type)
if (pcrel)
{
#if !defined(TC_M88K) && !(defined(TE_PE) && defined(TC_I386)) && !defined(TC_A29K)
#if !defined(TC_M88K) && !(defined(TE_PE) && defined(TC_I386)) && !defined(TC_A29K) && !defined(TC_OR32)
/* This adjustment is not correct on the m88k, for which the
linker does all the computation. */
add_number -= md_pcrel_from (fixP);

View File

@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000
1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GAS.
@ -90,6 +90,11 @@
#define TARGET_FORMAT "coff-a29k-big"
#endif
#ifdef TC_OR32
#include "coff/or32.h"
#define TARGET_FORMAT "coff-or32-big"
#endif
#ifdef TC_I960
#include "coff/i960.h"
#define TARGET_FORMAT "coff-Intel-little"
@ -122,15 +127,10 @@
#define TARGET_FORMAT "pe-shl"
#else
#if 0 /* FIXME: The "shl" varaible does not appear to exist. What happened to it ? */
#define TARGET_FORMAT \
(shl \
(!target_big_endian \
? (sh_small ? "coff-shl-small" : "coff-shl") \
: (sh_small ? "coff-sh-small" : "coff-sh"))
#else
#define TARGET_FORMAT \
(sh_small ? "coff-shl-small" : "coff-shl")
#endif
#endif
#endif
@ -190,9 +190,7 @@ extern void coff_obj_symbol_new_hook PARAMS ((symbolS *));
extern void coff_obj_read_begin_hook PARAMS ((void));
#define obj_read_begin_hook coff_obj_read_begin_hook
/* ***********************************************************************
This file really contains two implementations of the COFF back end.
/* This file really contains two implementations of the COFF back end.
They are in the process of being merged, but this is only a
preliminary, mechanical merging. Many definitions that are
identical between the two are still found in both versions.
@ -226,9 +224,7 @@ extern void coff_obj_read_begin_hook PARAMS ((void));
See doc/internals.texi for a brief discussion of the history, if
you care.
Ken Raeburn, 5 May 1994
*********************************************************************** */
Ken Raeburn, 5 May 1994. */
#ifdef BFD_ASSEMBLER
@ -257,10 +253,10 @@ extern void coff_obj_read_begin_hook PARAMS ((void));
extern void obj_coff_section PARAMS ((int));
/* The number of auxiliary entries */
/* The number of auxiliary entries. */
#define S_GET_NUMBER_AUXILIARY(s) \
(coffsymbol (symbol_get_bfdsym (s))->native->u.syment.n_numaux)
/* The number of auxiliary entries */
/* The number of auxiliary entries. */
#define S_SET_NUMBER_AUXILIARY(s,v) (S_GET_NUMBER_AUXILIARY (s) = (v))
/* True if a symbol name is in the string table, i.e. its length is > 8. */
@ -271,9 +267,9 @@ extern int S_SET_STORAGE_CLASS PARAMS ((symbolS *, int));
extern int S_GET_STORAGE_CLASS PARAMS ((symbolS *));
extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
/* Auxiliary entry macros. SA_ stands for symbol auxiliary */
/* Omit the tv related fields */
/* Accessors */
/* Auxiliary entry macros. SA_ stands for symbol auxiliary. */
/* Omit the tv related fields. */
/* Accessors. */
#define SA_GET_SYM_TAGNDX(s) (SYM_AUXENT (s)->x_sym.x_tagndx.l)
#define SA_GET_SYM_LNNO(s) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno)
@ -297,15 +293,13 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SA_SET_SCN_NRELOC(s,v) (SYM_AUXENT (s)->x_scn.x_nreloc=(v))
#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
/*
* Internal use only definitions. SF_ stands for symbol flags.
*
* These values can be assigned to sy_symbol.ost_flags field of a symbolS.
*
* You'll break i960 if you shift the SYSPROC bits anywhere else. for
* more on the balname/callname hack, see tc-i960.h. b.out is done
* differently.
*/
/* Internal use only definitions. SF_ stands for symbol flags.
These values can be assigned to sy_symbol.ost_flags field of a symbolS.
You'll break i960 if you shift the SYSPROC bits anywhere else. for
more on the balname/callname hack, see tc-i960.h. b.out is done
differently. */
#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
@ -330,7 +324,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
/* All other bits are unused. */
/* Accessors */
/* Accessors. */
#define SF_GET(s) (*symbol_get_obj (s))
#define SF_GET_DEBUG(s) (symbol_get_bfdsym (s)->flags & BSF_DEBUGGING)
#define SF_SET_DEBUG(s) (symbol_get_bfdsym (s)->flags |= BSF_DEBUGGING)
@ -352,7 +346,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *));
#define SF_GET_IS_SYSPROC(s) (SF_GET (s) & SF_IS_SYSPROC) /* used by i960 */
#define SF_GET_SYSPROC(s) (SF_GET (s) & SF_SYSPROC) /* used by i960 */
/* Modifiers */
/* Modifiers. */
#define SF_SET(s,v) (SF_GET (s) = (v))
#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
@ -414,7 +408,7 @@ extern symbolS *coff_last_function;
#endif
#endif
/* sanity check */
/* Sanity check. */
#ifdef TC_I960
#ifndef C_LEAFSTAT
@ -424,8 +418,8 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i
#else /* not BFD_ASSEMBLER */
#ifdef TC_A29K
/* Allow translate from aout relocs to coff relocs */
#if defined TC_A29K || defined TC_OR32
/* Allow translate from aout relocs to coff relocs. */
#define NO_RELOC 20
#define RELOC_32 1
#define RELOC_8 2
@ -447,7 +441,7 @@ extern const segT N_TYPE_seg[];
/* SYMBOL TABLE */
/* Symbol table entry data type */
/* Symbol table entry data type. */
typedef struct
{
@ -455,18 +449,17 @@ typedef struct
struct internal_syment ost_entry;
/* Auxiliary entry. */
union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES];
/* obj_coff internal use only flags */
/* obj_coff internal use only flags. */
unsigned int ost_flags;
} obj_symbol_type;
#ifndef DO_NOT_STRIP
#define DO_NOT_STRIP 0
#endif
/* Symbol table macros and constants */
/* Symbol table macros and constants. */
/* Possible and usefull section number in symbol table
* The values of TEXT, DATA and BSS may not be portable.
*/
The values of TEXT, DATA and BSS may not be portable. */
#define C_ABS_SECTION N_ABS
#define C_UNDEF_SECTION N_UNDEF
@ -475,27 +468,25 @@ typedef struct
#define C_PTV_SECTION P_TV
#define C_REGISTER_SECTION 50
/*
* Macros to extract information from a symbol table entry.
* This syntaxic indirection allows independence regarding a.out or coff.
* The argument (s) of all these macros is a pointer to a symbol table entry.
*/
/* Macros to extract information from a symbol table entry.
This syntaxic indirection allows independence regarding a.out or coff.
The argument (s) of all these macros is a pointer to a symbol table entry. */
/* Predicates */
/* True if the symbol is external */
/* Predicates. */
/* True if the symbol is external. */
#define S_IS_EXTERNAL(s) ((s)->sy_symbol.ost_entry.n_scnum == C_UNDEF_SECTION)
/* True if symbol has been defined, ie :
section > 0 (DATA, TEXT or BSS)
section == 0 and value > 0 (external bss symbol) */
section == 0 and value > 0 (external bss symbol). */
#define S_IS_DEFINED(s) \
((s)->sy_symbol.ost_entry.n_scnum > C_UNDEF_SECTION \
|| ((s)->sy_symbol.ost_entry.n_scnum == C_UNDEF_SECTION \
&& S_GET_VALUE (s) > 0) \
|| ((s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION))
/* True if a debug special symbol entry */
/* True if a debug special symbol entry. */
#define S_IS_DEBUG(s) ((s)->sy_symbol.ost_entry.n_scnum == C_DEBUG_SECTION)
/* True if a symbol is local symbol name */
/* A symbol name whose name includes ^A is a gas internal pseudo symbol */
/* True if a symbol is local symbol name. */
/* A symbol name whose name includes ^A is a gas internal pseudo symbol. */
#define S_IS_LOCAL(s) \
((s)->sy_symbol.ost_entry.n_scnum == C_REGISTER_SECTION \
|| (S_LOCAL_NAME(s) && ! flag_keep_locals && ! S_IS_DEBUG (s)) \
@ -504,13 +495,11 @@ typedef struct
|| (flag_strip_local_absolute \
&& !S_IS_EXTERNAL(s) \
&& (s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION))
/* True if a symbol is not defined in this file */
/* True if a symbol is not defined in this file. */
#define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
&& S_GET_VALUE (s) == 0)
/*
* True if a symbol can be multiply defined (bss symbols have this def
* though it is bad practice)
*/
/* True if a symbol can be multiply defined (bss symbols have this def
though it is bad practice). */
#define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
&& S_GET_VALUE (s) != 0)
/* True if a symbol name is in the string table, i.e. its length is > 8. */
@ -526,41 +515,41 @@ typedef struct
((s)->sy_symbol.ost_entry.n_sclass == C_WEAKEXT)
#endif
/* Accessors */
/* The name of the symbol */
/* Accessors. */
/* The name of the symbol. */
#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset)
/* The pointer to the string table */
/* The pointer to the string table. */
#define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset)
/* The numeric value of the segment */
/* The numeric value of the segment. */
#define S_GET_SEGMENT(s) s_get_segment(s)
/* The data type */
/* The data type. */
#define S_GET_DATA_TYPE(s) ((s)->sy_symbol.ost_entry.n_type)
/* The storage class */
/* The storage class. */
#define S_GET_STORAGE_CLASS(s) ((s)->sy_symbol.ost_entry.n_sclass)
/* The number of auxiliary entries */
/* The number of auxiliary entries. */
#define S_GET_NUMBER_AUXILIARY(s) ((s)->sy_symbol.ost_entry.n_numaux)
/* Modifiers */
/* Set the name of the symbol */
/* Modifiers. */
/* Set the name of the symbol. */
#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v))
/* Set the offset of the symbol */
/* Set the offset of the symbol. */
#define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v))
/* The numeric value of the segment */
/* The numeric value of the segment. */
#define S_SET_SEGMENT(s,v) ((s)->sy_symbol.ost_entry.n_scnum = SEGMENT_TO_SYMBOL_TYPE(v))
/* The data type */
/* The data type. */
#define S_SET_DATA_TYPE(s,v) ((s)->sy_symbol.ost_entry.n_type = (v))
/* The storage class */
/* The storage class. */
#define S_SET_STORAGE_CLASS(s,v) ((s)->sy_symbol.ost_entry.n_sclass = (v))
/* The number of auxiliary entries */
/* The number of auxiliary entries. */
#define S_SET_NUMBER_AUXILIARY(s,v) ((s)->sy_symbol.ost_entry.n_numaux = (v))
/* Additional modifiers */
/* The symbol is external (does not mean undefined) */
/* Additional modifiers. */
/* The symbol is external (does not mean undefined). */
#define S_SET_EXTERNAL(s) { S_SET_STORAGE_CLASS(s, C_EXT) ; SF_CLEAR_LOCAL(s); }
/* Auxiliary entry macros. SA_ stands for symbol auxiliary */
/* Omit the tv related fields */
/* Accessors */
/* Auxiliary entry macros. SA_ stands for symbol auxiliary. */
/* Omit the tv related fields. */
/* Accessors. */
#define SYM_AUXENT(S) (&(S)->sy_symbol.ost_auxent[0])
#define SA_GET_SYM_TAGNDX(s) (SYM_AUXENT (s)->x_sym.x_tagndx.l)
@ -577,7 +566,7 @@ typedef struct
#define SA_GET_SCN_NRELOC(s) (SYM_AUXENT (s)->x_scn.x_nreloc)
#define SA_GET_SCN_NLINNO(s) (SYM_AUXENT (s)->x_scn.x_nlinno)
/* Modifiers */
/* Modifiers. */
#define SA_SET_SYM_TAGNDX(s,v) (SYM_AUXENT (s)->x_sym.x_tagndx.l=(v))
#define SA_SET_SYM_LNNO(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_lnno=(v))
#define SA_SET_SYM_SIZE(s,v) (SYM_AUXENT (s)->x_sym.x_misc.x_lnsz.x_size=(v))
@ -592,15 +581,13 @@ typedef struct
#define SA_SET_SCN_NRELOC(s,v) (SYM_AUXENT (s)->x_scn.x_nreloc=(v))
#define SA_SET_SCN_NLINNO(s,v) (SYM_AUXENT (s)->x_scn.x_nlinno=(v))
/*
* Internal use only definitions. SF_ stands for symbol flags.
*
* These values can be assigned to sy_symbol.ost_flags field of a symbolS.
*
* You'll break i960 if you shift the SYSPROC bits anywhere else. for
* more on the balname/callname hack, see tc-i960.h. b.out is done
* differently.
*/
/* Internal use only definitions. SF_ stands for symbol flags.
These values can be assigned to sy_symbol.ost_flags field of a symbolS.
You'll break i960 if you shift the SYSPROC bits anywhere else. for
more on the balname/callname hack, see tc-i960.h. b.out is done
differently. */
#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
@ -626,7 +613,7 @@ typedef struct
#define SF_ADJ_LNNOPTR (0x00400000) /* Has a lnnoptr */
/* All other bits are unused. */
/* Accessors */
/* Accessors. */
#define SF_GET(s) ((s)->sy_symbol.ost_flags)
#define SF_GET_NORMAL_FIELD(s) (SF_GET (s) & SF_NORMAL_MASK)
#define SF_GET_DEBUG_FIELD(s) (SF_GET (s) & SF_DEBUG_MASK)
@ -648,7 +635,7 @@ typedef struct
#define SF_GET_IS_SYSPROC(s) (SF_GET (s) & SF_IS_SYSPROC) /* used by i960 */
#define SF_GET_SYSPROC(s) (SF_GET (s) & SF_SYSPROC) /* used by i960 */
/* Modifiers */
/* Modifiers. */
#define SF_SET(s,v) (SF_GET (s) = (v))
#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK))
#define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK))
@ -671,12 +658,10 @@ typedef struct
#define SF_SET_IS_SYSPROC(s) (SF_GET (s) |= SF_IS_SYSPROC) /* used by i960 */
#define SF_SET_SYSPROC(s,v) (SF_GET (s) |= ((v) & SF_SYSPROC)) /* used by i960 */
/* File header macro and type definition */
/* File header macro and type definition. */
/*
* File position calculators. Beware to use them when all the
* appropriate fields are set in the header.
*/
/* File position calculators. Beware to use them when all the
appropriate fields are set in the header. */
#ifdef OBJ_COFF_OMIT_OPTIONAL_HEADER
#define OBJ_COFF_AOUTHDRSZ (0)
@ -714,8 +699,8 @@ typedef struct
H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h))
/* Accessors */
/* aouthdr */
/* Accessors. */
/* aouthdr. */
#define H_GET_MAGIC_NUMBER(h) ((h)->aouthdr.magic)
#define H_GET_VERSION_STAMP(h) ((h)->aouthdr.vstamp)
#define H_GET_TEXT_SIZE(h) ((h)->aouthdr.tsize)
@ -724,7 +709,7 @@ typedef struct
#define H_GET_ENTRY_POINT(h) ((h)->aouthdr.entry)
#define H_GET_TEXT_START(h) ((h)->aouthdr.text_start)
#define H_GET_DATA_START(h) ((h)->aouthdr.data_start)
/* filehdr */
/* filehdr. */
#define H_GET_FILE_MAGIC_NUMBER(h) ((h)->filehdr.f_magic)
#define H_GET_NUMBER_OF_SECTIONS(h) ((h)->filehdr.f_nscns)
#define H_GET_TIME_STAMP(h) ((h)->filehdr.f_timdat)
@ -733,7 +718,7 @@ typedef struct
#define H_GET_SYMBOL_TABLE_SIZE(h) (H_GET_SYMBOL_COUNT(h) * SYMESZ)
#define H_GET_SIZEOF_OPTIONAL_HEADER(h) ((h)->filehdr.f_opthdr)
#define H_GET_FLAGS(h) ((h)->filehdr.f_flags)
/* Extra fields to achieve bsd a.out compatibility and for convenience */
/* Extra fields to achieve bsd a.out compatibility and for convenience. */
#define H_GET_RELOCATION_SIZE(h) ((h)->relocation_size)
#define H_GET_STRING_SIZE(h) ((h)->string_table_size)
#define H_GET_LINENO_SIZE(h) ((h)->lineno_size)
@ -750,8 +735,8 @@ typedef struct
#define H_GET_TEXT_RELOCATION_SIZE(h) (text_section_header.s_nreloc * RELSZ)
#define H_GET_DATA_RELOCATION_SIZE(h) (data_section_header.s_nreloc * RELSZ)
/* Modifiers */
/* aouthdr */
/* Modifiers. */
/* aouthdr. */
#define H_SET_MAGIC_NUMBER(h,v) ((h)->aouthdr.magic = (v))
#define H_SET_VERSION_STAMP(h,v) ((h)->aouthdr.vstamp = (v))
#define H_SET_TEXT_SIZE(h,v) ((h)->aouthdr.tsize = (v))
@ -760,7 +745,7 @@ typedef struct
#define H_SET_ENTRY_POINT(h,v) ((h)->aouthdr.entry = (v))
#define H_SET_TEXT_START(h,v) ((h)->aouthdr.text_start = (v))
#define H_SET_DATA_START(h,v) ((h)->aouthdr.data_start = (v))
/* filehdr */
/* filehdr. */
#define H_SET_FILE_MAGIC_NUMBER(h,v) ((h)->filehdr.f_magic = (v))
#define H_SET_NUMBER_OF_SECTIONS(h,v) ((h)->filehdr.f_nscns = (v))
#define H_SET_TIME_STAMP(h,v) ((h)->filehdr.f_timdat = (v))
@ -768,12 +753,12 @@ typedef struct
#define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->filehdr.f_nsyms = (v))
#define H_SET_SIZEOF_OPTIONAL_HEADER(h,v) ((h)->filehdr.f_opthdr = (v))
#define H_SET_FLAGS(h,v) ((h)->filehdr.f_flags = (v))
/* Extra fields to achieve bsd a.out compatibility and for convinience */
/* Extra fields to achieve bsd a.out compatibility and for convinience. */
#define H_SET_RELOCATION_SIZE(h,t,d) ((h)->relocation_size = (t)+(d))
#define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v))
#define H_SET_LINENO_SIZE(h,v) ((h)->lineno_size = (v))
/* Segment flipping */
/* Segment flipping. */
typedef struct
{
@ -784,14 +769,14 @@ typedef struct
information for all sections in
bytes. */
long lineno_size; /* Size of the line number information
table in bytes */
table in bytes. */
} object_headers;
struct lineno_list
{
struct bfd_internal_lineno line;
char *frag; /* Frag to which the line number is related */
struct lineno_list *next; /* Forward chain pointer */
char *frag; /* Frag to which the line number is related. */
struct lineno_list *next; /* Forward chain pointer. */
};
#define obj_segment_name(i) (segment_info[(int) (i)].scnhdr.s_name)
@ -823,7 +808,7 @@ extern void c_section_header PARAMS ((struct internal_scnhdr * header,
void tc_coff_symbol_emit_hook PARAMS ((symbolS *));
#endif
/* sanity check */
/* Sanity check. */
#ifdef TC_I960
#ifndef C_LEAFSTAT

View File

@ -1995,9 +1995,9 @@ elf_frob_file_before_adjust ()
symbolS *symp;
for (symp = symbol_rootP; symp; symp = symbol_next (symp))
if (symbol_get_obj (symp)->versioned_name)
{
if (!S_IS_DEFINED (symp))
{
if (symbol_get_obj (symp)->versioned_name)
{
char *p;
@ -2017,6 +2017,14 @@ elf_frob_file_before_adjust ()
&& symbol_used_in_reloc_p (symp) == 0)
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
}
/* If there was .weak foo, but foo was neither defined nor
used anywhere, remove it. */
else if (S_IS_WEAK (symp)
&& symbol_used_p (symp) == 0
&& symbol_used_in_reloc_p (symp) == 0)
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
}
}
}

View File

@ -117,6 +117,7 @@ struct alpha_macro {
#define O_gprelhigh O_md9 /* !gprelhigh relocation */
#define O_gprellow O_md10 /* !gprellow relocation */
#define O_gprel O_md11 /* !gprel relocation */
#define O_samegp O_md12 /* !samegp relocation */
#define DUMMY_RELOC_LITUSE_ADDR (BFD_RELOC_UNUSED + 1)
#define DUMMY_RELOC_LITUSE_BASE (BFD_RELOC_UNUSED + 2)
@ -128,7 +129,7 @@ struct alpha_macro {
#define LITUSE_BYTOFF 2
#define LITUSE_JSR 3
#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprel)
#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_samegp)
/* Macros for extracting the type and number of encoded register tokens */
@ -498,7 +499,8 @@ static const struct alpha_reloc_op_tag {
DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1),
DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0),
DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0),
DEF(gprel, BFD_RELOC_GPREL16, 0, 0)
DEF(gprel, BFD_RELOC_GPREL16, 0, 0),
DEF(samegp, BFD_RELOC_ALPHA_BRSGP, 0, 0)
};
#undef DEF
@ -1219,6 +1221,11 @@ md_apply_fix3 (fixP, valP, seg)
}
return;
#ifdef OBJ_ELF
case BFD_RELOC_ALPHA_BRSGP:
return;
#endif
#ifdef OBJ_ECOFF
case BFD_RELOC_ALPHA_LITERAL:
md_number_to_chars (fixpos, value, 2);
@ -1364,6 +1371,49 @@ alpha_define_label (sym)
alpha_insn_label = sym;
}
/* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
let it get resolved at assembly time. */
void
alpha_validate_fix (f)
fixS *f;
{
#ifdef OBJ_ELF
int offset = 0;
const char *name;
if (f->fx_r_type != BFD_RELOC_ALPHA_BRSGP)
return;
if (! S_IS_DEFINED (f->fx_addsy))
return;
switch (S_GET_OTHER (f->fx_addsy) & STO_ALPHA_STD_GPLOAD)
{
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
offset = 8;
break;
default:
if (S_IS_LOCAL (f->fx_addsy))
name = "<local>";
else
name = S_GET_NAME (f->fx_addsy);
as_bad_where (f->fx_file, f->fx_line,
_("!samegp reloc against symbol without .prologue: %s"),
name);
break;
}
if (! (S_IS_EXTERN (f->fx_addsy) || S_IS_WEAK (f->fx_addsy)))
{
f->fx_r_type = BFD_RELOC_23_PCREL_S2;
f->fx_offset += offset;
}
#endif
}
/* Return true if we must always emit a reloc for a type and false if
there is some hope of resolving it at assembly time. */
@ -1388,6 +1438,7 @@ alpha_force_relocation (f)
case BFD_RELOC_ALPHA_GPREL_LO16:
case BFD_RELOC_ALPHA_LINKAGE:
case BFD_RELOC_ALPHA_CODEADDR:
case BFD_RELOC_ALPHA_BRSGP:
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
return 1;
@ -1399,8 +1450,6 @@ alpha_force_relocation (f)
return 0;
default:
assert ((int) f->fx_r_type < 0
&& -(int) f->fx_r_type < (int) alpha_num_operands);
return 0;
}
}
@ -1424,6 +1473,7 @@ alpha_fix_adjustable (f)
case BFD_RELOC_ALPHA_GPDISP_HI16:
case BFD_RELOC_ALPHA_GPDISP_LO16:
case BFD_RELOC_ALPHA_GPDISP:
case BFD_RELOC_ALPHA_BRSGP:
return 0;
case BFD_RELOC_ALPHA_LITERAL:
@ -1448,8 +1498,6 @@ alpha_fix_adjustable (f)
return 1;
default:
assert ((int) f->fx_r_type < 0
&& - (int) f->fx_r_type < (int) alpha_num_operands);
return 1;
}
/*NOTREACHED*/
@ -1767,6 +1815,7 @@ debug_exp (tok, ntok)
case O_pregister: name = "O_pregister"; break;
case O_cpregister: name = "O_cpregister"; break;
case O_literal: name = "O_literal"; break;
case O_lituse_addr: name = "O_lituse_addr"; break;
case O_lituse_base: name = "O_lituse_base"; break;
case O_lituse_bytoff: name = "O_lituse_bytoff"; break;
case O_lituse_jsr: name = "O_lituse_jsr"; break;
@ -1774,8 +1823,7 @@ debug_exp (tok, ntok)
case O_gprelhigh: name = "O_gprelhigh"; break;
case O_gprellow: name = "O_gprellow"; break;
case O_gprel: name = "O_gprel"; break;
case O_md11: name = "O_md11"; break;
case O_md12: name = "O_md12"; break;
case O_samegp: name = "O_samegp"; break;
case O_md13: name = "O_md13"; break;
case O_md14: name = "O_md14"; break;
case O_md15: name = "O_md15"; break;
@ -2170,6 +2218,7 @@ find_macro_match (first_macro, tok, pntok)
case O_gprelhigh:
case O_gprellow:
case O_gprel:
case O_samegp:
goto match_failed;
default:

View File

@ -39,12 +39,14 @@
#define NEED_LITERAL_POOL
#define REPEAT_CONS_EXPRESSIONS
extern void alpha_validate_fix PARAMS ((struct fix *));
extern int alpha_force_relocation PARAMS ((struct fix *));
extern int alpha_fix_adjustable PARAMS ((struct fix *));
extern unsigned long alpha_gprmask, alpha_fprmask;
extern valueT alpha_gp_value;
#define TC_VALIDATE_FIX(FIXP,SEGTYPE,SKIP) alpha_validate_fix (FIXP)
#define TC_FORCE_RELOCATION(FIXP) alpha_force_relocation (FIXP)
#define tc_fix_adjustable(FIXP) alpha_fix_adjustable (FIXP)
#define RELOC_REQUIRES_SYMBOL

View File

@ -5165,7 +5165,7 @@ md_apply_fix3 (fixP, valP, seg)
if ((operand->flags & PPC_OPERAND_PARENS) != 0
&& operand->bits == 16
&& operand->shift == 0
&& operand->insert == NULL
&& (operand->insert == NULL || ppc_xcoff64)
&& fixP->fx_addsy != NULL
&& symbol_get_tc (fixP->fx_addsy)->subseg != 0
&& symbol_get_tc (fixP->fx_addsy)->class != XMC_TC

View File

@ -1,6 +1,6 @@
/* tc-sparc.c -- Assemble for the SPARC
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001
1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -32,6 +32,12 @@
#include "dwarf2dbg.h"
#endif
/* Some ancient Sun C compilers would not take such hex constants as
unsigned, and would end up sign-extending them to form an offsetT,
so use these constants instead. */
#define U0xffffffff ((((unsigned long) 1 << 16) << 16) - 1)
#define U0x80000000 ((((unsigned long) 1 << 16) << 15))
static struct sparc_arch *lookup_arch PARAMS ((char *));
static void init_default_arch PARAMS ((void));
static int sparc_ip PARAMS ((char *, const struct sparc_opcode **));
@ -916,7 +922,7 @@ in_signed_range (val, max)
if (sparc_arch_size == 32)
{
bfd_signed_vma sign = (bfd_signed_vma) 1 << 31;
val = ((val & 0xffffffff) ^ sign) - sign;
val = ((val & U0xffffffff) ^ sign) - sign;
}
if (val > max)
return 0;
@ -1019,14 +1025,14 @@ synthetize_setuw (insn)
{
if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < 0
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
|| the_insn.exp.X_add_number > (offsetT) U0xffffffff))
as_warn (_("set: number not in 0..4294967295 range"));
}
else
{
if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
&& (the_insn.exp.X_add_number < -(offsetT) U0x80000000
|| the_insn.exp.X_add_number > (offsetT) U0xffffffff))
as_warn (_("set: number not in -2147483648..4294967295 range"));
the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number;
}
@ -1085,8 +1091,8 @@ synthetize_setsw (insn)
}
if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff))
&& (the_insn.exp.X_add_number < -(offsetT) U0x80000000
|| the_insn.exp.X_add_number > (offsetT) U0xffffffff))
as_warn (_("setsw: number not in -2147483648..4294967295 range"));
low32 = the_insn.exp.X_add_number;
@ -1128,7 +1134,7 @@ synthetize_setx (insn)
int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0;
int need_xor10_p = 0;
#define SIGNEXT32(x) ((((x) & 0xffffffff) ^ 0x80000000) - 0x80000000)
#define SIGNEXT32(x) ((((x) & U0xffffffff) ^ U0x80000000) - U0x80000000)
lower32 = SIGNEXT32 (the_insn.exp.X_add_number);
upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32));
#undef SIGNEXT32

View File

@ -25,9 +25,11 @@ asconfig.texi: $(CONFIG).texi
CPU_DOCS = \
c-a29k.texi \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
c-h8500.texi \
c-hppa.texi \
@ -46,6 +48,7 @@ CPU_DOCS = \
c-pj.texi \
c-ppc.texi \
c-sh.texi \
c-sh64.texi \
c-sparc.texi \
c-tic54x.texi \
c-vax.texi \
@ -59,6 +62,10 @@ gasver.texi: Makefile
as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = internals.texi

View File

@ -136,9 +136,11 @@ info_TEXINFOS = as.texinfo gasp.texi
CPU_DOCS = \
c-a29k.texi \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
c-h8500.texi \
c-hppa.texi \
@ -157,6 +159,7 @@ CPU_DOCS = \
c-pj.texi \
c-ppc.texi \
c-sh.texi \
c-sh64.texi \
c-sparc.texi \
c-tic54x.texi \
c-vax.texi \
@ -460,6 +463,10 @@ gasver.texi: Makefile
as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
# Maintenance
# We need it for the taz target in ../../Makefile.in.

View File

@ -1,4 +1,4 @@
@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001
@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002
@c Free Software Foundation, Inc.
@c This file is part of the documentation for the GAS manual
@ -27,8 +27,10 @@
@c CPUs of interest
@c ================
@set A29K
@set ALPHA
@set ARC
@set ARM
@set CRIS
@set D10V
@set D30V
@set H8/300

View File

@ -1,6 +1,6 @@
\input texinfo @c -*-Texinfo-*-
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
@c 2001
@c 2001, 2002
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@ -29,8 +29,10 @@
@set TARGET TARGET
@set GENERIC
@set A29K
@set ALPHA
@set ARC
@set ARM
@set CRIS
@set D10V
@set D30V
@set H8/300
@ -116,6 +118,7 @@
@format
START-INFO-DIR-ENTRY
* As: (as). The GNU assembler.
* Gas: (as). The GNU assembler.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@ -127,7 +130,7 @@ END-INFO-DIR-ENTRY
This file documents the GNU Assembler "@value{AS}".
@c man begin COPYRIGHT
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@ -180,7 +183,7 @@ done.
@end tex
@vskip 0pt plus 1filll
Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@ -265,6 +268,14 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
@ifset ALPHA
@emph{Target Alpha options:}
[@b{-m@var{cpu}}]
[@b{-mdebug} | @b{-no-mdebug}]
[@b{-relax}] [@b{-g}] [@b{-G@var{size}}]
[@b{-F}] [@b{-32addr}]
@end ifset
@ifset ARC
@emph{Target ARC options:}
@ -284,6 +295,15 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@b{-mapcs-reentrant}]
[@b{-mthumb-interwork}] [@b{-moabi}] [@b{-k}]
@end ifset
@ifset CRIS
@emph{Target CRIS options:}
[@b{--underscore} | @b{--no-underscore}]
[@b{--pic}] [@b{-N}]
[@b{--emulation=criself} | @b{--emulation=crisaout}]
@c Deprecated -- deliberately not documented.
@c [@b{-h}] [@b{-H}]
@end ifset
@ifset D10V
@emph{Target D10V options:}
@ -354,6 +374,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{--fixed-special-register-names}] [@b{--globalize-symbols}]
[@b{--gnu-syntax}] [@b{--relax}] [@b{--no-predefined-symbols}]
[@b{--no-expand}] [@b{--no-merge-gregs}] [@b{-x}]
[@b{--linker-allocated-gregs}]
@end ifset
@ifset PDP11
@ -581,6 +602,10 @@ Specify that PIC code has been generated.
@end table
@end ifset
@ifset CRIS
See the info pages for documentation of the CRIS-specific options.
@end ifset
@ifset D10V
The following options are available when @value{AS} is configured for
a D10V processor.
@ -5571,12 +5596,18 @@ subject, see the hardware manufacturer's manual.
@ifset A29K
* AMD29K-Dependent:: AMD 29K Dependent Features
@end ifset
@ifset ALPHA
* Alpha-Dependent:: Alpha Dependent Features
@end ifset
@ifset ARC
* ARC-Dependent:: ARC Dependent Features
@end ifset
@ifset ARM
* ARM-Dependent:: ARM Dependent Features
@end ifset
@ifset CRIS
* CRIS-Dependent:: CRIS Dependent Features
@end ifset
@ifset D10V
* D10V-Dependent:: D10V Dependent Features
@end ifset
@ -5624,6 +5655,7 @@ subject, see the hardware manufacturer's manual.
@end ifset
@ifset SH
* SH-Dependent:: Hitachi SH Dependent Features
* SH64-Dependent:: Hitachi SH64 Dependent Features
@end ifset
@ifset PDP11
* PDP-11-Dependent:: PDP-11 Dependent Features
@ -5662,18 +5694,26 @@ subject, see the hardware manufacturer's manual.
@c node and sectioning commands; hence the repetition of @chapter BLAH
@c in both conditional blocks.
@ifset ARC
@include c-arc.texi
@end ifset
@ifset A29K
@include c-a29k.texi
@end ifset
@ifset ALPHA
@include c-alpha.texi
@end ifset
@ifset ARC
@include c-arc.texi
@end ifset
@ifset ARM
@include c-arm.texi
@end ifset
@ifset CRIS
@include c-cris.texi
@end ifset
@ifset Hitachi-all
@ifclear GENERIC
@node Machine Dependencies
@ -5771,6 +5811,7 @@ family.
@ifset SH
@include c-sh.texi
@include c-sh64.texi
@end ifset
@ifset SPARC

View File

@ -0,0 +1,396 @@
@c Copyright 2002
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@page
@node Alpha-Dependent
@chapter Alpha Dependent Features
@end ifset
@ifclear GENERIC
@node Machine Dependencies
@chapter Alpha Dependent Features
@end ifclear
@cindex Alpha support
@menu
* Alpha Notes:: Notes
* Alpha Options:: Options
* Alpha Syntax:: Syntax
* Alpha Floating Point:: Floating Point
* Alpha Directives:: Alpha Machine Directives
* Alpha Opcodes:: Opcodes
@end menu
@node Alpha Notes
@section Notes
@cindex Alpha notes
@cindex notes for Alpha
The documentation here is primarily for the ELF object format.
@code{@value{AS}} also supports the ECOFF and EVAX formats, but
features specific to these formats are not yet documented.
@node Alpha Options
@section Options
@cindex Alpha options
@cindex options for Alpha
@table @option
@cindex @code{-m@var{cpu}} command line option, Alpha
@item -m@var{cpu}
This option specifies the target processor. If an attempt is made to
assemble an instruction which will not execute on the target processor,
the assembler may either expand the instruction as a macro or issue an
error message. This option is equivalent to the @code{.arch} directive.
The following processor names are recognized:
@code{21064},
@code{21064a},
@code{21066},
@code{21068},
@code{21164},
@code{21164a},
@code{21164pc},
@code{21264},
@code{ev4},
@code{ev5},
@code{lca45},
@code{ev5},
@code{ev56},
@code{pca56},
@code{ev6}.
The special name @code{all} may be used to allow the assembler to accept
instructions valid for any Alpha processor.
In order to support existing practice in OSF/1 with respect to @code{.arch},
and existing practice within @command{MILO} (the Linux ARC bootloader), the
numbered processor names (e.g.@: 21064) enable the processor-specific PALcode
instructions, while the ``electro-vlasic'' names (e.g.@: @code{ev4}) do not.
@cindex @code{-mdebug} command line option, Alpha
@cindex @code{-no-mdebug} command line option, Alpha
@item -mdebug
@itemx -no-mdebug
Enables or disables the generation of @code{.mdebug} encapsulation for
stabs directives and procedure descriptors. The default is to automatically
enable @code{.mdebug} when the first stabs directive is seen.
@cindex @code{-relax} command line option, Alpha
@item -relax
This option forces all relocations to be put into the object file, instead
of saving space and resolving some relocations at assembly time. Note that
this option does not propagate all symbol arithmetic into the object file,
because not all symbol arithmetic can be represented. However, the option
can still be useful in specific applications.
@cindex @code{-g} command line option, Alpha
@item -g
This option is used when the compiler generates debug information. When
@command{gcc} is using @command{mips-tfile} to generate debug
information for ECOFF, local labels must be passed through to the object
file. Otherwise this option has no effect.
@cindex @code{-G} command line option, Alpha
@item -G@var{size}
A local common symbol larger than @var{size} is placed in @code{.bss},
while smaller symbols are placed in @code{.sbss}.
@cindex @code{-F} command line option, Alpha
@cindex @code{-32addr} command line option, Alpha
@item -F
@itemx -32addr
These options are ignored for backward compatibility.
@end table
@cindex Alpha Syntax
@node Alpha Syntax
@section Syntax
The assembler syntax closely follow the Alpha Reference Manual;
assembler directives and general syntax closely follow the OSF/1 and
OpenVMS syntax, with a few differences for ELF.
@menu
* Alpha-Chars:: Special Characters
* Alpha-Regs:: Register Names
* Alpha-Relocs:: Relocations
@end menu
@node Alpha-Chars
@subsection Special Characters
@cindex line comment character, Alpha
@cindex Alpha line comment character
@samp{#} is the line comment character.
@cindex line separator, Alpha
@cindex statement separator, Alpha
@cindex Alpha line separator
@samp{;} can be used instead of a newline to separate statements.
@node Alpha-Regs
@subsection Register Names
@cindex Alpha registers
@cindex register names, Alpha
The 32 integer registers are refered to as @samp{$@var{n}} or
@samp{$r@var{n}}. In addition, registers 15, 28, 29, and 30 may
be refered to by the symbols @samp{$fp}, @samp{$at}, @samp{$gp},
and @samp{$sp} respectively.
The 32 floating-point registers are refered to as @samp{$f@var{n}}.
@node Alpha-Relocs
@subsection Relocations
@cindex Alpha relocations
@cindex relocations, Alpha
Some of these relocations are available for ECOFF, but mostly
only for ELF. They are modeled after the relocation format
introduced in Digial Unix 4.0, but there are additions.
The format is @samp{!@var{tag}} or @samp{!@var{tag}!@var{number}}
where @var{tag} is the name of the relocation. In some cases
@var{number} is used to relate specific instructions.
The relocation is placed at the end of the instruction like so:
@example
ldah $0,a($29) !gprelhigh
lda $0,a($0) !gprellow
ldq $1,b($29) !literal!100
ldl $2,0($1) !lituse_base!100
@end example
@table @code
@item !literal
@itemx !literal!@var{N}
Used with an @code{ldq} instruction to load the address of a symbol
from the GOT.
A sequence number @var{N} is optional, and if present is used to pair
@code{lituse} relocations with this @code{literal} relocation. The
@code{lituse} relocations are used by the linker to optimize the code
based on the final location of the symbol.
Note that these optimizations are dependent on the data flow of the
program. Therefore, if @emph{any} @code{lituse} is paired with a
@code{literal} relocation, then @emph{all} uses of the register set by
the @code{literal} instruction must also be marked with @code{lituse}
relocations. This is because the original @code{literal} instruction
may be deleted or transformed into another instruction.
Also note that there may be a one-to-many relationship between
@code{literal} and @code{lituse}, but not a many-to-one. That is, if
there are two code paths that load up the same address and feed the
value to a single use, then the use may not use a @code{lituse}
relocation.
@item !lituse_base!@var{N}
Used with any memory format instruction (e.g.@: @code{ldl}) to indicate
that the literal is used for an address load. The offset field of the
instruction must be zero. During relaxation, the code may be altered
to use a gp-relative load.
@item !lituse_jsr!@var{N}
Used with a register branch format instruction (e.g.@: @code{jsr}) to
indicate that the literal is used for a call. During relaxation, the
code may be altered to use a direct branch (e.g.@: @code{bsr}).
@item !lituse_bytoff!@var{N}
Used with a byte mask instruction (e.g.@: @code{extbl}) to indicate
that only the low 3 bits of the address are relevant. During relaxation,
the code may be altered to use an immediate instead of a register shift.
@item !lituse_addr!@var{N}
Used with any other instruction to indicate that the original address
is in fact used, and the original @code{ldq} instruction may not be
altered or deleted. This is useful in conjunction with @code{lituse_jsr}
to test whether a weak symbol is defined.
@example
ldq $27,foo($29) !literal!1
beq $27,is_undef !lituse_addr!1
jsr $26,($27),foo !lituse_jsr!1
@end example
@item !gpdisp!@var{N}
Used with @code{ldah} and @code{lda} to load the GP from the current
address, a-la the @code{ldgp} macro. The source register for the
@code{ldah} instruction must contain the address of the @code{ldah}
instruction. There must be exactly one @code{lda} instruction paired
with the @code{ldah} instruction, though it may appear anywhere in
the instruction stream. The immediate operands must be zero.
@example
bsr $26,foo
ldah $29,0($26) !gpdisp!1
lda $29,0($29) !gpdisp!1
@end example
@item !gprelhigh
Used with an @code{ldah} instruction to add the high 16 bits of a
32-bit displacement from the GP.
@item !gprellow
Used with any memory format instruction to add the low 16 bits of a
32-bit displacement from the GP.
@item !gprel
Used with any memory format instruction to add a 16-bit displacement
from the GP.
@item !samegp
Used with any branch format instruction to skip the GP load at the
target address. The referenced symbol must have the same GP as the
source object file, and it must be declared to either not use @code{$27}
or perform a standard GP load in the first two instructions via the
@code{.prologue} directive.
@end table
@node Alpha Floating Point
@section Floating Point
@cindex floating point, Alpha (@sc{ieee})
@cindex Alpha floating point (@sc{ieee})
The Alpha family uses both @sc{ieee} and VAX floating-point numbers.
@node Alpha Directives
@section Alpha Assembler Directives
@command{@value{AS}} for the Alpha supports many additional directives for
compatibility with the native assembler. This section describes them only
briefly.
@cindex Alpha-only directives
These are the additional directives in @code{@value{AS}} for the Alpha:
@table @code
@item .arch @var{cpu}
Specifies the target processor. This is equivalent to the
@option{-m@var{cpu}} command-line option. @xref{Alpha Options, Options},
for a list of values for @var{cpu}.
@item .ent @var{function}[, @var{n}]
Mark the beginning of @var{function}. An optional number may follow for
compatibility with the OSF/1 assembler, but is ignored. When generating
@code{.mdebug} information, this will create a procedure descriptor for
the function. In ELF, it will mark the symbol as a function a-la the
generic @code{.type} directive.
@item .end @var{function}
Mark the end of @var{function}. In ELF, it will set the size of the symbol
a-la the generic @code{.size} directive.
@item .mask @var{mask}, @var{offset}
Indicate which of the integer registers are saved in the current
function's stack frame. @var{mask} is interpreted a bit mask in which
bit @var{n} set indicates that register @var{n} is saved. The registers
are saved in a block located @var{offset} bytes from the @dfn{canonical
frame address} (CFA) which is the value of the stack pointer on entry to
the function. The registers are saved sequentially, except that the
return address register (normally @code{$26}) is saved first.
This and the other directives that describe the stack frame are
currently only used when generating @code{.mdebug} information. They
may in the future be used to generate DWARF2 @code{.debug_frame} unwind
information for hand written assembly.
@item .fmask @var{mask}, @var{offset}
Indicate which of the floating-point registers are saved in the current
stack frame. The @var{mask} and @var{offset} parameters are interpreted
as with @code{.mask}.
@item .frame @var{framereg}, @var{frameoffset}, @var{retreg}[, @var{argoffset}]
Describes the shape of the stack frame. The frame pointer in use is
@var{framereg}; normally this is either @code{$fp} or @code{$sp}. The
frame pointer is @var{frameoffset} bytes below the CFA. The return
address is initially located in @var{retreg} until it is saved as
indicated in @code{.mask}. For compatibility with OSF/1 an optional
@var{argoffset} parameter is accepted and ignored. It is believed to
indicate the offset from the CFA to the saved argument registers.
@item .prologue @var{n}
Indicate that the stack frame is set up and all registers have been
spilled. The argument @var{n} indicates whether and how the function
uses the incoming @dfn{procedure vector} (the address of the called
function) in @code{$27}. 0 indicates that @code{$27} is not used; 1
indicates that the first two instructions of the function use @code{$27}
to perform a load of the GP register; 2 indicates that @code{$27} is
used in some non-standard way and so the linker cannot elide the load of
the procedure vector during relaxation.
@item .gprel32 @var{expression}
Computes the difference between the address in @var{expression} and the
GP for the current object file, and stores it in 4 bytes. In addition
to being smaller than a full 8 byte address, this also does not require
a dynamic relocation when used in a shared library.
@item .t_floating @var{expression}
Stores @var{expression} as an @sc{ieee} double precision value.
@item .s_floating @var{expression}
Stores @var{expression} as an @sc{ieee} single precision value.
@item .f_floating @var{expression}
Stores @var{expression} as a VAX F format value.
@item .g_floating @var{expression}
Stores @var{expression} as a VAX G format value.
@item .d_floating @var{expression}
Stores @var{expression} as a VAX D format value.
@item .set @var{feature}
Enables or disables various assembler features. Using the positive
name of the feature enables while using @samp{no@var{feature}} disables.
@table @code
@item at
Indicates that macro expansions may clobber the @dfn{assembler
temporary} (@code{$at} or @code{$28}) register. Some macros may not be
expanded without this and will generate an error message if @code{noat}
is in effect. When @code{at} is in effect, a warning will be generated
if @code{$at} is used by the programmer.
@item macro
Enables the expasion of macro instructions. Note that variants of real
instructions, such as @code{br label} vs @code{br $31,label} are
considered alternate forms and not macros.
@item move
@itemx reorder
@itemx volatile
These control whether and how the assembler may re-order instructions.
Accepted for compatibility with the OSF/1 assembler, but @command{@value{AS}}
does not do instruction scheduling, so these features are ignored.
@end table
@end table
The following directives are recognized for compatibility with the OSF/1
assembler but are ignored.
@example
.proc .aproc
.reguse .livereg
.option .aent
.ugen .eflag
.alias .noalias
@end example
@node Alpha Opcodes
@section Opcodes
For detailed information on the Alpha machine instruction set, see the
@c Attempt to work around a very overfull hbox.
@iftex
Alpha Architecture Handbook located at
@smallfonts
@example
ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf
@end example
@textfonts
@end iftex
@ifnottex
@uref{ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf,Alpha Architecture Handbook}.
@end ifnottex

View File

@ -96,6 +96,8 @@ config/tc-ns32k.c
config/tc-ns32k.h
config/tc-openrisc.c
config/tc-openrisc.h
config/tc-or32.c
config/tc-or32.h
config/tc-pdp11.c
config/tc-pdp11.h
config/tc-pj.c
@ -106,6 +108,8 @@ config/tc-s390.c
config/tc-s390.h
config/tc-sh.c
config/tc-sh.h
config/tc-sh64.c
config/tc-sh64.h
config/tc-sparc.c
config/tc-sparc.h
config/tc-tahoe.c

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,38 @@
2002-01-15 Richard Earnshaw <rearnsha@arm.com>
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
* coff/arm.h (F_VFP_FLOAT): Define.
* elf/arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
Contribute sh64-elf.
2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
* dis-asm.h (print_insn_sh64): New prototype.
(print_insn_sh64l): New prototype.
(print_insn_sh64x_media): New prototype.
2002-02-05 Frank Ch. Eigler <fche@redhat.com>
* dis-asm.h (disassemble_info): New field `insn_sets'.
(INIT_DISASSEMBLE_INFO): Clear it.
2002-02-05 Jason Merrill <jason@redhat.com>
* demangle.h (cplus_demangle_v3): Add "options" parm.
(cplus_demangle_v3_type): Remove prototype.
(DMGL_VERBOSE): New macro.
(DMGL_TYPES): New macro.
2002-02-02 H.J. Lu (hjl@gnu.org)
* demangle.h (cplus_demangle_v3_type): New prototype.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* dis-asm.h : Add support for or32 targets
2002-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
2002-01-27 David O'Brien <obrien@FreeBSD.org>
* cgen.h (BFD_VERSION): Use BFD_VERSION_DATE instead.
2001-12-14 Nick Clifton <nickc@cambridge.redhat.com>
@ -10,7 +41,6 @@
2001-12-13 Jakub Jelinek <jakub@redhat.com>
* elf/common.h (PT_GNU_EH_FRAME): Define.
* bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.
2001-12-07 Geoffrey Keating <geoffk@redhat.com>
@ -36,7 +66,7 @@
2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
* include/safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
* safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
@ -79,11 +109,6 @@
* libiberty.h (ASTRDUP): New macro.
libiberty_optr, libiberty_nptr, libiberty_len): Declare.
2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (ASTRDUP): New macro.
libiberty_optr, libiberty_nptr, libiberty_len): Declare.
2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* ansidecl.h: Update comments reflecting previous change.
@ -143,17 +168,11 @@
* hashtab.h (htab_hash_string): Declare.
2001-06-13 Andrew Cagney <ac131313@redhat.com>
2001-08-10 Andrew Cagney <ac131313@redhat.com>
* libiberty.h (lbasename): Change function declaration to return a
const char pointer.
2001-08-10 Richard Sandiford <rsandifo@redhat.com>
* opcode/mips.h (INSN_GP32): Remove.
(OPCODE_IS_MEMBER): Remove gp32 parameter.
(M_MOVE): New macro identifier.
2001-08-02 Mark Kettenis <kettenis@gnu.org>
* xregex.h (_REGEX_RE_COMP): Define.
@ -165,19 +184,10 @@
* bfdlink.h (struct bfd_link_info): add new boolean
field pei386_auto_import.
2001-08-01 Aldy Hernandez <aldyh@redhat.com>
* opcode/mips.h (INSN_ISA_MASK): Nuke bits 12-15.
2001-07-18 Andreas Jaeger <aj@suse.de>
* xregex2.h: Place under LGPL version 2.1.
2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
* opcode/cgen.h (CGEN_INSN): Add regex support.
(build_insn_regex): Declare.
2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
* xregex.h: New file to support libiberty regex.
@ -195,11 +205,6 @@
* ansidecl.h (NULL_PTR): Delete.
2001-05-11 Jakub Jelinek <jakub@redhat.com>
* elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
(ELF_STRING_ia64_unwind_info_once): Define.
2001-05-07 Zack Weinberg <zackw@stanford.edu>
* demangle.h: Use PARAMS for all prototypes.
@ -312,11 +317,11 @@
* getopt.h obstack.h: Standarize copyright statement.
2000-12-05 Richard Henderson <rth@redhat.com>
2000-12-04 Richard Henderson <rth@redhat.com>
* demangle.h: Change "new_abi" to "v3" everywhere.
2000-11-29 Zack Weinberg <zack@wolery.stanford.edu>
2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
* libiberty.h: Move #includes to top. Prototype xmalloc_failed.

View File

@ -1,3 +1,11 @@
2002-02-01 Tom Rix <trix@redhat.com>
* xcoff.h: Conditionally support <aiaff> for pre AIX 4.3.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* or32.h: New file.
2001-12-24 Tom Rix <trix@redhat.com>
* xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
@ -5,7 +13,6 @@
(XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
archive header ascii elements.
2001-12-17 Tom Rix <trix@redhat.com>
* xcoff.h : Add .except and .typchk section string and styp flags.
@ -15,6 +22,10 @@
* xcoff.h : Clean up formatting.
2002-01-15 Richard Earnshaw <rearnsha@arm.com>
* arm.h (F_VFP_FLOAT): Define.
2001-11-11 Timothy Wall <twall@alum.mit.edu>
* ti.h: Move arch-specific stuff from here...

View File

@ -29,6 +29,8 @@
#define DMGL_PARAMS (1 << 0) /* Include function args */
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
#define DMGL_AUTO (1 << 8)
#define DMGL_GNU (1 << 9)
@ -125,7 +127,7 @@ cplus_demangle_name_to_style PARAMS ((const char *name));
/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
cplus_demangle_v3 PARAMS ((const char* mangled));
cplus_demangle_v3 PARAMS ((const char* mangled, int options));
extern char*
java_demangle_v3 PARAMS ((const char* mangled));

View File

@ -1,6 +1,6 @@
/* Interface between the opcode library and its callers.
Copyright 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -73,6 +73,11 @@ typedef struct disassemble_info {
unsigned long mach;
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
enum bfd_endian endian;
/* An arch/mach-specific bitmask of selected instruction subsets, mainly
for processors with run-time-switchable instruction sets. The default,
zero, means that there is no constraint. CGEN-based opcodes ports
may use ISA_foo masks. */
unsigned long insn_sets;
/* Some targets need information about the current section to accurately
display insns. If this is NULL, the target disassembler function
@ -212,6 +217,8 @@ extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_or32 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_or32 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pdp11 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
@ -227,6 +234,9 @@ extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_sh64l PARAMS ((bfd_vma, disassemble_info *));
extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
@ -273,6 +283,7 @@ extern int generic_symbol_at_address
(INFO).flavour = bfd_target_unknown_flavour, \
(INFO).arch = bfd_arch_unknown, \
(INFO).mach = 0, \
(INFO).insn_sets = 0, \
(INFO).endian = BFD_ENDIAN_UNKNOWN, \
(INFO).octets_per_byte = 1, \
INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)

View File

@ -1,7 +1,91 @@
2002-02-13 Matt Fredette <fredette@netbsd.org>
* m68k.h (EF_M68000): Define.
2002-02-12 Alan Modra <amodra@bigpond.net.au>
* ppc.h (DT_PPC64_OPD, DT_PPC64_OPDSZ): Define.
2002-02-09 Richard Henderson <rth@redhat.com>
* alpha.h (R_ALPHA_BRSGP): New.
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
Contribute sh64-elf.
2002-01-23 Alexandre Oliva <aoliva@redhat.com>
* sh.h (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.
(R_SH_FIRST_INVALID_RELOC_4): Adjust.
2001-05-16 Alexandre Oliva <aoliva@redhat.com>
* sh.h: Renumbered and renamed some SH5 relocations to match
official numbers and names; moved unmaching ones to the range
0xf2-0xff.
2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (sh64_get_contents_type): Declare.
(sh64_address_is_shmedia): Likewise.
2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (sh64_elf_crange): New type.
(struct sh64_section_data): New.
(sh64_elf_section_data): New macro.
(EF_SH5): Rename back from EF_SH64.
2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (SHF_SH5_ISA32_MIXED, SHT_SH5_CR_SORTED,
SH64_CRANGES_SECTION_NAME, SH64_CRANGE_SIZE,
SH64_CRANGE_CR_ADDR_OFFSET, SH64_CRANGE_CR_SIZE_OFFSET,
SH64_CRANGE_CR_TYPE_OFFSET): New macros.
2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (EF_SH64): Don't define EF_SH64_ABI64.
2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (EF_SH64_32BIT_ABI, EF_SH64_64BIT_ABI): Delete.
(EF_SH64_ABI64): New.
2000-11-23 Hans-Peter Nilsson <hpn@cygnus.com>
* sh.h (EF_SH64): Rename from EF_SH5.
(EF_SH64_32BIT_ABI): New.
(EF_SH64_64BIT_ABI): New.
(R_SH_PT_16, R_SH_SHMEDIA_CODE
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): New
relocs.
2000-09-01 Ben Elliston <bje@redhat.com>
* sh.h (EF_SH5): Define.
2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
* mmix.h: Tweak comments.
(MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME): New.
[BFD_ARCH_SIZE] (_bfd_mmix_prepare_linker_allocated_gregs,
_bfd_mmix_finalize_linker_allocated_gregs,
_bfd_mmix_check_all_relocs): Provide prototypes.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* or32.h: New file.
* common.h: Add support for or32 targets.
2002-01-28 Jason Merrill <jason@redhat.com>
* dwarf2.h: Sync with gcc version.
2002-01-16 Alan Modra <amodra@bigpond.net.au>
* ppc.h (DT_PPC64_GLINK): Define.
2002-01-15 Richard Earnshaw <rearnsha@arm.com>
* arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
* common.h: Update copyright years.
@ -24,6 +108,10 @@
unsigned int.
* common.h (SHN_BAD): Define.
2001-12-13 Jakub Jelinek <jakub@redhat.com>
* elf/common.h (PT_GNU_EH_FRAME): Define.
2001-12-11 Alan Modra <amodra@bigpond.net.au>
* common.h (SHN_XINDEX): Comment typo fix.
@ -90,7 +178,7 @@
(E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New
machine types.
Tue Aug 26 23:32:34 2001 J"orn Rennecke <amylaar@redhat.com>
2001-08-26 J"orn Rennecke <amylaar@redhat.com>
* h8.h: New file.
@ -118,6 +206,11 @@ Tue Aug 26 23:32:34 2001 J"orn Rennecke <amylaar@redhat.com>
* common.h: Remove definition of EM_MIPS_RS4_BE. The constant was
never in active use and is used otherwise by the ABI.
2001-05-11 Jakub Jelinek <jakub@redhat.com>
* ia64.h (ELF_STRING_ia64_unwind_once): Define.
(ELF_STRING_ia64_unwind_info_once): Define.
2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* external.h: Fix typo.
@ -390,7 +483,7 @@ Tue Aug 26 23:32:34 2001 J"orn Rennecke <amylaar@redhat.com>
(ELFOSABI_MODESTO): Defined.
(ELFOSABI_OPENBSD): Likewise.
Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-04-21 Richard Henderson <rth@cygnus.com>
David Mosberger <davidm@hpl.hp.com>
* ia64.h: New file.
@ -425,7 +518,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
(PF_ARM_PI): Define.
(PF_ARM_ABS): Define.
Wed Apr 5 22:08:59 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.
@ -454,7 +547,7 @@ Wed Apr 5 22:08:59 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* common.h (ELFOSABI_LINUX): Define.
Thu Feb 17 00:18:33 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
(EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.

View File

@ -94,6 +94,11 @@ START_RELOC_NUMBERS (elf_alpha_reloc_type)
RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
/* Like BRADDR, but assert that the source and target object file
share the same GP value, and adjust the target address for
STO_ALPHA_STD_GPLOAD. */
RELOC_NUMBER (R_ALPHA_BRSGP, 28)
END_RELOC_NUMBERS (R_ALPHA_max)
#endif /* _ELF_ALPHA_H */

View File

@ -199,6 +199,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Old version of PowerPC, this should be removed shortly. */
#define EM_PPC_OLD 17
/* (Depreciated) Temporary number for the OpenRISC processor. */
#define EM_OR32 0x8472
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_M32R 0x9041

View File

@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
Copyright 1992, 1993, 1995, 1996, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
@ -10,21 +10,22 @@
Derived from the DWARF 1 implementation written by Ron Guilmette
(rfg@netcom.com), November 1990.
This file is part of GNU CC.
This file is part of GCC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GNU CC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* This file is derived from the DWARF specification (a public document)
Revision 2.0.0 (July 27, 1993) developed by the UNIX International
@ -32,7 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
by UNIX International. Copies of this specification are available from
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
This file also now contains definitions from the DWARF 2.1 specification. */
This file also now contains definitions from the DWARF 3 specification. */
/* This file is shared between GCC and GDB, and should not contain
prototypes. */
@ -177,7 +178,7 @@ enum dwarf_tag
DW_TAG_variant_part = 0x33,
DW_TAG_variable = 0x34,
DW_TAG_volatile_type = 0x35,
/* DWARF 2.1. */
/* DWARF 3. */
DW_TAG_dwarf_procedure = 0x36,
DW_TAG_restrict_type = 0x37,
DW_TAG_interface_type = 0x38,
@ -190,8 +191,8 @@ enum dwarf_tag
DW_TAG_MIPS_loop = 0x4081,
/* GNU extensions. */
DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */
DW_TAG_function_template = 0x4102, /* for C++ */
DW_TAG_class_template = 0x4103, /* for C++ */
DW_TAG_function_template = 0x4102, /* For C++. */
DW_TAG_class_template = 0x4103, /* For C++. */
DW_TAG_GNU_BINCL = 0x4104,
DW_TAG_GNU_EINCL = 0x4105
};
@ -295,7 +296,7 @@ enum dwarf_attribute
DW_AT_variable_parameter = 0x4b,
DW_AT_virtuality = 0x4c,
DW_AT_vtable_elem_location = 0x4d,
/* DWARF 2.1 values. */
/* DWARF 3 values. */
DW_AT_allocated = 0x4e,
DW_AT_associated = 0x4f,
DW_AT_data_location = 0x50,
@ -326,7 +327,9 @@ enum dwarf_attribute
DW_AT_mac_info = 0x2103,
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106
DW_AT_body_end = 0x2106,
/* VMS Extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201
};
#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */
@ -480,10 +483,10 @@ enum dwarf_location_atom
DW_OP_deref_size = 0x94,
DW_OP_xderef_size = 0x95,
DW_OP_nop = 0x96,
/* DWARF 2.1 extensions. */
/* DWARF 3 extensions. */
DW_OP_push_object_address = 0x97,
DW_OP_call2 = 0x98, /* 1 2-byte offset of DIE. */
DW_OP_call4 = 0x99, /* 1 4-byte offset of DIE. */
DW_OP_call2 = 0x98,
DW_OP_call4 = 0x99,
DW_OP_calli = 0x9a
};
@ -502,7 +505,7 @@ enum dwarf_type
DW_ATE_signed_char = 0x6,
DW_ATE_unsigned = 0x7,
DW_ATE_unsigned_char = 0x8,
/* DWARF 2.1. */
/* DWARF 3. */
DW_ATE_imaginary_float = 0x9
};
@ -589,7 +592,7 @@ enum dwarf_line_number_ops
DW_LNS_set_basic_block = 7,
DW_LNS_const_add_pc = 8,
DW_LNS_fixed_advance_pc = 9,
/* DWARF 3 */
/* DWARF 3. */
DW_LNS_set_prologue_end = 10,
DW_LNS_set_epilogue_begin = 11,
DW_LNS_set_isa = 12
@ -624,9 +627,10 @@ enum dwarf_call_frame_info
DW_CFA_def_cfa = 0x0c,
DW_CFA_def_cfa_register = 0x0d,
DW_CFA_def_cfa_offset = 0x0e,
/* DWARF 3. */
DW_CFA_def_cfa_expression = 0x0f,
DW_CFA_expression = 0x10,
/* Dwarf 2.1. */
DW_CFA_offset_extended_sf = 0x11,
DW_CFA_def_cfa_sf = 0x12,
DW_CFA_def_cfa_offset_sf = 0x13,
@ -666,7 +670,7 @@ enum dwarf_source_language
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
DW_LANG_Java = 0x000b,
/* DWARF 2.1. */
/* DWARF 3. */
DW_LANG_C99 = 0x000c,
DW_LANG_Ada95 = 0x000d,
DW_LANG_Fortran95 = 0x000e,

View File

@ -53,5 +53,6 @@ START_RELOC_NUMBERS (elf_m68k_reloc_type)
END_RELOC_NUMBERS (R_68K_max)
#define EF_CPU32 0x00810000
#define EF_M68000 0x01000000
#endif

View File

@ -1,5 +1,5 @@
/* MMIX support for BFD.
Copyright (C) 2001 Free Software Foundation, Inc.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -82,7 +82,10 @@ START_RELOC_NUMBERS (elf_mmix_reloc_type)
/* A general register. */
RELOC_NUMBER (R_MMIX_REG, 33)
/* A global register and an offset, equivalent of the expression. */
/* A global register and an offset, the global register (allocated at
link time) contents plus the offset made equivalent to the relocation
expression at link time. The relocation must point at the Y field of
an instruction. */
RELOC_NUMBER (R_MMIX_BASE_PLUS_OFFSET, 34)
/* A LOCAL assertion. */
@ -107,6 +110,11 @@ END_RELOC_NUMBERS (R_MMIX_max)
unspecified) ABI. */
#define MMIX_REG_CONTENTS_SECTION_NAME ".MMIX.reg_contents"
/* At link time, a section by this name is created, expected to be
included in MMIX_REG_CONTENTS_SECTION_NAME in the output. */
#define MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME \
".MMIX.reg_contents.linker_allocated"
/* This is a faked section holding symbols with SHN_REGISTER. Don't
confuse it with MMIX_REG_CONTENTS_SECTION_NAME; this one has no
contents, just values. It is an error for a value in this section to
@ -148,4 +156,13 @@ END_RELOC_NUMBERS (R_MMIX_max)
#define MMO_SEC_IS_COMMON 0x8000
#define MMO_SEC_DEBUGGING 0x10000
#ifdef BFD_ARCH_SIZE
extern boolean _bfd_mmix_prepare_linker_allocated_gregs
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_mmix_finalize_linker_allocated_gregs
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_mmix_check_all_relocs
PARAMS ((bfd *, struct bfd_link_info *));
#endif
#endif /* ELF_MMIX_H */

View File

@ -0,0 +1,62 @@
/* OR1K ELF support for BFD. Derived from ppc.h.
Copyright (C) 2002 Free Software Foundation, Inc.
Contributed by Ivan Guzvinec <ivang@opencores.org>
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _ELF_OR1K_H
#define _ELF_OR1K_H
#include "elf/reloc-macros.h"
/* Relocations. */
START_RELOC_NUMBERS (elf_or32_reloc_type)
RELOC_NUMBER (R_OR32_NONE, 0)
RELOC_NUMBER (R_OR32_32, 1)
RELOC_NUMBER (R_OR32_16, 2)
RELOC_NUMBER (R_OR32_8, 3)
RELOC_NUMBER (R_OR32_CONST, 4)
RELOC_NUMBER (R_OR32_CONSTH, 5)
RELOC_NUMBER (R_OR32_JUMPTARG, 6)
RELOC_NUMBER (R_OR32_GNU_VTENTRY, 7)
RELOC_NUMBER (R_OR32_GNU_VTINHERIT, 8)
END_RELOC_NUMBERS (R_OR32_max)
/* Four bit OR32 machine type field. */
#define EF_OR32_MACH 0x0000000f
/* Various CPU types. */
#define E_OR32_MACH_BASE 0x00000000
#define E_OR32_MACH_UNUSED1 0x00000001
#define E_OR32_MACH_UNUSED2 0x00000002
#define E_OR32_MACH_UNUSED4 0x00000003
/* Processor specific section headers, sh_type field */
#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
entries in this section \
based on the address \
specified in the associated \
symbol table entry. */
/* Processor specific section flags, sh_flags field */
#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
this section from executable \
and shared objects that it \
builds when those objects \
are not to be furhter \
relocated. */
#endif /* _ELF_OR1K_H */

View File

@ -174,6 +174,10 @@ END_RELOC_NUMBERS (R_PPC_max)
/* Specify the start of the .glink section. */
#define DT_PPC64_GLINK DT_LOPROC
/* Specify the start and size of the .opd section. */
#define DT_PPC64_OPD (DT_LOPROC + 1)
#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
/* Processor specific flags for the ELF header e_flags field. */
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */

View File

@ -1,5 +1,5 @@
/* SH ELF support for BFD.
Copyright 1998, 2000 Free Software Foundation, Inc.
Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -34,6 +34,9 @@
#define EF_SH3E 8
#define EF_SH4 9
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
#define EF_SH_MERGE_MACH(mach1, mach2) \
(((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
|| ((mach1) == EF_SH_DSP \
@ -47,6 +50,77 @@
? EF_SH4 \
: ((mach1) > (mach2) ? (mach1) : (mach2)))
/* Flags for the st_other symbol field.
Keep away from the STV_ visibility flags (bit 0..1). */
/* A reference to this symbol should by default add 1. */
#define STO_SH5_ISA32 (1 << 2)
/* Section contains only SHmedia code (no SHcompact code). */
#define SHF_SH5_ISA32 0x40000000
/* Section contains both SHmedia and SHcompact code, and possibly also
constants. */
#define SHF_SH5_ISA32_MIXED 0x20000000
/* If applied to a .cranges section, marks that the section is sorted by
increasing cr_addr values. */
#define SHT_SH5_CR_SORTED 0x80000001
/* Symbol should be handled as DataLabel (attached to global SHN_UNDEF
symbols). */
#define STT_DATALABEL STT_LOPROC
#define SH64_CRANGES_SECTION_NAME ".cranges"
enum sh64_elf_cr_type {
CRT_NONE = 0,
CRT_DATA = 1,
CRT_SH5_ISA16 = 2,
CRT_SH5_ISA32 = 3
};
/* The official definition is this:
typedef struct {
Elf32_Addr cr_addr;
Elf32_Word cr_size;
Elf32_Half cr_type;
} Elf32_CRange;
but we have no use for that exact type. Instead we use this struct for
the internal representation. */
typedef struct {
bfd_vma cr_addr;
bfd_size_type cr_size;
enum sh64_elf_cr_type cr_type;
} sh64_elf_crange;
#define SH64_CRANGE_SIZE (4 + 4 + 2)
#define SH64_CRANGE_CR_ADDR_OFFSET 0
#define SH64_CRANGE_CR_SIZE_OFFSET 4
#define SH64_CRANGE_CR_TYPE_OFFSET (4 + 4)
/* Get the contents type of an arbitrary address, or return CRT_NONE. */
extern enum sh64_elf_cr_type sh64_get_contents_type
PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
/* Simpler interface.
FIXME: This seems redundant now that we export the interface above. */
extern boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
/* We put this in elf_section_data (section)->tdata. */
struct sh64_section_data
{
flagword contents_flags;
/* Only used in the cranges section, but we don't have an official
backend-specific bfd field. */
bfd_size_type cranges_growth;
};
#define sh64_elf_section_data(sec) \
((struct sh64_section_data *) ((elf_section_data (sec))->tdata))
#include "elf/reloc-macros.h"
/* Relocations. */
@ -79,7 +153,16 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_LOOP_START, 36)
RELOC_NUMBER (R_SH_LOOP_END, 37)
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 38)
FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 159)
FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 44)
RELOC_NUMBER (R_SH_DIR5U, 45)
RELOC_NUMBER (R_SH_DIR6U, 46)
RELOC_NUMBER (R_SH_DIR6S, 47)
RELOC_NUMBER (R_SH_DIR10S, 48)
RELOC_NUMBER (R_SH_DIR10SW, 49)
RELOC_NUMBER (R_SH_DIR10SL, 50)
RELOC_NUMBER (R_SH_DIR10SQ, 51)
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 52)
FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 159)
RELOC_NUMBER (R_SH_GOT32, 160)
RELOC_NUMBER (R_SH_PLT32, 161)
RELOC_NUMBER (R_SH_COPY, 162)
@ -88,6 +171,51 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_RELATIVE, 165)
RELOC_NUMBER (R_SH_GOTOFF, 166)
RELOC_NUMBER (R_SH_GOTPC, 167)
RELOC_NUMBER (R_SH_GOTPLT32, 168)
RELOC_NUMBER (R_SH_GOT_LOW16, 169)
RELOC_NUMBER (R_SH_GOT_MEDLOW16, 170)
RELOC_NUMBER (R_SH_GOT_MEDHI16, 171)
RELOC_NUMBER (R_SH_GOT_HI16, 172)
RELOC_NUMBER (R_SH_GOTPLT_LOW16, 173)
RELOC_NUMBER (R_SH_GOTPLT_MEDLOW16, 174)
RELOC_NUMBER (R_SH_GOTPLT_MEDHI16, 175)
RELOC_NUMBER (R_SH_GOTPLT_HI16, 176)
RELOC_NUMBER (R_SH_PLT_LOW16, 177)
RELOC_NUMBER (R_SH_PLT_MEDLOW16, 178)
RELOC_NUMBER (R_SH_PLT_MEDHI16, 179)
RELOC_NUMBER (R_SH_PLT_HI16, 180)
RELOC_NUMBER (R_SH_GOTOFF_LOW16, 181)
RELOC_NUMBER (R_SH_GOTOFF_MEDLOW16, 182)
RELOC_NUMBER (R_SH_GOTOFF_MEDHI16, 183)
RELOC_NUMBER (R_SH_GOTOFF_HI16, 184)
RELOC_NUMBER (R_SH_GOTPC_LOW16, 185)
RELOC_NUMBER (R_SH_GOTPC_MEDLOW16, 186)
RELOC_NUMBER (R_SH_GOTPC_MEDHI16, 187)
RELOC_NUMBER (R_SH_GOTPC_HI16, 188)
RELOC_NUMBER (R_SH_GOT10BY4, 189)
RELOC_NUMBER (R_SH_GOTPLT10BY4, 190)
RELOC_NUMBER (R_SH_GOT10BY8, 191)
RELOC_NUMBER (R_SH_GOTPLT10BY8, 192)
RELOC_NUMBER (R_SH_COPY64, 193)
RELOC_NUMBER (R_SH_GLOB_DAT64, 194)
RELOC_NUMBER (R_SH_JMP_SLOT64, 195)
RELOC_NUMBER (R_SH_RELATIVE64, 196)
FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 197)
FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 241)
RELOC_NUMBER (R_SH_SHMEDIA_CODE, 242)
RELOC_NUMBER (R_SH_PT_16, 243)
RELOC_NUMBER (R_SH_IMMS16, 244)
RELOC_NUMBER (R_SH_IMMU16, 245)
RELOC_NUMBER (R_SH_IMM_LOW16, 246)
RELOC_NUMBER (R_SH_IMM_LOW16_PCREL, 247)
RELOC_NUMBER (R_SH_IMM_MEDLOW16, 248)
RELOC_NUMBER (R_SH_IMM_MEDLOW16_PCREL, 249)
RELOC_NUMBER (R_SH_IMM_MEDHI16, 250)
RELOC_NUMBER (R_SH_IMM_MEDHI16_PCREL, 251)
RELOC_NUMBER (R_SH_IMM_HI16, 252)
RELOC_NUMBER (R_SH_IMM_HI16_PCREL, 253)
RELOC_NUMBER (R_SH_64, 254)
RELOC_NUMBER (R_SH_64_PCREL, 255)
END_RELOC_NUMBERS (R_SH_max)
#endif

View File

@ -1,6 +1,6 @@
/* Function declarations for libiberty.
Copyright 2001 Free Software Foundation, Inc.
Copyright 2001, 2002 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
@ -283,7 +283,7 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
also set/unset as it is often used to indicate whether code needs
to call alloca(0). */
extern PTR C_alloca PARAMS((size_t));
extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
#undef alloca
#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
# define alloca(x) __builtin_alloca(x)

View File

@ -1,3 +1,22 @@
Mon Feb 18 17:26:10 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.h (push,pop): Fix Reg64 to WordReg to allow 16bit operands.
Fri Feb 15 15:16:40 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.h (push,pop): Allow 16bit operands in 64bit mode.
(xchg): Fix.
(in, out): Disable 64bit operands.
(call, jmp): Avoid REX prefixes.
(jcxz): Prohibit in 64bit mode
(jrcxz, loop): Add 64bit variants.
(movq): Fix patterns.
(movmskps, pextrw, pinstrw): Add 64bit variants.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* or32.h: New file.
2002-01-22 Graydon Hoare <graydon@redhat.com>
* cgen.h (CGEN_MAYBE_MULTI_IFLD): New structure.
@ -118,11 +137,26 @@ Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
* ppc.h: Revert 2001-08-08.
2001-08-10 Richard Sandiford <rsandifo@redhat.com>
* mips.h (INSN_GP32): Remove.
(OPCODE_IS_MEMBER): Remove gp32 parameter.
(M_MOVE): New macro identifier.
2001-08-08 Alan Modra <amodra@one.net.au>
1999-10-25 Torbjorn Granlund <tege@swox.com>
* ppc.h (struct powerpc_operand): New field `reloc'.
2001-08-01 Aldy Hernandez <aldyh@redhat.com>
* mips.h (INSN_ISA_MASK): Nuke bits 12-15.
2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
* cgen.h (CGEN_INSN): Add regex support.
(build_insn_regex): Declare.
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
* cgen.h (CGEN_MACH): Add insn_chunk_bitsize field.

View File

@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Perhaps the definition of bfd_vma can be moved outside of bfd.h.
Or perhaps one could duplicate its definition in another file.
Until such time, this file conditionally compiles definitions that require
bfd_vma using BFD_VERSION. */
bfd_vma using BFD_VERSION_DATE. */
/* Enums must be defined before they can be used.
Allow them to be used in struct definitions, even though the enum must
@ -276,7 +276,7 @@ typedef const char * (cgen_parse_fn)
PC is the pc value of the insn.
The result is an error message or NULL if success. */
#ifdef BFD_VERSION
#ifdef BFD_VERSION_DATE
typedef const char * (cgen_insert_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
@ -297,7 +297,7 @@ typedef const char * (cgen_insert_fn) ();
PC is the pc value of the insn.
The result is the length of the insn in bits or zero if not recognized. */
#ifdef BFD_VERSION
#ifdef BFD_VERSION_DATE
typedef int (cgen_extract_fn)
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
@ -316,7 +316,7 @@ typedef int (cgen_extract_fn) ();
PC is the pc value of the insn.
LEN is the length of the insn, in bits. */
#ifdef BFD_VERSION
#ifdef BFD_VERSION_DATE
typedef void (cgen_print_fn)
PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
@ -381,7 +381,7 @@ enum cgen_parse_operand_result
CGEN_PARSE_OPERAND_RESULT_ERROR
};
#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
typedef const char * (cgen_parse_operand_fn)
PARAMS ((CGEN_CPU_DESC,
enum cgen_parse_operand_type, const char **, int, int,
@ -565,7 +565,7 @@ const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
extern const char *cgen_parse_keyword
PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
#ifdef BFD_VERSION_DATE /* Don't require bfd.h unnecessarily. */
extern const char *cgen_parse_signed_integer
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
extern const char *cgen_parse_unsigned_integer
@ -1253,7 +1253,7 @@ typedef struct cgen_cpu_desc
const char * (*parse_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
CGEN_FIELDS *fields_));
#ifdef BFD_VERSION
#ifdef BFD_VERSION_DATE
const char * (*insert_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
CGEN_INSN_BYTES_PTR, bfd_vma pc_));
@ -1286,7 +1286,7 @@ typedef struct cgen_cpu_desc
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_int_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
#ifdef BFD_VERSION
#ifdef BFD_VERSION_DATE
bfd_vma (*get_vma_operand)
PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
void (*set_vma_operand)

View File

@ -62,6 +62,7 @@ static const template i386_optab[] = {
#define wl_Suf (No_bSuf|No_sSuf|No_xSuf|No_qSuf)
#define wlq_Suf (No_bSuf|No_sSuf|No_xSuf)
#define lq_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf)
#define wq_Suf (No_bSuf|No_lSuf|No_sSuf|No_xSuf)
#define sl_Suf (No_bSuf|No_wSuf|No_xSuf|No_qSuf)
#define sldx_Suf (No_bSuf|No_wSuf|No_qSuf)
#define bwl_Suf (No_sSuf|No_xSuf|No_qSuf)
@ -148,12 +149,12 @@ static const template i386_optab[] = {
{"push", 1, 0x06, X, 0|CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
/* In 64bit mode, the operand size is implicitly 64bit. */
{"push", 1, 0x50, X, Cpu64, q_Suf|ShortForm|DefaultSize|NoRex64, { Reg64, 0, 0 } },
{"push", 1, 0xff, 6, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64, { Reg64|WordMem, 0, 0 } },
{"push", 1, 0x6a, X, Cpu186|Cpu64, q_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
{"push", 1, 0x68, X, Cpu186|Cpu64, q_Suf|DefaultSize|NoRex64, { Imm32S, 0, 0} },
{"push", 1, 0x06, X, Cpu64, q_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, Cpu386|Cpu64, q_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"push", 1, 0x50, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { WordReg, 0, 0 } },
{"push", 1, 0xff, 6, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
{"push", 1, 0x6a, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
{"push", 1, 0x68, X, Cpu186|Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm32S|Imm16, 0, 0} },
{"push", 1, 0x06, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, Cpu386|Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"pusha", 0, 0x60, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
@ -164,10 +165,10 @@ static const template i386_optab[] = {
{"pop", 1, 0x07, X, CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
/* In 64bit mode, the operand size is implicitly 64bit. */
{"pop", 1, 0x58, X, Cpu64, q_Suf|ShortForm|DefaultSize|NoRex64, { Reg64, 0, 0 } },
{"pop", 1, 0x8f, 0, Cpu64, q_Suf|Modrm|DefaultSize|NoRex64, { Reg64|WordMem, 0, 0 } },
{"pop", 1, 0x07, X, Cpu64, q_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, Cpu64, q_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"pop", 1, 0x58, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { WordReg, 0, 0 } },
{"pop", 1, 0x8f, 0, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { WordReg|WordMem, 0, 0 } },
{"pop", 1, 0x07, X, Cpu64, wq_Suf|Seg2ShortForm|DefaultSize|NoRex64, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
{"popa", 0, 0x61, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
@ -176,20 +177,20 @@ static const template i386_optab[] = {
In the 64bit code, xchg eax, eax is reused for new nop instruction.
*/
{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { WordReg, Acc, 0 } },
{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { Acc, WordReg, 0 } },
{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
/* In/out from ports. */
{"in", 2, 0xe4, X, 0, bwlq_Suf|W, { Imm8, Acc, 0 } },
{"in", 2, 0xec, X, 0, bwlq_Suf|W, { InOutPortReg, Acc, 0 } },
{"in", 1, 0xe4, X, 0, bwlq_Suf|W, { Imm8, 0, 0 } },
{"in", 1, 0xec, X, 0, bwlq_Suf|W, { InOutPortReg, 0, 0 } },
{"out", 2, 0xe6, X, 0, bwlq_Suf|W, { Acc, Imm8, 0 } },
{"out", 2, 0xee, X, 0, bwlq_Suf|W, { Acc, InOutPortReg, 0 } },
{"out", 1, 0xe6, X, 0, bwlq_Suf|W, { Imm8, 0, 0 } },
{"out", 1, 0xee, X, 0, bwlq_Suf|W, { InOutPortReg, 0, 0 } },
{"in", 2, 0xe4, X, 0, bwl_Suf|W, { Imm8, Acc, 0 } },
{"in", 2, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
{"in", 1, 0xe4, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
{"in", 1, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
{"out", 2, 0xe6, X, 0, bwl_Suf|W, { Acc, Imm8, 0 } },
{"out", 2, 0xee, X, 0, bwl_Suf|W, { Acc, InOutPortReg, 0 } },
{"out", 1, 0xe6, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
{"out", 1, 0xee, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
/* Load effective address. */
{"lea", 2, 0x8d, X, 0, wlq_Suf|Modrm, { WordMem, WordReg, 0 } },
@ -210,9 +211,9 @@ static const template i386_optab[] = {
{"lahf", 0, 0x9f, X, CpuNo64,NoSuf, { 0, 0, 0} },
{"sahf", 0, 0x9e, X, CpuNo64,NoSuf, { 0, 0, 0} },
{"pushf", 0, 0x9c, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
{"pushf", 0, 0x9c, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
{"pushf", 0, 0x9c, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
{"popf", 0, 0x9d, X, CpuNo64,wlq_Suf|DefaultSize, { 0, 0, 0} },
{"popf", 0, 0x9d, X, Cpu64, q_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
{"popf", 0, 0x9d, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
{"stc", 0, 0xf9, X, 0, NoSuf, { 0, 0, 0} },
{"std", 0, 0xfd, X, 0, NoSuf, { 0, 0, 0} },
{"sti", 0, 0xfb, X, 0, NoSuf, { 0, 0, 0} },
@ -370,7 +371,8 @@ static const template i386_optab[] = {
/* Control transfer instructions. */
{"call", 1, 0xe8, X, 0, wlq_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
{"call", 1, 0xff, 2, 0, wlq_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
{"call", 1, 0xff, 2, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
{"call", 1, 0xff, 2, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64,{ WordReg|WordMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
{"call", 2, 0x9a, X, CpuNo64,wlq_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
/* Intel Syntax */
@ -381,7 +383,8 @@ static const template i386_optab[] = {
#define JUMP_PC_RELATIVE 0xeb
{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp, 0, 0} },
{"jmp", 1, 0xff, 4, 0, wlq_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
{"jmp", 1, 0xff, 4, CpuNo64, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
{"jmp", 1, 0xff, 4, Cpu64, wq_Suf|Modrm|NoRex64, { WordReg|WordMem|JumpAbsolute, 0, 0} },
/* Intel Syntax */
{"jmp", 2, 0xea, X, CpuNo64,wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
/* Intel Syntax */
@ -432,18 +435,25 @@ static const template i386_optab[] = {
{"jg", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
/* jcxz vs. jecxz is chosen on the basis of the address size prefix. */
{"jcxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size16, { Disp, 0, 0} },
{"jecxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size32, { Disp, 0, 0} },
{"jcxz", 1, 0xe3, X, CpuNo64,NoSuf|JumpByte|Size16, { Disp, 0, 0} },
{"jecxz", 1, 0xe3, X, CpuNo64,NoSuf|JumpByte|Size32, { Disp, 0, 0} },
{"jecxz", 1, 0x67e3, X, Cpu64,NoSuf|JumpByte|Size32, { Disp, 0, 0} },
{"jrcxz", 1, 0xe3, X, Cpu64, NoSuf|JumpByte|Size64|NoRex64, { Disp, 0, 0} },
/* The loop instructions also use the address size prefix to select
%cx rather than %ecx for the loop count, so the `w' form of these
instructions emit an address size prefix rather than a data size
prefix. */
{"loop", 1, 0xe2, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
{"loopz", 1, 0xe1, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
{"loope", 1, 0xe1, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
{"loopnz", 1, 0xe0, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
{"loopne", 1, 0xe0, X, 0, wlq_Suf|JumpByte, { Disp, 0, 0} },
{"loop", 1, 0xe2, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
{"loop", 1, 0xe2, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
{"loopz", 1, 0xe1, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
{"loopz", 1, 0xe1, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
{"loope", 1, 0xe1, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
{"loope", 1, 0xe1, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
{"loopnz", 1, 0xe0, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
{"loopnz", 1, 0xe0, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
{"loopne", 1, 0xe0, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
{"loopne", 1, 0xe0, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
/* Set byte on flag instructions. */
{"seto", 1, 0x0f90, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
@ -482,10 +492,10 @@ static const template i386_optab[] = {
{"cmps", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
{"scmp", 0, 0xa6, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
{"scmp", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
{"ins", 0, 0x6c, X, Cpu186, bwlq_Suf|W|IsString, { 0, 0, 0} },
{"ins", 2, 0x6c, X, Cpu186, bwlq_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
{"outs", 0, 0x6e, X, Cpu186, bwlq_Suf|W|IsString, { 0, 0, 0} },
{"outs", 2, 0x6e, X, Cpu186, bwlq_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
{"ins", 0, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
{"ins", 2, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
{"outs", 0, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
{"outs", 2, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
{"lods", 0, 0xac, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
{"lods", 1, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, 0, 0} },
{"lods", 2, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, Acc, 0} },
@ -971,12 +981,16 @@ static const template i386_optab[] = {
{"movd", 2, 0x660f6e,X,CpuSSE2,FP|Modrm, { Reg32|LLongMem, RegXMM, 0 } },
{"movd", 2, 0x660f7e,X,CpuSSE2,FP|Modrm, { RegXMM, Reg32|LLongMem, 0 } },
/* Real MMX instructions. */
{"movd", 2, 0x0f6e, X, CpuMMX, FP|Modrm, { Reg64|LLongMem, RegMMX, 0 } },
{"movd", 2, 0x0f7e, X, CpuMMX, FP|Modrm, { RegMMX, Reg64|LLongMem, 0 } },
{"movd", 2, 0x660f6e,X,CpuSSE2,FP|Modrm, { Reg64|LLongMem, RegXMM, 0 } },
{"movd", 2, 0x660f7e,X,CpuSSE2,FP|Modrm, { RegXMM, Reg64|LLongMem, 0 } },
/* In the 64bit mode the short form mov immediate is redefined to have
64bit displacement value. */
{"movq", 2, 0x0f6f, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
{"movq", 2, 0x0f7f, X, CpuMMX, FP|Modrm, { RegMMX, RegMMX|LongMem, 0 } },
{"movq", 2, 0xf30f7e,X,CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"movq", 2, 0x660fd6,X,CpuSSE2,FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
/* In the 64bit mode the short form mov immediate is redefined to have
64bit displacement value. */
{"movq", 2, 0x88, X, Cpu64, NoSuf|D|W|Modrm|Size64,{ Reg64, Reg64|AnyMem, 0 } },
{"movq", 2, 0xc6, 0, Cpu64, NoSuf|W|Modrm|Size64, { Imm32S, Reg64|WordMem, 0 } },
{"movq", 2, 0xb0, X, Cpu64, NoSuf|W|ShortForm|Size64,{ Imm64, Reg64, 0 } },
@ -1140,7 +1154,7 @@ static const template i386_optab[] = {
{"movlhps", 2, 0x0f16, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
{"movlps", 2, 0x0f12, X, CpuSSE, FP|Modrm, { LLongMem, RegXMM, 0 } },
{"movlps", 2, 0x0f13, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
{"movmskps", 2, 0x0f50, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
{"movmskps", 2, 0x0f50, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
{"movntps", 2, 0x0f2b, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
{"movntq", 2, 0x0fe7, X, CpuSSE, FP|Modrm, { RegMMX, LLongMem, 0 } },
{"movntdq", 2, 0x660fe7, X, CpuSSE2,FP|Modrm, { RegXMM, LLongMem, 0 } },
@ -1155,10 +1169,10 @@ static const template i386_optab[] = {
{"pavgb", 2, 0x660fe0, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"pavgw", 2, 0x0fe3, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
{"pavgw", 2, 0x660fe3, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"pextrw", 3, 0x0fc5, X, CpuSSE, FP|Modrm, { Imm8, RegMMX|InvMem, Reg32 } },
{"pextrw", 3, 0x660fc5, X, CpuSSE2,FP|Modrm, { Imm8, RegXMM|InvMem, Reg32 } },
{"pinsrw", 3, 0x0fc4, X, CpuSSE, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } },
{"pinsrw", 3, 0x660fc4, X, CpuSSE2, FP|Modrm, { Imm8, Reg32|ShortMem, RegXMM } },
{"pextrw", 3, 0x0fc5, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { Imm8, RegMMX|InvMem, Reg32|Reg64 } },
{"pextrw", 3, 0x660fc5, X, CpuSSE2,lq_Suf|IgnoreSize|Modrm, { Imm8, RegXMM|InvMem, Reg32|Reg64 } },
{"pinsrw", 3, 0x0fc4, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { Imm8, Reg32|Reg64|ShortMem, RegMMX } },
{"pinsrw", 3, 0x660fc4, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm, { Imm8, Reg32|Reg64|ShortMem, RegXMM } },
{"pmaxsw", 2, 0x0fee, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
{"pmaxsw", 2, 0x660fee, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"pmaxub", 2, 0x0fde, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
@ -1167,8 +1181,8 @@ static const template i386_optab[] = {
{"pminsw", 2, 0x660fea, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"pminub", 2, 0x0fda, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
{"pminub", 2, 0x660fda, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"pmovmskb", 2, 0x0fd7, X, CpuSSE, FP|Modrm, { RegMMX|InvMem, Reg32, 0 } },
{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
{"pmovmskb", 2, 0x0fd7, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegMMX|InvMem, Reg32|Reg64, 0 } },
{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
{"pmulhuw", 2, 0x0fe4, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
{"pmulhuw", 2, 0x660fe4, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"prefetchnta", 1, 0x0f18, 0, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
@ -1233,7 +1247,7 @@ static const template i386_optab[] = {
{"movhpd", 2, 0x660f17, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } },
{"movlpd", 2, 0x660f12, X, CpuSSE2, FP|Modrm, { LLongMem, RegXMM, 0 } },
{"movlpd", 2, 0x660f13, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } },
{"movmskpd", 2, 0x660f50, X, CpuSSE2, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
{"movmskpd", 2, 0x660f50, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
{"movntpd", 2, 0x660f2b, X, CpuSSE2, FP|Modrm, { RegXMM, LLongMem, 0 } },
{"movsd", 2, 0xf20f10, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
{"movsd", 2, 0xf20f11, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LongMem, 0 } },

View File

@ -1,3 +1,259 @@
2002-02-20 Andreas Schwab <schwab@suse.de>
* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't fold
.IA64_unwind* in a relocatable link.
2002-02-19 David O'Brien <obrien@FreeBSD.org>
* Makefile.am: Add new files earmelf_fbsd, eelf32ppc_fbsd,
eelf_i386_fbsd, eelf64_ia64_fbsd, eelf_x86_64_fbsd, eelf64_sparc_fbsd,
and eelf64alpha_fbsd.
* Makefile.in: Regenerate.
* configure.tgt(sparc64-*-freebsd, ia64-*-freebsd, i[3456]86-*-freebsd,
x86_64-*-freebsd, arm-*-freebsd, alpha*-*-freebsd, powerpc-*-freebsd):
use a FreeBSD-specific emulation rather than the psABI one.
* emulparams/elf_fbsd.sh (ELF_INTERPRETER_NAME): Set appropriate value
for all FreeBSD ELF systems.
* emulparams/armelf_fbsd.sh: Bridge elf_fbsd.sh and the "native" psABI
emulation.
* emulparams/elf32ppc_fbsd.sh: Likewise.
* emulparams/elf64_ia64_fbsd.sh: Likewise.
* emulparams/elf64_sparc_fbsd.sh: Likewise.
* emulparams/elf64alpha_fbsd.sh: Likewise.
* emulparams/elf_i386_fbsd.sh: Likewise.
* emulparams/elf_x86_64_fbsd.sh: Likewise.
2002-02-15 Richard Henderson <rth@redhat.com>
* emulparams/elf64alpha.sh (NOP): Adjust for little-endian definition.
2002-02-15 Hans-Peter Nilsson <hp@bitrange.com>
* NEWS: Mention support for MMIX.
2002-02-14 Phil Edwards <pme@gcc.gnu.org>
* ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
* ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
the pattern in question is not a regexp.
* ldlang.c: Likewise.
* ldlang.h: Likewise.
* ldlex.l (V_IDENTIFIER): Allow '[', ']', '-', '!', and '^' also.
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* lexsup.c: Remove strtoul declaration.
2002-02-11 Alan Modra <amodra@bigpond.net.au>
* ldlang.c (entry_section): New initialised variable.
(lang_finish): Use it.
* ldlang.h (entry_section): Declare.
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Set
entry_section to ".opd".
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* ldmain.c: Add prototype for main ().
* lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
* emultempl/lnk960.em (lnk960_choose_target): Function should
take two arguments.
2002-02-09 Chris Demetriou <cgd@broadcom.com>
* ld.texinfo (Options): Add back in -nostdlib documentation,
which had been inadvertently removed.
2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Adjust
register section vma to a sane value after emitting error. Make
fatal conditions cause program exit when emitting message.
2002-02-08 Ivan Guzvinec <ivang@opencores.org>
* configure.tgt: Add or32-*-rtems target.
2002-02-08 Alexandre Oliva <aoliva@redhat.com>
Contribute sh64-elf.
2002-01-24 Alexandre Oliva <aoliva@redhat.com>
* emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined
in OTHER_RELOCATABLE_SECTIONS.
2002-01-18 Alexandre Oliva <aoliva@redhat.com>
* emulparams/shelf32.sh (STACK_ADDR): Define.
(OTHER_RELOCATABLE_SECTIONS): Renamed to...
(OTHER_SECTIONS): this. Removed stack settings.
* emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set.
(OTHER_SECTIONS): Reset after sourcing shelf32.sh.
2001-03-12 DJ Delorie <dj@redhat.com>
* emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable
relaxing if any shmedia or mixed sections are found.
2001-03-07 DJ Delorie <dj@redhat.com>
* emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to
einfo. Gracefully decline to output to non-elf formats.
2001-03-06 Hans-Peter Nilsson <hpn@redhat.com>
* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>:
Default to _end aligned to next multiple of 0x40000, plus 0x40000.
* emulparams/shelf32.sh: Ditto.
2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak
comment.
2001-01-10 Ben Elliston <bje@redhat.com>
* emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid
non-portable shell constructs. From Hans-Peter Nilsson.
2001-01-09 Hans-Peter Nilsson <hpn@cygnus.com>
* emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty.
* Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust
dependencies to the shell script include chain.
* Makefile.in: Regenerate.
2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
* emultempl/sh64elf.em: Update and tweak comments.
(sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and
make a .cranges section SEC_IN_MEMORY.
2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
* emultempl/sh64elf.em
(sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when
.cranges section found to be necessary; continue and set stored
section contents flags for sections with non-mixed contents.
Use a struct sh64_section_data container and sh64_elf_section_data
to store contents-type flags.
Remove unused update of "isec".
(sh64_elf_${EMULATION_NAME}_after_allocation): Only process
sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to
access contents-type flags. Assert that the associated container
is initialized. Use that container, not elf_gp_size, to hold size
of linker-generated cranges contents.
2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
* emultempl/sh64elf.em
(sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if
there's already a .cranges section. When section flag difference
is found, don't NULL-check cranges a second time. Tweak comments.
(sh64_elf_${EMULATION_NAME}_after_allocation): Use size after
merging, not max size, as size of ld-generated .cranges contents.
Don't set ELF section flags in output section. When checking for
needed .cranges descriptors, don't use a variable; compare
incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak
comments.
2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
* emultempl/sh64elf.em: New file.
* Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies.
* Makefile.in: Regenerate.
* emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set.
(OTHER_RELOCATING_SECTIONS): Ditto.
(EXTRA_EM_FILE): New, set to sh64elf if not set.
* emulparams/shlelf32.sh: Stub out all settings except
OUTPUT_FORMAT. Source shelf32.sh.
* emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and
OTHER_RELOCATING_SECTIONS.
(OTHER_RELOCATING_SECTIONS): Remove .cranges.
* emulparams/shlelf64.sh: Stub out all settings except
OUTPUT_FORMAT. Source shelf64.sh.
2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com>
* emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include
.cranges section.
(DATA_START_SYMBOLS): Define, provide ___data.
(OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8
for consecutive .data section.
(OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss
section after .data section.
* emulparams/shlelf64.sh: Ditto.
* emulparams/shelf32.sh: Ditto.
(ALIGNMENT): Define to 8.
* emulparams/shelf32.sh: Ditto.
2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
* configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get
built-in linker scripts.
2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
* emulparams/shlelf64.sh: New.
* emulparams/shelf64.sh: New.
* configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to
targ_extra_emuls.
* Makefile.am: Add support for shlelf64 and shelf64.
* Makefile.in: Regenerate.
2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
* configure.tgt (sh64-*-elf*): Add shelf as default.
Add shlelf to targ_extra_emuls.
2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
* emulparams/shelf32.sh: New file.
* emulparams/shlelf32.sh: New file.
* Makefile.am: Add support for shlelf32 and shelf32.
* configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32.
* Makefile.in: Regenerate.
2002-02-05 Hans-Peter Nilsson <hp@axis.com>
* ldlang.c (lang_reset_memory_regions): Rename from
reset_memory_regions. Change all callers. Make public.
* ldlang.h (lang_reset_memory_regions): Prototype.
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): Call
lang_reset_memory_regions before lang_size_sections.
* emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Likewise.
2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Use signed
arithmetic when checking for too many global registers.
2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
* 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-01 Geoffrey Keating <geoffk@redhat.com>
* scripttempl/xstormy16.sc: Don't allocate extra space for the
stack.
2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
Support on-demand global register allocation from
R_MMIX_BASE_PLUS_OFFSET relocs.
* emultempl/mmix-elfnmmo.em (mmix_after_allocation): Rename from
mmix_set_reg_section_vma. Call
_bfd_mmix_finalize_linker_allocated_gregs.
(mmix_before_allocation): New function.
(LDEMUL_AFTER_ALLOCATION): Set to mmix_after_allocation.
(LDEMUL_BEFORE_ALLOCATION): Define to mmix_before_allocation.
* scripttempl/mmo.sc (.text): Mark .init, .fini as KEEP.
(.MMIX.reg_contents): Add .MMIX.reg_contents.linker_allocated
before .MMIX.reg_contents.
* emultempl/mmo.em (gldmmo_before_allocation): Define to default.
(mmo_after_open): New function.
(LDEMUL_AFTER_OPEN): Define to mmo_after_open.
* emulparams/elf64mmix.sh (OTHER_SECTIONS): Tweak formatting. Add
.MMIX.reg_contents.linker_allocated before .MMIX.reg_contents.
2002-01-31 Ivan Guzvinec <ivang@opencores.org>
* emulparams/or32.sh: New file.
* emulparams/or32elf.sh: New file.
* scripttempl/or32.sc: New file.
* configure.tgt : Add support for or32.
* configure: Regenerate
* Makefile.am: Add support for or32.
* Makefile.in: Regenerate.
* NEWS: Mention support for or32.
* po/ld.pot: Regenerate.
2002-01-29 Chris Demetriou <cgd@broadcom.com>
Mitch Lichtenberg <mpl@broadcom.com>
* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define to be mipself.
* emultempl/mipself.em: New file to handle MIPS ELF embedded
reloc creation (ld --embedded-relocs).
2002-01-27 Daniel Jacobowitz <drow@mvista.com>
* configure: Regenerated.
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
* Makefile.am (install): Depend on install-info.
@ -468,7 +724,7 @@
* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
(struct ld_emulation_xfer_struct): Use it.
Tue Nov 13 11:27:14 2001 Ross Alexander <ross.alexander@uk.neceur.com>
2001-11-13 Ross Alexander <ross.alexander@uk.neceur.com>
* emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
additional symbols referenced by newer crt0.o files from HP.
@ -821,7 +1077,7 @@ Tue Nov 13 11:27:14 2001 Ross Alexander <ross.alexander@uk.neceur.com>
* scripttempl/v850.sc: Add gcc_except_table sections.
Fri Sep 7 11:34:24 2001 Jeffrey A Law (law@cygnus.com)
2001-09-11 Jeffrey A Law (law@cygnus.com)
* emulparams/h8300helf.sh: Move stack to a much higher memory address.
* emulparams/h8300self.sh: Similarly.
@ -877,7 +1133,7 @@ Fri Sep 7 11:34:24 2001 Jeffrey A Law (law@cygnus.com)
ARCH specification.
* emulparams/h8300self.sh: Similarly.
Wed Aug 28 13:37:20 2001 J"orn Rennecke <amylaar@redhat.com>
2001-08-28 J"orn Rennecke <amylaar@redhat.com>
* Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
eh8300self.o .
@ -1978,7 +2234,7 @@ Wed Aug 28 13:37:20 2001 J"orn Rennecke <amylaar@redhat.com>
* emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
* emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
Mon Dec 11 14:50:33 MET 2000 Jan Hubicka <jh@suse.cz>
2000-12-11 Jan Hubicka <jh@suse.cz>
* NEWS: Add note about x86_64 architecture.
@ -2047,7 +2303,7 @@ Mon Dec 11 14:50:33 MET 2000 Jan Hubicka <jh@suse.cz>
* scripttempl/h8300h.sc: Likewise.
* scripttempl/h8300s.sc: Likewise.
Tue Nov 14 00:59:19 2000 Denis Chertykov <denisc@overta.ru>
2000-11-14 Denis Chertykov <denisc@overta.ru>
* scripttempl/elf32avr.sc: Fix bug in .eeprom segment.
@ -3006,7 +3262,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov <denisc@overta.ru>
* lexsup.c (parse_args): `i' == `r', not `q'.
Thu May 18 10:47:57 2000 Jeffrey A Law (law@cygnus.com)
2000-05-18 Jeffrey A Law (law@cygnus.com)
* configure.tgt (hppa*64*-*-*): Enable PA64 target.
@ -3047,7 +3303,7 @@ Thu May 18 10:47:57 2000 Jeffrey A Law (law@cygnus.com)
* lexsup.c (set_section_start): Use bfd_scan_vma rather than
strtoul.
Mon May 1 17:34:34 2000 Jim Wilson <wilson@cygnus.com>
2000-05-01 Jim Wilson <wilson@cygnus.com>
* configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
@ -3058,7 +3314,7 @@ Mon May 1 17:34:34 2000 Jim Wilson <wilson@cygnus.com>
* ld.h: Correctly check GCC version.
Tue Apr 25 11:20:43 2000 Jeffrey A Law (law@cygnus.com)
2000-04-25 Jeffrey A Law (law@cygnus.com)
* Makefile.am: Add PA64 support. Add missing dependencies for
PA32 elf support.
@ -3097,7 +3353,7 @@ Tue Apr 25 11:20:43 2000 Jeffrey A Law (law@cygnus.com)
* configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-04-21 Richard Henderson <rth@cygnus.com>
David Mosberger <davidm@hpl.hp.com>
* Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
@ -3177,7 +3433,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
* ld.texinfo (Simple Example): Remove extraneous paragraph.
Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
--enable-build-warnings option.
@ -3446,7 +3702,7 @@ Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
being invoked by a comnpiler driver program.
Fix description of the behaviour of the -n command line switch.
Wed Jan 5 08:02:12 2000 Catherine Moore <clm@cygnus.com>
2000-01-05 Catherine Moore <clm@cygnus.com>
* ld.h (wildcard_spec): Change exclude_name to exclude_name_list.
(name_list): New.

Some files were not shown because too many files have changed in this diff Show More