Import of Binutils from the FSF 2.12 branch (pre-.0 release).

These bits are taken from the FSF anoncvs repo on 21-Feburary-2002 20:15 PST.
This commit is contained in:
David E. O'Brien 2002-02-22 04:18:42 +00:00
parent dbbf32dd39
commit eb1d121cb5
158 changed files with 13413 additions and 4181 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
@ -92,7 +92,7 @@ DESCRIPTION
. available to machines with higher numbers.
. The exception is the "ca", which is
. incompatible with all other machines except
. "core". *}
. "core". *}
.
.#define bfd_mach_i960_core 1
.#define bfd_mach_i960_ka_sa 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,86 +318,88 @@ 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,
SELECT_ARCHITECTURES,
#else
&bfd_a29k_arch,
&bfd_alpha_arch,
&bfd_arc_arch,
&bfd_arm_arch,
&bfd_cris_arch,
&bfd_d10v_arch,
&bfd_d30v_arch,
&bfd_h8300_arch,
&bfd_h8500_arch,
&bfd_hppa_arch,
&bfd_i370_arch,
&bfd_i386_arch,
&bfd_i860_arch,
&bfd_i960_arch,
&bfd_m32r_arch,
&bfd_m68hc11_arch,
&bfd_m68hc12_arch,
&bfd_m68k_arch,
&bfd_m88k_arch,
&bfd_mips_arch,
&bfd_mn10200_arch,
&bfd_mn10300_arch,
&bfd_pdp11_arch,
&bfd_powerpc_arch,
&bfd_rs6000_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_xstormy16_arch,
&bfd_a29k_arch,
&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,
&bfd_i370_arch,
&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_v850_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;
@ -282,33 +292,40 @@ typedef const struct reloc_howto_struct reloc_howto_type;
#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
/* A canonical archive symbol. */
/* This is a type pun with struct ranlib on purpose! */
typedef struct carsym {
/* This is a type pun with struct ranlib on purpose! */
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 {
Perhaps just a forward definition would do? */
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 *));

File diff suppressed because it is too large Load Diff

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.
@ -36,127 +36,118 @@ CODE_FRAGMENT
.
.struct _bfd
.{
. {* The filename the application opened the BFD with. *}
. const char *filename;
. {* The filename the application opened the BFD with. *}
. const char *filename;
.
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
. {* A pointer to the target jump table. *}
. 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
. 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
. to a bfd_in_memory struct. *}
. PTR iostream;
. {* 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
. 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
. to a bfd_in_memory struct. *}
. PTR iostream;
.
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
. {* Is the file descriptor being cached? That is, can it be closed as
. needed, and re-opened when accessed later? *}
. boolean cacheable;
.
. 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;
.
. {* 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. *}
. {* The caching routines use these to maintain a
. least-recently-used list of BFDs. *}
. struct _bfd *lru_prev, *lru_next;
.
. boolean target_defaulted;
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here... *}
. ufile_ptr where;
.
. {* The caching routines use these to maintain a
. least-recently-used list of BFDs *}
. {* ... and here: (``once'' means at least once). *}
. boolean opened_once;
.
. struct _bfd *lru_prev, *lru_next;
. {* Set if we have a locally maintained mtime value, rather than
. getting it from the file each time. *}
. boolean mtime_set;
.
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
. {* File modified time, if mtime_set is true. *}
. long mtime;
.
. ufile_ptr where;
. {* Reserved for an unimplemented file locking extension. *}
. int ifd;
.
. {* and here: (``once'' means at least once) *}
. {* The format which belongs to the BFD. (object, core, etc.) *}
. bfd_format format;
.
. boolean opened_once;
. {* The direction with which the BFD was opened. *}
. enum bfd_direction
. {
. no_direction = 0,
. read_direction = 1,
. write_direction = 2,
. both_direction = 3
. }
. direction;
.
. {* Set if we have a locally maintained mtime value, rather than
. getting it from the file each time: *}
. {* Format_specific flags. *}
. flagword flags;
.
. boolean mtime_set;
. {* 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;
.
. {* File modified time, if mtime_set is true: *}
. {* Remember when output has begun, to stop strange things
. from happening. *}
. boolean output_has_begun;
.
. long mtime;
. {* A hash table for section names. *}
. struct bfd_hash_table section_htab;
.
. {* Reserved for an unimplemented file locking extension.*}
. {* Pointer to linked list of sections. *}
. struct sec *sections;
.
. int ifd;
. {* The place where we add to the section list. *}
. struct sec **section_tail;
.
. {* The format which belongs to the BFD. (object, core, etc.) *}
. {* The number of sections. *}
. unsigned int section_count;
.
. bfd_format format;
. {* Stuff only useful for object files:
. The start address. *}
. bfd_vma start_address;
.
. {* The direction the BFD was opened with*}
. {* Used for input and output. *}
. unsigned int symcount;
.
. enum bfd_direction {no_direction = 0,
. read_direction = 1,
. write_direction = 2,
. both_direction = 3} direction;
. {* Symbol table for output BFD (with symcount entries). *}
. struct symbol_cache_entry **outsymbols;
.
. {* Format_specific flags*}
. {* Pointer to structure which contains architecture information. *}
. const struct bfd_arch_info *arch_info;
.
. flagword flags;
. {* 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. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
. boolean has_armap;
.
. {* 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. *}
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
.
. ufile_ptr origin;
. {* A field used by _bfd_generic_link_add_archive_symbols. This will
. be used only for archive elements. *}
. int archive_pass;
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
. boolean output_has_begun;
.
. {* A hash table for section names. *}
. struct bfd_hash_table section_htab;
.
. {* Pointer to linked list of sections. *}
. struct sec *sections;
.
. {* The place where we add to the section list. *}
. struct sec **section_tail;
.
. {* 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*}
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries) *}
. struct symbol_cache_entry **outsymbols;
.
. {* Pointer to structure which contains architecture information*}
. const struct bfd_arch_info *arch_info;
.
. {* 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. *}
. struct _bfd *archive_head; {* The first BFD in the archive. *}
. boolean has_armap;
.
. {* A chain of BFD structures involved in a link. *}
. struct _bfd *link_next;
.
. {* A field used by _bfd_generic_link_add_archive_symbols. This will
. be used only for archive elements. *}
. int archive_pass;
.
. {* Used by the back end to hold private data. *}
.
. union
. {
. {* Used by the back end to hold private data. *}
. union
. {
. struct aout_data_struct *aout_data;
. struct artdata *aout_ar_data;
. struct _oasys_data *oasys_obj_data;
@ -187,15 +178,16 @@ 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*}
. PTR usrdata;
. {* Used by the application to hold private data. *}
. PTR usrdata;
.
. {* Where all the allocated stuff under this BFD goes. This is a
. struct objalloc *, but we use PTR to avoid requiring the inclusion of
. objalloc.h. *}
. PTR memory;
. PTR memory;
.};
.
*/
@ -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.
@ -179,7 +201,7 @@ Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE
* Makefile.in: Change stamp-* files to s-* files. Use bfdt.texi
rather than bfd.texi.
(DOCFILES): Change bfd.texi to bfdt.texi.
(DOCFILES): Change bfd.texi to bfdt.texi.
* bfd.texinfo: Include bfdt.texi, not bfd.texi.
Mon Jun 16 15:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
@ -222,7 +244,7 @@ Tue Jan 30 14:10:46 1996 Ian Lance Taylor <ian@cygnus.com>
Fri Nov 3 14:46:48 1995 Fred Fish <fnf@cygnus.com>
* Makefile.in (SRCDOC, SRCPROT, core.texi, bfd.h): Use corefile.c,
* Makefile.in (SRCDOC, SRCPROT, core.texi, bfd.h): Use corefile.c,
renamed from core.c.
Wed Nov 1 14:28:23 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
@ -342,7 +364,7 @@ Thu Jun 24 13:48:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
Mon Jun 14 12:07:07 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
* Makefile.in (install-info): remove parentdir cruft,
* Makefile.in (install-info): remove parentdir cruft,
Wed Jun 9 16:00:32 1993 Jim Kingdon (kingdon@cygnus.com)
@ -405,7 +427,7 @@ Thu Nov 5 03:13:55 1992 John Gilmore (gnu@cygnus.com)
Cleanup: Replace all uses of EXFUN in the BFD sources, with PARAMS.
* chew.c (exfunstuff): Eliminate.
* chew.c (exfunstuff): Eliminate.
(paramstuff): Replace exfunstuff with function to generate PARAMS.
* proto.str: Use paramstuff rather than exfunstuff.
@ -420,7 +442,7 @@ Fri Jun 19 18:59:54 1992 John Gilmore (gnu at cygnus.com)
Mon May 11 18:55:59 1992 John Gilmore (gnu at cygnus.com)
* chew.c: exit() should be declared by config files, not by
portable source code. Its type could be int or void function.
portable source code. Its type could be int or void function.
Mon May 4 13:45:57 1992 K. Richard Pixley (rich@rtl.cygnus.com)

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)
else if (at (tos, idx) == '{'
|| at (tos, idx) == '}')
{
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))
|| 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

@ -114,7 +114,7 @@
skip_past_newline
get_stuff_in_command
strip_trailing_newlines
"\n{* " swap catstr " *}\n" catstr
"\n{* " swap catstr " *}\n" catstr
translatecomments
- discard it if we're doing internal mode
"" swap 0 internalmode maybecatstr

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

@ -2,25 +2,24 @@
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
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. */
/*
SECTION
/* SECTION
ELF backends
BFD support for ELF formats is being worked on.
@ -29,8 +28,7 @@ SECTION
Documentation of the internals of the support code still needs
to be written. The code is changing quickly enough that we
haven't bothered yet.
*/
haven't bothered yet. */
/* For sparc64-cross-sparc32. */
#define _SYSCALL32
@ -2216,7 +2214,8 @@ elf_fake_sections (abfd, asect, failedptrarg)
this_hdr->sh_entsize = 4;
}
else if ((asect->flags & SEC_ALLOC) != 0
&& ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0))
&& (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
|| (asect->flags & SEC_NEVER_LOAD) != 0))
this_hdr->sh_type = SHT_NOBITS;
else
this_hdr->sh_type = SHT_PROGBITS;
@ -4150,7 +4149,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
#if DEBUG & 4
{
fprintf (stderr,
_("elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"),
"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n",
(long) asym_ptr, asym_ptr->name, idx, flags,
elf_symbol_flags (flags));
fflush (stderr);

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;
}
memset (&outrel, 0, sizeof outrel);
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

@ -1108,7 +1108,9 @@ elf_i386_adjust_dynamic_symbol (info, h)
if (h->plt.refcount <= 0
|| (! info->shared
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0))
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined))
{
/* This case can occur if we saw a PLT32 reloc in an input
file, but the symbol was never referred to by a dynamic
@ -1498,10 +1500,12 @@ elf_i386_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 (Elf32_External_Rel);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
}
}
}
@ -1623,7 +1627,9 @@ elf_i386_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)
{
@ -2000,20 +2006,20 @@ elf_i386_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);
if (skip)
{
memset (&outrel, 0, sizeof outrel);
relocate = false;
}
memset (&outrel, 0, sizeof outrel);
else if (h != NULL
&& h->dynindx != -1
&& (r_type == R_386_PC32
@ -2021,11 +2027,7 @@ elf_i386_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 = ELF32_R_INFO (h->dynindx, r_type);
}
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
{
/* This symbol is local, or marked to become local. */

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,7 +1573,8 @@ 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. */
continue;
if (! relocate)
continue;
}
break;

View File

@ -732,7 +732,22 @@ static reloc_howto_type elf64_alpha_howto_table[] =
false,
0,
0,
true)
true),
/* A 21 bit branch that adjusts for gp loads. */
HOWTO (R_ALPHA_BRSGP, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
21, /* bitsize */
true, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"BRSGP", /* name */
false, /* partial_inplace */
0x1fffff, /* src_mask */
0x1fffff, /* dst_mask */
true), /* pcrel_offset */
};
/* A relocation function which doesn't do anything. */
@ -886,6 +901,7 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] =
{BFD_RELOC_ALPHA_GPREL_HI16, R_ALPHA_GPRELHIGH},
{BFD_RELOC_ALPHA_GPREL_LO16, R_ALPHA_GPRELLOW},
{BFD_RELOC_GPREL16, R_ALPHA_GPREL16},
{BFD_RELOC_ALPHA_BRSGP, R_ALPHA_BRSGP},
};
/* Given a BFD reloc type, return a HOWTO structure. */
@ -2414,6 +2430,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
case R_ALPHA_GPREL32:
case R_ALPHA_GPRELHIGH:
case R_ALPHA_GPRELLOW:
case R_ALPHA_BRSGP:
/* We don't actually use the .got here, but the sections must
be created before the linker maps input sections to output
sections. */
@ -3555,6 +3572,64 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
addend -= 4;
goto default_reloc;
case R_ALPHA_BRSGP:
{
int other;
const char *name;
/* The regular PC-relative stuff measures from the start of
the instruction rather than the end. */
addend -= 4;
/* The source and destination gp must be the same. Note that
the source will always have an assigned gp, since we forced
one in check_relocs, but that the destination may not, as
it might not have had any relocations at all. Also take
care not to crash if H is an undefined symbol. */
if (h != NULL && sec != NULL
&& alpha_elf_tdata (sec->owner)->gotobj
&& gotobj != alpha_elf_tdata (sec->owner)->gotobj)
{
(*_bfd_error_handler)
(_("%s: change in gp: BRSGP %s"),
bfd_archive_filename (input_bfd), h->root.root.root.string);
ret_val = false;
}
/* The symbol should be marked either NOPV or STD_GPLOAD. */
if (h != NULL)
other = h->root.other;
else
other = sym->st_other;
switch (other & STO_ALPHA_STD_GPLOAD)
{
case STO_ALPHA_NOPV:
break;
case STO_ALPHA_STD_GPLOAD:
addend += 8;
break;
default:
if (h != NULL)
name = h->root.root.root.string;
else
{
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL)
name = _("<unknown>");
else if (name[0] == 0)
name = bfd_section_name (input_bfd, sec);
}
(*_bfd_error_handler)
(_("%s: !samegp reloc against symbol without .prologue: %s"),
bfd_archive_filename (input_bfd), name);
ret_val = false;
break;
}
goto default_reloc;
}
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
{
@ -3596,7 +3671,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset);
if (outrel.r_offset != (bfd_vma) -1)
if ((outrel.r_offset | 1) != (bfd_vma) -1)
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
else

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 ();
abfd = h->root.u.undef.abfd;
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));
fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
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);
}
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);
}
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,7 +2304,8 @@ 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. */
continue;
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;
}
memset (&outrel, 0, sizeof outrel);
/* 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
@ -874,7 +874,7 @@ ieee_slurp_external_symbols (abfd)
break;
default:
(*_bfd_error_handler)
(_("%s: unimplemented ATI record %u for symbol %u"),
(_("%s: unimplemented ATI record %u for symbol %u"),
bfd_archive_filename (abfd), symbol_attribute_def,
symbol_name_index);
bfd_set_error (bfd_error_bad_value);

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,25 +65,25 @@ 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. *}
. {* The relocation was performed, but there was an overflow. *}
. bfd_reloc_overflow,
.
. {* The address to relocate was not within the section supplied. *}
. {* 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. *}
. {* Unsupported relocation size requested. *}
. bfd_reloc_notsupported,
.
. {* Unused *}
. {* Unused. *}
. bfd_reloc_other,
.
. {* The symbol to relocate against was undefined. *}
. {* The symbol to relocate against was undefined. *}
. bfd_reloc_undefined,
.
. {* The relocation was performed, but may not be ok - presently
@ -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;
.
*/
/*
@ -250,19 +251,19 @@ CODE_FRAGMENT
.
.enum complain_overflow
.{
. {* Do not complain on overflow. *}
. {* Do not complain on overflow. *}
. complain_overflow_dont,
.
. {* Complain if the bitfield overflows, whether it is considered
. as signed or unsigned. *}
. as signed or unsigned. *}
. complain_overflow_bitfield,
.
. {* Complain if the value overflows when considered as signed
. number. *}
. number. *}
. complain_overflow_signed,
.
. {* Complain if the value overflows when considered as an
. unsigned number. *}
. unsigned number. *}
. complain_overflow_unsigned
.};
@ -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
the relocation to the reloc entry (probably because there isn't
any room in the output format to describe addends to relocs)
*/
/* 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). */
/* 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
the relocation to the reloc entry (probably because there isn't
any room in the output format to describe addends to relocs)
*/
/* 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). */
/* 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. *}
.
. 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.
@ -183,126 +183,125 @@ CODE_FRAGMENT
.
.typedef struct symbol_cache_entry
.{
. {* A pointer to the BFD which owns the symbol. This information
. is necessary so that a back end can work out what additional
. information (invisible to the application writer) is carried
. with the symbol.
. {* A pointer to the BFD which owns the symbol. This information
. is necessary so that a back end can work out what additional
. information (invisible to the application writer) is carried
. with the symbol.
.
. This field is *almost* redundant, since you can use section->owner
. 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. *}
. This field is *almost* redundant, since you can use section->owner
. 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. *}
.
. 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
. application may not alter it. *}
. {* The text of the symbol. The name is left alone, and not copied; the
. application may not alter it. *}
. const char *name;
.
. {* The value of the symbol. This really should be a union of a
. numeric value with a pointer, since some flags indicate that
. a pointer to another symbol is stored here. *}
. {* The value of the symbol. This really should be a union of a
. numeric value with a pointer, since some flags indicate that
. 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
. is the offset into the section of the data. *}
. {* The symbol has local scope; <<static>> in <<C>>. The value
. is the offset into the section of the data. *}
.#define BSF_LOCAL 0x01
.
. {* The symbol has global scope; initialized data in <<C>>. The
. value is the offset into the section of the data. *}
. {* The symbol has global scope; initialized data in <<C>>. The
. value is the offset into the section of the data. *}
.#define BSF_GLOBAL 0x02
.
. {* 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 *}
. {* 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. *}
.
. {* A normal C symbol would be one of:
. <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
. <<BSF_GLOBAL>> *}
. {* A normal C symbol would be one of:
. <<BSF_LOCAL>>, <<BSF_FORT_COMM>>, <<BSF_UNDEFINED>> or
. <<BSF_GLOBAL>>. *}
.
. {* The symbol is a debugging record. The value has an arbitary
. meaning, unless BSF_DEBUGGING_RELOC is also set. *}
. {* The symbol is a debugging record. The value has an arbitary
. meaning, unless BSF_DEBUGGING_RELOC is also set. *}
.#define BSF_DEBUGGING 0x08
.
. {* The symbol denotes a function entry point. Used in ELF,
. perhaps others someday. *}
. {* The symbol denotes a function entry point. Used in ELF,
. perhaps others someday. *}
.#define BSF_FUNCTION 0x10
.
. {* Used by the linker. *}
. {* Used by the linker. *}
.#define BSF_KEEP 0x20
.#define BSF_KEEP_G 0x40
.
. {* A weak global symbol, overridable without warnings by
. a regular global symbol of the same name. *}
. {* A weak global symbol, overridable without warnings by
. a regular global symbol of the same name. *}
.#define BSF_WEAK 0x80
.
. {* This symbol was created to point to a section, e.g. ELF's
. STT_SECTION symbols. *}
. {* This symbol was created to point to a section, e.g. ELF's
. STT_SECTION symbols. *}
.#define BSF_SECTION_SYM 0x100
.
. {* The symbol used to be a common symbol, but now it is
. allocated. *}
. {* The symbol used to be a common symbol, but now it is
. allocated. *}
.#define BSF_OLD_COMMON 0x200
.
. {* The default value for common data. *}
. {* The default value for common data. *}
.#define BFD_FORT_COMM_DEFAULT_VALUE 0
.
. {* In some files the type of a symbol sometimes alters its
. location in an output file - ie in coff a <<ISFCN>> symbol
. 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. *}
.
. {* In some files the type of a symbol sometimes alters its
. location in an output file - ie in coff a <<ISFCN>> symbol
. 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. *}
. {* Signal that the symbol is the label of constructor section. *}
.#define BSF_CONSTRUCTOR 0x800
.
. {* Signal that the symbol is a warning symbol. The name is a
. warning. The name of the next symbol is the one to warn about;
. if a reference is made to a symbol with the same name as the next
. symbol, a warning is issued by the linker. *}
. {* Signal that the symbol is a warning symbol. The name is a
. warning. The name of the next symbol is the one to warn about;
. if a reference is made to a symbol with the same name as the next
. symbol, a warning is issued by the linker. *}
.#define BSF_WARNING 0x1000
.
. {* Signal that the symbol is indirect. This symbol is an indirect
. pointer to the symbol with the same name as the next symbol. *}
. {* Signal that the symbol is indirect. This symbol is an indirect
. pointer to the symbol with the same name as the next symbol. *}
.#define BSF_INDIRECT 0x2000
.
. {* BSF_FILE marks symbols that contain a file name. This is used
. for ELF STT_FILE symbols. *}
. {* BSF_FILE marks symbols that contain a file name. This is used
. for ELF STT_FILE symbols. *}
.#define BSF_FILE 0x4000
.
. {* Symbol is from dynamic linking information. *}
. {* Symbol is from dynamic linking information. *}
.#define BSF_DYNAMIC 0x8000
.
. {* The symbol denotes a data object. Used in ELF, and perhaps
. others someday. *}
. {* The symbol denotes a data object. Used in ELF, and perhaps
. others someday. *}
.#define BSF_OBJECT 0x10000
.
. {* This symbol is a debugging symbol. The value is the offset
. into the section of the data. BSF_DEBUGGING should be set
. as well. *}
. {* This symbol is a debugging symbol. The value is the offset
. into the section of the data. BSF_DEBUGGING should be set
. as well. *}
.#define BSF_DEBUGGING_RELOC 0x20000
.
. flagword flags;
.
. {* A pointer to the section to which this symbol is
. relative. This will always be non NULL, there are special
. sections for undefined and absolute symbols. *}
. {* A pointer to the section to which this symbol is
. relative. This will always be non NULL, there are special
. sections for undefined and absolute symbols. *}
. struct sec *section;
.
. {* Back end special data. *}
. {* Back end special data. *}
. union
. {
. 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. *}
@ -448,7 +433,7 @@ the tokens.
.CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
.CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
.CONCAT2 (NAME,_canonicalize_dynamic_reloc)
. {* Get the amount of memory required to hold the dynamic symbols. *}
. {* Get the amount of memory required to hold the dynamic symbols. *}
. long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
. {* Read in the dynamic symbols. *}
. long (*_bfd_canonicalize_dynamic_symtab)
@ -466,17 +451,16 @@ and little endian code, and target chosen by the linker has the wrong
endianness. The function open_output() in ld/ldlang.c uses this field
to find an alternative output format that is suitable.
. {* Opposite endian version of this target. *}
. const struct bfd_target * alternative_target;
. {* 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;
. {* 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

@ -1453,7 +1453,7 @@ print_symbol_filename_posix (archive_bfd, abfd)
static void
print_value (abfd, val)
bfd *abfd;
bfd *abfd ATTRIBUTE_UNUSED;
bfd_vma val;
{
#if ! defined (BFD64) || BFD_HOST_64BIT_LONG

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);
@ -1371,8 +1395,13 @@ copy_archive (ibfd, obfd, output_target)
/* Delete all the files that we opened. */
for (l = list; l != NULL; l = l->next)
{
bfd_close (l->obfd);
unlink (l->name);
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
echo i386-${UNAME_MACHINE}-nto-qnx
else
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
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
sed -n -e ':loop
# ./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=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CC=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
if [ -z "${CFLAGS}" ]; then
sed -n -e ':loop
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=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CFLAGS=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
if [ -z "${CXX}" ]; then
sed -n -e ':loop
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=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CXX=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
if [ -z "${CXXFLAGS}" ]; then
sed -n -e ':loop
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=`tail -1 Makefile.cc`
rm -f Makefile.cc
fi
done
/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
CXXFLAGS=`tail -1 Makefile.cc`
rm -f Makefile.cc
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,30 +753,30 @@ 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
{
struct internal_aouthdr aouthdr; /* a.out header */
struct internal_filehdr filehdr; /* File header, not machine dep. */
long string_table_size; /* names + '\0' + sizeof (int) */
long relocation_size; /* Cumulated size of relocation
information for all sections in
bytes. */
long lineno_size; /* Size of the line number information
table in bytes */
long string_table_size; /* names + '\0' + sizeof (int) */
long relocation_size; /* Cumulated size of relocation
information for all sections in
bytes. */
long lineno_size; /* Size of the line number information
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 (!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

@ -1,6 +1,6 @@
/* i386.c -- Assemble code for the Intel 80386
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -48,8 +48,12 @@
#define SCALE1_WHEN_NO_INDEX 1
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
static unsigned int mode_from_disp_size PARAMS ((unsigned int));
static int fits_in_signed_byte PARAMS ((offsetT));
@ -1174,7 +1178,12 @@ tc_i386_fix_adjustable (fixP)
/* Prevent all adjustments to global symbols, or else dynamic
linking will not work correctly. */
if (S_IS_EXTERNAL (fixP->fx_addsy)
|| S_IS_WEAK (fixP->fx_addsy))
|| S_IS_WEAK (fixP->fx_addsy)
/* Don't adjust pc-relative references to merge sections in 64-bit
mode. */
|| (use_rela_relocations
&& (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
&& fixP->fx_pcrel))
return 0;
#endif
/* adjust_reloc_syms doesn't know about the GOT. */
@ -1294,6 +1303,7 @@ md_assemble (line)
/* If we are in 16-bit mode, do not allow addr16 or data16.
Similarly, in 32-bit mode, do not allow addr32 or data32. */
if ((current_templates->start->opcode_modifier & (Size16 | Size32))
&& flag_code != CODE_64BIT
&& (((current_templates->start->opcode_modifier & Size32) != 0)
^ (flag_code == CODE_16BIT)))
{
@ -2259,6 +2269,14 @@ md_assemble (line)
return;
}
if (i.suffix != QWORD_MNEM_SUFFIX && (flag_code == CODE_64BIT)
&& !(i.tm.opcode_modifier & IgnoreSize)
&& (i.tm.opcode_modifier & JumpByte))
{
if (! add_prefix (ADDR_PREFIX_OPCODE))
return;
}
/* Set mode64 for an operand. */
if (i.suffix == QWORD_MNEM_SUFFIX
&& !(i.tm.opcode_modifier & NoRex64))
@ -2411,13 +2429,15 @@ md_assemble (line)
if (! i.index_reg)
{
/* Operand is just <disp> */
if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
&& (flag_code != CODE_64BIT))
{
i.rm.regmem = NO_BASE_REGISTER_16;
i.types[op] &= ~Disp;
i.types[op] |= Disp16;
}
else if (flag_code != CODE_64BIT)
else if (flag_code != CODE_64BIT
|| (i.prefix[ADDR_PREFIX] != 0))
{
i.rm.regmem = NO_BASE_REGISTER;
i.types[op] &= ~Disp;
@ -3434,10 +3454,13 @@ i386_displacement (disp_start, disp_end)
#endif
int bigdisp = Disp32;
if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
bigdisp = Disp16;
if (flag_code == CODE_64BIT)
bigdisp = Disp64;
{
if (!i.prefix[ADDR_PREFIX])
bigdisp = Disp64;
}
else if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
bigdisp = Disp16;
i.types[this_operand] |= bigdisp;
exp = &disp_expressions[i.disp_operands];
@ -3592,15 +3615,28 @@ i386_index_check (operand_string)
ok = 1;
if (flag_code == CODE_64BIT)
{
/* 64bit checks. */
if ((i.base_reg
&& ((i.base_reg->reg_type & Reg64) == 0)
&& (i.base_reg->reg_type != BaseIndex
|| i.index_reg))
|| (i.index_reg
&& ((i.index_reg->reg_type & (Reg64|BaseIndex))
!= (Reg64|BaseIndex))))
ok = 0;
if (i.prefix[ADDR_PREFIX] == 0)
{
/* 64bit checks. */
if ((i.base_reg
&& ((i.base_reg->reg_type & Reg64) == 0)
&& (i.base_reg->reg_type != BaseIndex
|| i.index_reg))
|| (i.index_reg
&& ((i.index_reg->reg_type & (Reg64|BaseIndex))
!= (Reg64|BaseIndex))))
ok = 0;
}
else
{
/* 32bit checks. */
if ((i.base_reg
&& (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32)
|| (i.index_reg
&& ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex))
!= (Reg32|BaseIndex))))
ok = 0;
}
}
else
{

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

File diff suppressed because it is too large Load Diff

View File

@ -137,6 +137,7 @@ changequote([,])dnl
m8*) cpu_type=m88k ;;
mips*el) cpu_type=mips endian=little ;;
mips*) cpu_type=mips endian=big ;;
or32*) cpu_type=or32 endian=big ;;
pjl*) cpu_type=pj endian=little ;;
pj*) cpu_type=pj endian=big ;;
powerpc*le*) cpu_type=ppc endian=little ;;
@ -144,6 +145,7 @@ changequote([,])dnl
rs6000*) cpu_type=ppc ;;
s390x*) cpu_type=s390 arch=s390x ;;
s390*) cpu_type=s390 arch=s390 ;;
sh64*) cpu_type=sh64 endian=big;;
sh*le) cpu_type=sh endian=little ;;
sh*) cpu_type=sh endian=big ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
@ -221,6 +223,7 @@ changequote([,])dnl
esac ;;
hppa-*-*elf*) fmt=elf em=hppa ;;
hppa-*-lites*) fmt=elf em=hppa ;;
hppa-*-netbsd*) fmt=elf em=nbsd ;;
hppa-*-osf*) fmt=som em=hppa ;;
hppa-*-rtems*) fmt=elf em=hppa ;;
hppa-*-hpux11*) case ${cpu} in
@ -375,6 +378,9 @@ changequote([,])dnl
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
openrisc-*-*) fmt=elf bfd_gas=yes ;;
or32-*-rtems*) fmt=coff ;;
or32-*-coff) fmt=coff ;;
or32-*-elf) fmt=elf ;;
pj*) fmt=elf ;;
ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
fmt=coff em=pe ;;
@ -420,6 +426,7 @@ changequote([,])dnl
sh-*-rtemself*) fmt=elf ;;
sh-*-rtems*) fmt=coff bfd_gas=yes;;
sh64-*-elf*) fmt=elf ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;

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,8 +483,8 @@ 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>
David Mosberger <davidm@hpl.hp.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 */

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