diff options
Diffstat (limited to 'include/elf')
-rw-r--r-- | include/elf/ChangeLog | 251 | ||||
-rw-r--r-- | include/elf/arm-oabi.h | 39 | ||||
-rw-r--r-- | include/elf/arm.h | 25 | ||||
-rw-r--r-- | include/elf/avr.h | 58 | ||||
-rw-r--r-- | include/elf/common.h | 123 | ||||
-rw-r--r-- | include/elf/dwarf.h | 5 | ||||
-rw-r--r-- | include/elf/dwarf2.h | 1 | ||||
-rw-r--r-- | include/elf/hppa.h | 341 | ||||
-rw-r--r-- | include/elf/i370.h | 46 | ||||
-rw-r--r-- | include/elf/i386.h | 2 | ||||
-rw-r--r-- | include/elf/i960.h | 38 | ||||
-rw-r--r-- | include/elf/m32r.h | 2 | ||||
-rw-r--r-- | include/elf/m68k.h | 2 | ||||
-rw-r--r-- | include/elf/mcore.h | 6 | ||||
-rw-r--r-- | include/elf/mips.h | 48 | ||||
-rw-r--r-- | include/elf/mn10300.h | 1 | ||||
-rw-r--r-- | include/elf/pj.h | 45 | ||||
-rw-r--r-- | include/elf/reloc-macros.h | 4 | ||||
-rw-r--r-- | include/elf/sh.h | 27 | ||||
-rw-r--r-- | include/elf/sparc.h | 25 |
20 files changed, 923 insertions, 166 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index deaccd412..e1f68c39b 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,244 @@ +2000-03-27 Denis Chertykov <denisc@overta.ru> + + * avr.h: New file. AVR ELF support for BFD. + * common.h: Add AVR magic number. + +2000-03-10 Geoffrey Keating <geoffk@cygnus.com> + + * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16, + R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation + numbers. + +2000-02-23 Linas Vepstas <linas@linas.org> + + * i370.h: New file. + +2000-02-22 Nick Clifton <nickc@cygnus.com> + + * common.h (ELF_ST_OTHER): Remove definition. + (ELF32_ST_OTHER): Remove definition. + (ELF64_ST_OTHER): Remove definition. + +2000-02-22 H.J. Lu <hjl@gnu.org> + + * common.h (ELFOSABI_LINUX): Define. + +Thu Feb 17 00:18:33 2000 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. + (EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise. + +2000-02-03 H.J. Lu <hjl@gnu.org> + + * arm-oabi.h: Duplicate changes made to arm.h on Jan. 27, + 2000 by Thomas de Lellis <tdel@windriver.com>. + +2000-01-27 Thomas de Lellis <tdel@windriver.com> + + * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC. + (STT_ARM_16BIT): New flag. Denotes a label that was defined in + Thumb block but was does not identify a function. + +2000-01-20 Nick Clifton <nickc@cygnus.com> + + * common.h (EM_MCORE): Fix spelling of Motorola. + * mcore.h (EM_MCORE): Fix spelling of Motorola. + +2000-01-13 Nick Clifton <nickc@cygnus.com> + + * common.h (EM_S370): Change comment - this is now the IBM + System/370. + (EM_IA_64): Change comment - this is now the IA-64. + +2000-01-11 Nick Clifton <nickc@cygnus.com> + + * common.h (DT_ENCODING): Fix definition of this value. + (DT_LOOS): Fix definition of this value. + (DT_HIOS): Fix definition of this value. + (OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft + of ELF spec changed it. + (OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft + of ELF spec changed it. + +2000-01-10 Egor Duda <deo@logos-m.ru> + + * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps). + +1999-12-28 Nick Clifton <nickc@cygnus.com> + + * mips.h (STO_*): Redefine in terms of STV_* values now in + common.h. + +1999-12-27 Nick Clifton <nickc@cygnus.com> + + * common.h: Upgrade to match Oct4, 1999 Draft ELF ABI Spec. + (EM_MIPS_RS3_LE): New machine number. + (EM_RCE): New machine number. + (EM_MMA): New machine number. + (EM_PCP): New machine number. + (EM_NCPU): New machine number. + (EM_NDR1): New machine number. + (EM_STARCORE): New machine number. + (EM_ME16): New machine number. + (EM_ST100): New machine number. + (EM_TINYJ): New machine number. + (EM_FX66): New machine number. + (EM_ST9PLUS): New machine number. + (EM_ST7): New machine number. + (EM_68HC16): New machine number. + (EM_68HC11): New machine number. + (EM_68HC08): New machine number. + (EM_68HC05): New machine number. + (EM_SVX): New machine number. + (EM_VAX): New machine number. + (PF_MASKOS): Change value. + (SHT_INIT_ARRAY): New value for sh_type field. + (SHT_FINI_ARRAY): New value for sh_type field. + (SHT_PREINIT_ARRAY): New value for sh_type field. + (SHT_HIUSER): Change value. + (SHF_MERGE): New valye for sh_flags field. + (SHF_STRINGS): New valye for sh_flags field. + (SHF_INFO_LINK): New valye for sh_flags field. + (SHF_OS_NONCONFORMING): New valye for sh_flags field. + (SHF_MASKOS): Change value. + (ELF_ST_VISIBILITY): New macro. + (ELF_ST_OTHER): New macro. + (STT_COMMON): New symbol type. + (STV_DEFAULT): Value for symbol visibility. + (STV_INTERNAL): Value for symbol visibility. + (STV_HIDDEN): Value for symbol visibility. + (STV_PROTECTED): Value for symbol visibility. + (DT_RUNPATH): New dynamic section tag. + (DT_FLAGS): New dynamic section tag. + (DT_ENCODING): New dynamic section tag. + (DT_PREINIT_ARRAY): New dynamic section tag. + (DT_PREINIT_ARRAYSZ): New dynamic section tag. + (DT_LOPROC): New dynamic section tag index. + (DT_HIPROC): New dynamic section tag index. + (DF_ORIGIN): Value for dynamic section flag. + (DF_SYMBOLIC): Value for dynamic section flag. + (DF_TEXTREL): Value for dynamic section flag. + (DF_BIND_NOW): Value for dynamic section flag. + +1999-12-09 Fred Fish <fnf@cygnus.com> + + * i960.h (reloc-macros.h): Include using relative dir elf/. + * i386.h (reloc-macros.h): Include using relative dir elf/. + * hppa.h (reloc-macros.h): Include using relative dir elf/. + +1999-12-07 Jim Blandy <jimb@cygnus.com> + + * common.h (NT_PRXFPREG): New definition. + +Wed Dec 1 03:02:15 1999 Jeffrey A Law (law@cygnus.com) + + * mn10300.h (E_MN10300_MACH_AM33): Define. + +Mon Oct 11 22:42:37 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h (PF_HP_PAGE_SIZE): Define. + (PF_HP_FAR_SHARED, PF_HP_NEAR_SHARED, PF_HP_CODE): Likewise. + (PF_HP_MODIFY, PF_HP_LAZYSWAP, PF_HP_SBP): Likewise. + +Mon Oct 4 17:42:38 1999 Doug Evans <devans@canuck.cygnus.com> + + * m32r.h (E_M32RX_ARCH): Define. + +1999-09-15 Ulrich Drepper <drepper@cygnus.com> + + * hppa.h: Add DT_HP_GST_SIZE, DT_HP_GST_VERSION, and DT_HP_GST_HASHVAL. + +1999-09-04 Steve Chamberlain <sac@pobox.com> + + * pj.h: New file. + * common.h (EM_PJ): Define. + +1999-09-02 Ulrich Drepper <drepper@cygnus.com> + + * hppa.h: Add HPUX specific symbol type definitions. + + * hppa.h: Add HPUX specific dynamic and program header table + specific definitions. + +1999-08-31 Scott Bambrough <scottb@netwinder.org> + + * common.h (NT_TASKSTRUCT): Define. + +1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> + + * sparc.h (EF_SPARC_SUN_US3): Define in Cheetah extensions + flag (as per SCD2.4.1). + +1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> + + * sparc.h (ELF64_R_TYPE_DATA): Only use ELF64_R_TYPE bits, not + ELF64_R_SYM bits. + +1999-06-21 Philip Blundell <pb@nexus.co.uk> + + * arm.h (EF_SOFT_FLOAT, F_SOFT_FLOAT): Define. + +1999-07-13 Andreas Schwab <schwab@suse.de> + + * m68k.h (EF_CPU32): Move definition inside multiple inclusion + guard. + +1999-07-08 Richard Henderson <rth@cygnus.com> + + * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value. + (ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data. + (DT_SPARC_PLTFMT): Delete. + Based on a patch from Jakub Jelinek. + +Mon Jun 21 16:36:02 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. + +1999-06-10 Jakub Jelinek <jj@ultra.linux.cz> + + * sparc.h (R_SPARC_max_std): Define. + +Wed Jun 9 15:16:34 1999 Jeffrey A Law (law@cygnus.com) + + * hppa.h: Update with various changes from newest PA ELF + specifications. + +1999-06-03 Ian Lance Taylor <ian@zembu.com> + + * common.h (EM_PPC64): Define. + +1999-06-02 Stu Grossman <grossman@babylon-5.cygnus.com> + + * dwarf.h: Add LANG_JAVA. + * dwarf2.h: Add DW_LANG_Java. + +1999-05-29 Nick Clifton <nickc@cygnus.com> + + * common.h (ELFOSABI_ARM): Define. + +1999-05-28 Nick Clifton <nickc@cygnus.com> + + * reloc-macros.h: Update comment. + +1999-05-28 Ian Lance Taylor <ian@zembu.com> + + * i960.h: New file. + +1999-05-16 Nick Clifton <nickc@cygnus.com> + + * mcore.h (R_MCORE_COPY): Define. + (R_MCORE_GLOB_DAT): Define. + (R_MCORE_JUMP_SLOT): Define. + +1999-05-15 Nick Clifton <nickc@cygnus.com> + + * mcore.h (R_MCORE_RELATIVE): Define. + +999-05-05 Catherine Moore <clm@cygnus.com> + + * m68k.h (EF_CPU32): Define. + 1999-04-21 Nick Clifton <nickc@cygnus.com> * reloc-macros.h (START_RELOC_NUMBERS): Prepend an underscore to @@ -10,22 +251,22 @@ 1999-04-08 Nick Clifton <nickc@cygnus.com> - * mcore.h: New header file. Defines for Motorolla's MCore - processor. + * mcore.h: New header file. Defines for Motorola's MCore + processor. 1999-04-08 Nick Clifton <nickc@cygnus.com> * common.h: Add new constants defined in: "System V Application - Binary Interface - DRAFT - April 29, 1998" found at the web site: + Binary Interface - DRAFT - April 29, 1998" found at the web site: http://www.sco.com/developer/gabi/contents.html (EM_MMA): Removed. Replaced with EM_MCORE as Motorolla own this - value. + value. 1999-03-31 Nick Clifton <nickc@cygnus.com> * reloc-macros.h: Fixed to not generate an enum with a trailing - comma. + comma. 1999-03-16 Gavin Romig-Koch <gavin@cygnus.com> diff --git a/include/elf/arm-oabi.h b/include/elf/arm-oabi.h index 6109842e8..da5e7316e 100644 --- a/include/elf/arm-oabi.h +++ b/include/elf/arm-oabi.h @@ -1,5 +1,5 @@ /* ARM ELF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,7 @@ #define EF_APCS_26 0x08 #define EF_APCS_FLOAT 0x10 #define EF_PIC 0x20 -#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */ +#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */ #define EF_NEW_ABI 0x80 #define EF_OLD_ABI 0x100 @@ -39,15 +39,16 @@ #define F_APCS_FLOAT EF_APCS_FLOAT #define F_PIC EF_PIC -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd +/* Additional symbol types for Thumb. */ +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ -/* ARM-specific values for sh_flags */ -#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */ +/* ARM-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ -/* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */ +/* ARM-specific program header flags. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ /* Relocation types. */ START_RELOC_NUMBERS (elf_arm_reloc_type) @@ -62,18 +63,18 @@ START_RELOC_NUMBERS (elf_arm_reloc_type) RELOC_NUMBER (R_ARM_THM_PC22, 8) RELOC_NUMBER (R_ARM_SBREL32, 9) RELOC_NUMBER (R_ARM_AMP_VCALL9, 10) - RELOC_NUMBER (R_ARM_THM_PC11, 11) /* cygnus extension to abi: thumb unconditional branch */ - RELOC_NUMBER (R_ARM_THM_PC9, 12) /* cygnus extension to abi: thumb conditional branch */ + RELOC_NUMBER (R_ARM_THM_PC11, 11) /* Cygnus extension to abi: Thumb unconditional branch. */ + RELOC_NUMBER (R_ARM_THM_PC9, 12) /* Cygnus extension to abi: Thumb conditional branch. */ RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13) RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14) - RELOC_NUMBER (R_ARM_COPY, 20) /* copy symbol at runtime */ - RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* create GOT entry */ - RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* create PLT entry */ - RELOC_NUMBER (R_ARM_RELATIVE, 23) /* adjust by program base */ - RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT */ - RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT */ - RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry */ - RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address */ + RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */ + RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */ + RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */ + RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */ + RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT. */ + RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT. */ + RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry. */ + RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address. */ FAKE_RELOC (FIRST_INVALID_RELOC, 28) FAKE_RELOC (LAST_INVALID_RELOC, 249) RELOC_NUMBER (R_ARM_RSBREL32, 250) diff --git a/include/elf/arm.h b/include/elf/arm.h index 2c94b13e2..4d3405dd7 100644 --- a/include/elf/arm.h +++ b/include/elf/arm.h @@ -1,5 +1,5 @@ /* ARM ELF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,25 +29,28 @@ #define EF_APCS_26 0x08 #define EF_APCS_FLOAT 0x10 #define EF_PIC 0x20 -#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */ +#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */ #define EF_NEW_ABI 0x80 #define EF_OLD_ABI 0x100 +#define EF_SOFT_FLOAT 0x200 /* Local aliases for some flags to match names used by COFF port. */ #define F_INTERWORK EF_INTERWORK #define F_APCS26 EF_APCS_26 #define F_APCS_FLOAT EF_APCS_FLOAT #define F_PIC EF_PIC +#define F_SOFT_FLOAT EF_SOFT_FLOAT -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd +/* Additional symbol types for Thumb. */ +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ -/* ARM-specific values for sh_flags */ -#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */ +/* ARM-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ -/* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */ +/* ARM-specific program header flags. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ /* Relocation types. */ START_RELOC_NUMBERS (elf_arm_reloc_type) @@ -80,8 +83,8 @@ START_RELOC_NUMBERS (elf_arm_reloc_type) FAKE_RELOC (LAST_INVALID_RELOC1, 99) RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) - RELOC_NUMBER (R_ARM_THM_PC11, 102) /* cygnus extension to abi: thumb unconditional branch */ - RELOC_NUMBER (R_ARM_THM_PC9, 103) /* cygnus extension to abi: thumb conditional branch */ + RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch */ + RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch */ FAKE_RELOC (FIRST_INVALID_RELOC2, 104) FAKE_RELOC (LAST_INVALID_RELOC2, 248) RELOC_NUMBER (R_ARM_RXPC25, 249) diff --git a/include/elf/avr.h b/include/elf/avr.h new file mode 100644 index 000000000..152745599 --- /dev/null +++ b/include/elf/avr.h @@ -0,0 +1,58 @@ +/* AVR ELF support for BFD. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Contributed by Denis Chertykov <denisc@overta.ru> + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_AVR_H +#define _ELF_AVR_H + +#include "elf/reloc-macros.h" + +/* Processor specific flags for the ELF header e_flags field. */ +#define EF_AVR_MACH 0xf + +#define E_AVR_MACH_AVR1 1 +#define E_AVR_MACH_AVR2 2 +#define E_AVR_MACH_AVR3 3 +#define E_AVR_MACH_AVR4 4 + +/* Relocations. */ +START_RELOC_NUMBERS (elf_avr_reloc_type) + RELOC_NUMBER (R_AVR_NONE, 0) + RELOC_NUMBER (R_AVR_32, 1) + RELOC_NUMBER (R_AVR_7_PCREL, 2) + RELOC_NUMBER (R_AVR_13_PCREL, 3) + RELOC_NUMBER (R_AVR_16, 4) + RELOC_NUMBER (R_AVR_16_PM, 5) + RELOC_NUMBER (R_AVR_LO8_LDI, 6) + RELOC_NUMBER (R_AVR_HI8_LDI, 7) + RELOC_NUMBER (R_AVR_HH8_LDI, 8) + RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9) + RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10) + RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11) + RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12) + RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13) + RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14) + RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15) + RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16) + RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17) + RELOC_NUMBER (R_AVR_CALL, 18) + EMPTY_RELOC (R_AVR_max) +END_RELOC_NUMBERS + +#endif /* _ELF_AVR_H */ diff --git a/include/elf/common.h b/include/elf/common.h index cda3ba0d9..fe8c2169d 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -1,5 +1,6 @@ /* ELF support for BFD. - Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -59,7 +60,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EI_OSABI 7 /* Operating System/ABI indication */ #define ELFOSABI_SYSV 0 /* UNIX System V ABI */ #define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_LINUX 3 /* GNU/Linux */ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ +#define ELFOSABI_ARM 97 /* ARM */ #define EI_ABIVERSION 8 /* ABI version */ @@ -89,19 +92,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_486 6 /* Intel 80486 */ #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ -#define EM_S370 9 /* Amdahl */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ +#define EM_S370 9 /* IBM System/370 */ +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ /* Depreciated */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */ #define EM_PARISC 15 /* HPPA */ + #define EM_VPP550 17 /* Fujitsu VPP500 */ #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ #define EM_960 19 /* Intel 80960 */ #define EM_PPC 20 /* PowerPC */ +#define EM_PPC64 21 /* 64-bit PowerPC */ #define EM_V800 36 /* NEC V800 series */ #define EM_FR20 37 /* Fujitsu FR20 */ #define EM_RH32 38 /* TRW RH32 */ -#define EM_MCORE 39 /* Motorolla MCore */ /* May also be taken by Fujitsu MMA */ +#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */ +#define EM_RCE 39 /* Old name for MCore */ #define EM_ARM 40 /* ARM */ #define EM_OLD_ALPHA 41 /* Digital Alpha */ #define EM_SH 42 /* Hitachi SH */ @@ -112,10 +119,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_H8_300H 47 /* Hitachi H8/300H */ #define EM_H8S 48 /* Hitachi H8S */ #define EM_H8_500 49 /* Hitachi H8/500 */ -#define EM_IA_64 50 /* Intel MercedTM Processor */ +#define EM_IA_64 50 /* Intel IA-64 Processor */ #define EM_MIPS_X 51 /* Stanford MIPS-X */ #define EM_COLDFIRE 52 /* Motorola Coldfire */ #define EM_68HC12 53 /* Motorola M68HC12 */ +#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */ +#define EM_PCP 55 /* Siemens PCP */ +#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */ +#define EM_NDR1 57 /* Denso NDR1 microprocesspr */ +#define EM_STARCORE 58 /* Motorola Star*Core processor */ +#define EM_ME16 59 /* Toyota ME16 processor */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ + +#define EM_FX66 66 /* Siemens FX66 microcontroller */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ +#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */ +#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */ +#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */ +#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */ +#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */ +#define EM_SVX 73 /* Silicon Graphics SVx */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */ +#define EM_VAX 75 /* Digital VAX */ + +#define EM_PJ 99 /* picoJava */ /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision @@ -161,6 +189,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* FR30 magic number - no EABI available. */ #define EM_CYGNUS_FR30 0x3330 +/* AVR magic number + Written in the absense of an ABI. */ +#define EM_AVR 0x1057 + /* See the above comment before you add a new EM_* value here. */ /* Values for e_version */ @@ -187,7 +219,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PF_X (1 << 0) /* Segment is executable */ #define PF_W (1 << 1) /* Segment is writable */ #define PF_R (1 << 2) /* Segment is readable */ -#define PF_MASKOS 0x0F000000 /* OS-specific reserved bits */ +/* #define PF_MASKOS 0x0F000000 *//* OS-specific reserved bits */ +#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ /* Values for section header, sh_type field */ @@ -205,6 +238,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHT_SHLIB 10 /* Reserved, unspecified semantics */ #define SHT_DYNSYM 11 /* Dynamic linking symbol table */ +#define SHT_INIT_ARRAY 14 /* Array of pointers to init functions */ +#define SHT_FINI_ARRAY 15 /* Array of pointers to finish functions */ +#define SHT_PREINIT_ARRAY 16 /* Array of pointers to pre-init functions */ + #define SHT_LOOS 0x60000000 /* Operating system specific semantics, lo */ #define SHT_HIOS 0x6fffffff /* Operating system specific semantics, hi */ @@ -222,14 +259,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */ #define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */ #define SHT_LOUSER 0x80000000 /* Application-specific semantics */ -#define SHT_HIUSER 0x8FFFFFFF /* Application-specific semantics */ +/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */ +#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */ /* Values for section header, sh_flags field */ #define SHF_WRITE (1 << 0) /* Writable data during execution */ #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ #define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */ -#define SHF_MASKOS 0x0F000000 /* OS-specific semantics */ +#define SHF_MERGE (1 << 4) /* Data in this section can be merged */ +#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */ +#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */ +#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ +#define SHF_OS_NONCONFORMING (1 << 8) /* OS specifci processing required */ + +/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ +#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */ /* Values of note segment descriptor types for core files. */ @@ -237,6 +282,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ +#define NT_TASKSTRUCT 4 /* Contains copy of task struct */ +#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */ + /* note name must be "LINUX". */ /* Note segments for core files on dir-style procfs systems. */ @@ -245,6 +293,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NT_PSINFO 13 /* Has a struct psinfo */ #define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */ #define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */ +#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */ /* Values of note segment descriptor types for object files. */ /* (Only for hppa right now. Should this be moved elsewhere?) */ @@ -259,6 +308,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF_ST_TYPE(val) ((val) & 0xF) #define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF)) +/* The 64bit and 32bit versions of these macros are identical, but + the ELF spec defines them, so here they are. */ +#define ELF32_ST_BIND ELF_ST_BIND +#define ELF32_ST_TYPE ELF_ST_TYPE +#define ELF32_ST_INFO ELF_ST_INFO +#define ELF64_ST_BIND ELF_ST_BIND +#define ELF64_ST_TYPE ELF_ST_TYPE +#define ELF64_ST_INFO ELF_ST_INFO + +/* This macro disassembles and assembles a symbol's visibility into + the st_other field. The STV_ defines specificy the actual visibility. */ + +#define ELF_ST_VISIBILITY(v) ((v) & 0x3) +/* The remaining bits in the st_other field are not currently used. + They should be set to zero. */ + +#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY +#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY + + #define STN_UNDEF 0 /* undefined symbol index */ #define STB_LOCAL 0 /* Symbol not visible outside obj */ @@ -274,6 +343,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define STT_FUNC 2 /* Symbol is a code object */ #define STT_SECTION 3 /* Symbol associated with a section */ #define STT_FILE 4 /* Symbol gives a file name */ +#define STT_COMMON 5 /* An uninitialised common block */ #define STT_LOOS 10 /* OS-specific semantics */ #define STT_HIOS 12 /* OS-specific semantics */ #define STT_LOPROC 13 /* Application-specific semantics */ @@ -292,6 +362,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHN_COMMON 0xFFF2 /* Associated symbol is in common */ #define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */ +/* The following constants control how a symbol may be accessed once it has + become part of an executable or shared library. */ + +#define STV_DEFAULT 0 /* Visibility is specified by binding type */ +#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */ +#define STV_HIDDEN 2 /* Can only be seen inside currect component */ +#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */ + + /* relocation info handling macros */ #define ELF32_R_SYM(i) ((i) >> 8) @@ -333,12 +412,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DT_FINI_ARRAY 26 #define DT_INIT_ARRAYSZ 27 #define DT_FINI_ARRAYSZ 28 +#define DT_RUNPATH 29 +#define DT_FLAGS 30 -#define DT_LOOS 0x60000000 -#define DT_HIOS 0x6fffffff +#define DT_ENCODING 32 +#define DT_PREINIT_ARRAY 32 +#define DT_PREINIT_ARRAYSZ 33 + +/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values + for DT_LOOS and DT_HIOS. Some implementations however, use + values outside of the new range (see below). */ +#define OLD_DT_LOOS 0x60000000 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6fff0000 +#define OLD_DT_HIOS 0x6fffffff + +#define DT_LOPROC 0x70000000 +#define DT_HIPROC 0x7fffffff /* The next four dynamic tags are used on Solaris. We support them - everywhere. */ + everywhere. Note these values lie outside of the (new) range for + OS specific values. This is a deliberate special case and we + maintain it for backwards compatability. */ #define DT_VALRNGLO 0x6ffffd00 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa @@ -394,6 +489,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DF_1_TRANS 0x00000200 #define DF_1_INTERPOSE 0x00000400 +/* Flag values for the DT_FLAGS entry. */ +#define DF_ORIGIN (1 << 0) +#define DF_SYMBOLIC (1 << 1) +#define DF_TEXTREL (1 << 2) +#define DF_BIND_NOW (1 << 3) + /* These constants are used for the version number of a Elf32_Verdef structure. */ diff --git a/include/elf/dwarf.h b/include/elf/dwarf.h index 4333d5eda..1e72cd70d 100644 --- a/include/elf/dwarf.h +++ b/include/elf/dwarf.h @@ -3,7 +3,7 @@ Written by Ron Guilmette (rfg@ncd.com) -Copyright (C) 1992 Free Software Foundation, Inc. +Copyright (C) 1992, 1999 Free Software Foundation, Inc. This file is part of GNU CC. @@ -301,7 +301,8 @@ enum dwarf_source_language { /* GNU extensions */ - LANG_CHILL = 0x00009af3 /* random value for GNU Chill */ + LANG_CHILL = 0x00009af3, /* random value for GNU Chill */ + LANG_JAVA = 0x00009af4 /* random value + 1 for GNU Java */ }; #define LANG_lo_user 0x00008000 /* implementation-defined range start */ diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h index b2cbb24d9..1bd4fa6ca 100644 --- a/include/elf/dwarf2.h +++ b/include/elf/dwarf2.h @@ -616,6 +616,7 @@ enum dwarf_source_language DW_LANG_Fortran90 = 0x0008, DW_LANG_Pascal83 = 0x0009, DW_LANG_Modula2 = 0x000a, + DW_LANG_Java = 0x9af4, DW_LANG_Mips_Assembler = 0x8001 }; diff --git a/include/elf/hppa.h b/include/elf/hppa.h index 2952e2398..0e45d7451 100644 --- a/include/elf/hppa.h +++ b/include/elf/hppa.h @@ -1,5 +1,5 @@ /* HPPA ELF support for BFD. - Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -25,87 +25,92 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Processor specific flags for the ELF header e_flags field. */ -/* Target processor IDs to be placed in the low 16 bits of the flags - field. Note these names are shared with SOM, and therefore do not - follow ELF naming conventions. */ +/* Trap null address dereferences. */ +#define EF_PARISC_TRAPNIL 0x00010000 -/* PA 1.0 big endian. */ -#ifndef CPU_PA_RISC1_0 -#define CPU_PA_RISC1_0 0x0000020b -#endif +/* .PARISC.archext section is present. */ +#define EF_PARISC_EXT 0x00020000 -/* PA 1.1 big endian. */ -#ifndef CPU_PA_RISC1_1 -#define CPU_PA_RISC1_1 0x00000210 -#endif +/* Program expects little-endian mode. */ +#define EF_PARISC_LSB 0x00040000 -/* PA 1.0 little endian (unsupported) is 0x0000028b. */ -/* PA 1.1 little endian (unsupported) is 0x00000290. */ +/* Program expects wide mode. */ +#define EF_PARISC_WIDE 0x00080000 -/* Trap null address dereferences. */ -#define ELF_PARISC_TRAPNIL 0x00010000 +/* Do not allow kernel-assisted branch prediction. */ +#define EF_PARISC_NO_KABP 0x00100000 -/* .PARISC.archext section is present. */ -#define EF_PARISC_EXT 0x00020000 +/* Allow lazy swap for dynamically allocated program segments. */ +#define EF_PARISC_LAZYSWAP 0x00400000 -/* Processor specific section types. */ +/* Architecture version */ +#define EF_PARISC_ARCH 0x0000ffff -/* Holds the global offset table, a table of pointers to external - data. */ -#define SHT_PARISC_GOT SHT_LOPROC+0 +#define EFA_PARISC_1_0 0x020b +#define EFA_PARISC_1_1 0x0210 +#define EFA_PARISC_2_0 0x0214 -/* Nonloadable section containing information in architecture - extensions used by the code. */ -#define SHT_PARISC_ARCH SHT_LOPROC+1 +/* Special section indices. */ +/* A symbol that has been declared as a tentative definition in an ANSI C + compilation. */ +#define SHN_PARISC_ANSI_COMMON 0xff00 -/* Section in which $global$ is defined. */ -#define SHT_PARISC_GLOBAL SHT_LOPROC+2 +/* A symbol that has been declared as a common block using the + huge memory model. */ +#define SHN_PARISC_HUGE_COMMON 0xff01 -/* Section holding millicode routines (mul, div, rem, dyncall, etc. */ -#define SHT_PARISC_MILLI SHT_LOPROC+3 +/* Processor specific section types. */ + +/* Section contains product specific extension bits. */ +#define SHT_PARISC_EXT 0x70000000 -/* Section holding unwind information for use by debuggers. */ -#define SHT_PARISC_UNWIND SHT_LOPROC+4 +/* Section contains unwind table entries. */ +#define SHT_PARISC_UNWIND 0x70000001 -/* Section holding the procedure linkage table. */ -#define SHT_PARISC_PLT SHT_LOPROC+5 +/* Section contains debug information for optimized code. */ +#define SHT_PARISC_DOC 0x70000002 -/* Short initialized and uninitialized data. */ -#define SHT_PARISC_SDATA SHT_LOPROC+6 -#define SHT_PARISC_SBSS SHT_LOPROC+7 +/* Section contains code annotations. */ +#define SHT_PARISC_ANNOT 0x70000003 +/* These are strictly for compatibility with the older elf32-hppa + implementation. Hopefully we can eliminate them in the future. */ /* Optional section holding argument location/relocation info. */ -#define SHT_PARISC_SYMEXTN SHT_LOPROC+8 +#define SHT_PARISC_SYMEXTN SHT_LOPROC+8 /* Option section for linker stubs. */ -#define SHT_PARISC_STUBS SHT_LOPROC+9 +#define SHT_PARISC_STUBS SHT_LOPROC+9 /* Processor specific section flags. */ -/* This section is near the global data pointer and thus allows short - addressing modes to be used. */ -#define SHF_PARISC_SHORT 0x20000000 +/* Section contains code compiled for static branch prediction. */ +#define SHF_PARISC_SBP 0x80000000 + +/* Section should be allocated from from GP. */ +#define SHF_PARISC_HUGE 0x40000000 -/* Processor specific symbol types. */ +/* Section should go near GP. */ +#define SHF_PARISC_SHORT 0x20000000 -/* Millicode function entry point. */ -#define STT_PARISC_MILLICODE STT_LOPROC+0 +/* Identifies the entry point of a millicode routine. */ +#define STT_PARISC_MILLI 13 /* ELF/HPPA relocation types */ -#include "reloc-macros.h" +/* Note: PA-ELF is defined to use only RELA relocations. */ +#include "elf/reloc-macros.h" -START_RELOC_NUMBERS (elf32_hppa_reloc_type) +START_RELOC_NUMBERS (elf_hppa_reloc_type) RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */ - + /* These relocation types do simple base + offset relocations. */ - RELOC_NUMBER (R_PARISC_DIR32, 0x01) - RELOC_NUMBER (R_PARISC_DIR21L, 0x02) - RELOC_NUMBER (R_PARISC_DIR17R, 0x03) - RELOC_NUMBER (R_PARISC_DIR17F, 0x04) - RELOC_NUMBER (R_PARISC_DIR14R, 0x06) + RELOC_NUMBER (R_PARISC_DIR32, 1) + RELOC_NUMBER (R_PARISC_DIR21L, 2) + RELOC_NUMBER (R_PARISC_DIR17R, 3) + RELOC_NUMBER (R_PARISC_DIR17F, 4) + RELOC_NUMBER (R_PARISC_DIR14R, 6) /* PC-relative relocation types Typically used for calls. @@ -113,25 +118,28 @@ START_RELOC_NUMBERS (elf32_hppa_reloc_type) PCREL17C never reports a relocation error. When supporting argument relocations, function calls must be - accompanied by parameter relocation information. This information is + accompanied by parameter relocation information. This information is carried in the ten high-order bits of the addend field. The remaining 22 bits of of the addend field are sign-extended to form the Addend. - Note the code to build argument relocations depends on the + Note the code to build argument relocations depends on the addend being zero. A consequence of this limitation is GAS can not perform relocation reductions for function symbols. */ - - RELOC_NUMBER (R_PARISC_PCREL21L, 0x0a) - RELOC_NUMBER (R_PARISC_PCREL17R, 0x0b) - RELOC_NUMBER (R_PARISC_PCREL17F, 0x0c) - RELOC_NUMBER (R_PARISC_PCREL17C, 0x0d) - RELOC_NUMBER (R_PARISC_PCREL14R, 0x0e) - RELOC_NUMBER (R_PARISC_PCREL14F, 0x0f) + + RELOC_NUMBER (R_PARISC_PCREL32, 9) + RELOC_NUMBER (R_PARISC_PCREL21L, 10) + RELOC_NUMBER (R_PARISC_PCREL17R, 11) + RELOC_NUMBER (R_PARISC_PCREL17F, 12) + RELOC_NUMBER (R_PARISC_PCREL17C, 13) + RELOC_NUMBER (R_PARISC_PCREL14R, 14) + RELOC_NUMBER (R_PARISC_PCREL14F, 15) /* DP-relative relocation types. */ - RELOC_NUMBER (R_PARISC_DPREL21L, 0x12) - RELOC_NUMBER (R_PARISC_DPREL14R, 0x16) - RELOC_NUMBER (R_PARISC_DPREL14F, 0x17) + RELOC_NUMBER (R_PARISC_DPREL21L, 18) + RELOC_NUMBER (R_PARISC_DPREL14WR, 19) + RELOC_NUMBER (R_PARISC_DPREL14DR, 20) + RELOC_NUMBER (R_PARISC_DPREL14R, 22) + RELOC_NUMBER (R_PARISC_DPREL14F, 23) /* Data linkage table (DLT) relocation types @@ -139,49 +147,190 @@ START_RELOC_NUMBERS (elf32_hppa_reloc_type) from position-independent code within shared libraries. They are similar to the GOT relocation types in some SVR4 implementations. */ - RELOC_NUMBER (R_PARISC_DLTREL21L, 0x1a) - RELOC_NUMBER (R_PARISC_DLTREL14R, 0x1e) - RELOC_NUMBER (R_PARISC_DLTREL14F, 0x1f) + RELOC_NUMBER (R_PARISC_DLTREL21L, 26) + RELOC_NUMBER (R_PARISC_DLTREL14R, 30) + RELOC_NUMBER (R_PARISC_DLTREL14F, 31) /* DLT indirect relocation types */ - RELOC_NUMBER (R_PARISC_DLTIND21L, 0x22) - RELOC_NUMBER (R_PARISC_DLTIND14R, 0x26) - RELOC_NUMBER (R_PARISC_DLTIND14F, 0x27) + RELOC_NUMBER (R_PARISC_DLTIND21L, 34) + RELOC_NUMBER (R_PARISC_DLTIND14R, 38) + RELOC_NUMBER (R_PARISC_DLTIND14F, 39) /* Base relative relocation types. Ugh. These imply lots of state */ - RELOC_NUMBER (R_PARISC_SETBASE, 0x28) - RELOC_NUMBER (R_PARISC_BASEREL32, 0x29) - RELOC_NUMBER (R_PARISC_BASEREL21L, 0x2a) - RELOC_NUMBER (R_PARISC_BASEREL17R, 0x2b) - RELOC_NUMBER (R_PARISC_BASEREL17F, 0x2c) - RELOC_NUMBER (R_PARISC_BASEREL14R, 0x2e) - RELOC_NUMBER (R_PARISC_BASEREL14F, 0x2f) + RELOC_NUMBER (R_PARISC_SETBASE, 40) + RELOC_NUMBER (R_PARISC_SECREL32, 41) + RELOC_NUMBER (R_PARISC_BASEREL21L, 42) + RELOC_NUMBER (R_PARISC_BASEREL17R, 43) + RELOC_NUMBER (R_PARISC_BASEREL17F, 44) + RELOC_NUMBER (R_PARISC_BASEREL14R, 46) + RELOC_NUMBER (R_PARISC_BASEREL14F, 47) /* Segment relative relocation types. */ - RELOC_NUMBER (R_PARISC_TEXTREL32, 0x31) - RELOC_NUMBER (R_PARISC_DATAREL32, 0x39) + RELOC_NUMBER (R_PARISC_SEGBASE, 48) + RELOC_NUMBER (R_PARISC_SEGREL32, 49) + + /* Offsets from the PLT. */ + RELOC_NUMBER (R_PARISC_PLTOFF21L, 50) + RELOC_NUMBER (R_PARISC_PLTOFF14R, 54) + RELOC_NUMBER (R_PARISC_PLTOFF14F, 55) + + RELOC_NUMBER (R_PARISC_LTOFF_FPTR32, 57) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 58) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 62) + + RELOC_NUMBER (R_PARISC_FPTR64, 64) /* Plabel relocation types. */ - RELOC_NUMBER (R_PARISC_PLABEL32, 0x41) - RELOC_NUMBER (R_PARISC_PLABEL21L, 0x42) - RELOC_NUMBER (R_PARISC_PLABEL14R, 0x46) - - /* PLT relocations. */ - RELOC_NUMBER (R_PARISC_PLTIND21L, 0x82) - RELOC_NUMBER (R_PARISC_PLTIND14R, 0x86) - RELOC_NUMBER (R_PARISC_PLTIND14F, 0x87) - - /* Misc relocation types. */ - RELOC_NUMBER (R_PARISC_COPY, 0x88) - RELOC_NUMBER (R_PARISC_GLOB_DAT, 0x89) - RELOC_NUMBER (R_PARISC_JMP_SLOT, 0x8a) - RELOC_NUMBER (R_PARISC_RELATIVE, 0x8b) - - EMPTY_RELOC (R_PARISC_UNIMPLEMENTED) + RELOC_NUMBER (R_PARISC_PLABEL32, 65) + RELOC_NUMBER (R_PARISC_PLABEL21L, 66) + RELOC_NUMBER (R_PARISC_PLABEL14R, 70) + + /* PCREL relocations. */ + RELOC_NUMBER (R_PARISC_PCREL64, 72) + RELOC_NUMBER (R_PARISC_PCREL22C, 73) + RELOC_NUMBER (R_PARISC_PCREL22F, 74) + RELOC_NUMBER (R_PARISC_PCREL14WR, 75) + RELOC_NUMBER (R_PARISC_PCREL14DR, 76) + RELOC_NUMBER (R_PARISC_PCREL16F, 77) + RELOC_NUMBER (R_PARISC_PCREL16WF, 78) + RELOC_NUMBER (R_PARISC_PCREL16DF, 79) + + + RELOC_NUMBER (R_PARISC_DIR64, 80) + RELOC_NUMBER (R_PARISC_DIR64WR, 81) + RELOC_NUMBER (R_PARISC_DIR64DR, 82) + RELOC_NUMBER (R_PARISC_DIR14WR, 83) + RELOC_NUMBER (R_PARISC_DIR14DR, 84) + RELOC_NUMBER (R_PARISC_DIR16F, 85) + RELOC_NUMBER (R_PARISC_DIR16WF, 86) + RELOC_NUMBER (R_PARISC_DIR16DF, 87) + + RELOC_NUMBER (R_PARISC_GPREL64, 88) + + RELOC_NUMBER (R_PARISC_DLTREL14WR, 91) + RELOC_NUMBER (R_PARISC_DLTREL14DR, 92) + RELOC_NUMBER (R_PARISC_GPREL16F, 93) + RELOC_NUMBER (R_PARISC_GPREL16WF, 94) + RELOC_NUMBER (R_PARISC_GPREL16DF, 95) + + + RELOC_NUMBER (R_PARISC_LTOFF64, 96) + RELOC_NUMBER (R_PARISC_DLTIND14WR, 99) + RELOC_NUMBER (R_PARISC_DLTIND14DR, 100) + RELOC_NUMBER (R_PARISC_LTOFF16F, 101) + RELOC_NUMBER (R_PARISC_LTOFF16WF, 102) + RELOC_NUMBER (R_PARISC_LTOFF16DF, 103) + + RELOC_NUMBER (R_PARISC_SECREL64, 104) + + RELOC_NUMBER (R_PARISC_BASEREL14WR, 107) + RELOC_NUMBER (R_PARISC_BASEREL14DR, 108) + + RELOC_NUMBER (R_PARISC_SEGREL64, 112) + + RELOC_NUMBER (R_PARISC_PLTOFF14WR, 115) + RELOC_NUMBER (R_PARISC_PLTOFF14DR, 116) + RELOC_NUMBER (R_PARISC_PLTOFF16F, 117) + RELOC_NUMBER (R_PARISC_PLTOFF16WF, 118) + RELOC_NUMBER (R_PARISC_PLTOFF16DF, 119) + + RELOC_NUMBER (R_PARISC_LTOFF_FPTR64, 120) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F, 125) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126) + RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127) + + + RELOC_NUMBER (R_PARISC_COPY, 128) + RELOC_NUMBER (R_PARISC_IPLT, 129) + RELOC_NUMBER (R_PARISC_EPLT, 130) + + RELOC_NUMBER (R_PARISC_TPREL32, 153) + RELOC_NUMBER (R_PARISC_TPREL21L, 154) + RELOC_NUMBER (R_PARISC_TPREL14R, 158) + + RELOC_NUMBER (R_PARISC_LTOFF_TP21L, 162) + RELOC_NUMBER (R_PARISC_LTOFF_TP14R, 166) + RELOC_NUMBER (R_PARISC_LTOFF_TP14F, 167) + + RELOC_NUMBER (R_PARISC_TPREL64, 216) + RELOC_NUMBER (R_PARISC_TPREL14WR, 219) + RELOC_NUMBER (R_PARISC_TPREL14DR, 220) + RELOC_NUMBER (R_PARISC_TPREL16F, 221) + RELOC_NUMBER (R_PARISC_TPREL16WF, 222) + RELOC_NUMBER (R_PARISC_TPREL16DF, 223) + + RELOC_NUMBER (R_PARISC_LTOFF_TP64, 224) + RELOC_NUMBER (R_PARISC_LTOFF_TP14WR, 227) + RELOC_NUMBER (R_PARISC_LTOFF_TP14DR, 228) + RELOC_NUMBER (R_PARISC_LTOFF_TP16F, 229) + RELOC_NUMBER (R_PARISC_LTOFF_TP16WF, 230) + RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231) + EMPTY_RELOC (R_PARISC_UNIMPLEMENTED) END_RELOC_NUMBERS #ifndef RELOC_MACROS_GEN_FUNC -typedef enum elf32_hppa_reloc_type elf32_hppa_reloc_type; +typedef enum elf_hppa_reloc_type elf_hppa_reloc_type; #endif +#define PT_PARISC_ARCHEXT 0x70000000 +#define PT_PARISC_UNWIND 0x70000001 +#define PF_PARISC_SBP 0x08000000 +#define PF_HP_PAGE_SIZE 0x00100000 +#define PF_HP_FAR_SHARED 0x00200000 +#define PF_HP_NEAR_SHARED 0x00400000 +#define PF_HP_CODE 0x01000000 +#define PF_HP_MODIFY 0x02000000 +#define PF_HP_LAZYSWAP 0x04000000 +#define PF_HP_SBP 0x08000000 + + +/* Processor specific dynamic array tags. */ + +#define DT_HP_LOAD_MAP (DT_LOOS + 0x0) +#define DT_HP_DLD_FLAGS (DT_LOOS + 0x1) +#define DT_HP_DLD_HOOK (DT_LOOS + 0x2) +#define DT_HP_UX10_INIT (DT_LOOS + 0x3) +#define DT_HP_UX10_INITSZ (DT_LOOS + 0x4) +#define DT_HP_PREINIT (DT_LOOS + 0x5) +#define DT_HP_PREINITSZ (DT_LOOS + 0x6) +#define DT_HP_NEEDED (DT_LOOS + 0x7) +#define DT_HP_TIME_STAMP (DT_LOOS + 0x8) +#define DT_HP_CHECKSUM (DT_LOOS + 0x9) +#define DT_HP_GST_SIZE (DT_LOOS + 0xa) +#define DT_HP_GST_VERSION (DT_LOOS + 0xb) +#define DT_HP_GST_HASHVAL (DT_LOOS + 0xc) + +/* Values for DT_HP_DLD_FLAGS. */ +#define DT_HP_DEBUG_PRIVATE 0x0001 /* Map text private */ +#define DT_HP_DEBUG_CALLBACK 0x0002 /* Callback */ +#define DT_HP_DEBUG_CALLBACK_BOR 0x0004 /* BOR callback */ +#define DT_HP_NO_ENVVAR 0x0008 /* No env var */ +#define DT_HP_BIND_NOW 0x0010 /* Bind now */ +#define DT_HP_BIND_NONFATAL 0x0020 /* Bind non-fatal */ +#define DT_HP_BIND_VERBOSE 0x0040 /* Bind verbose */ +#define DT_HP_BIND_RESTRICTED 0x0080 /* Bind restricted */ +#define DT_HP_BIND_SYMBOLIC 0x0100 /* Bind symbolic */ +#define DT_HP_RPATH_FIRST 0x0200 /* RPATH first */ +#define DT_HP_BIND_DEPTH_FIRST 0x0400 /* Bind depth-first */ + +/* Program header extensions. */ +#define PT_HP_TLS (PT_LOOS + 0x0) +#define PT_HP_CORE_NONE (PT_LOOS + 0x1) +#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) +#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) +#define PT_HP_CORE_COMM (PT_LOOS + 0x4) +#define PT_HP_CORE_PROC (PT_LOOS + 0x5) +#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) +#define PT_HP_CORE_STACK (PT_LOOS + 0x7) +#define PT_HP_CORE_SHM (PT_LOOS + 0x8) +#define PT_HP_CORE_MMF (PT_LOOS + 0x9) +#define PT_HP_PARALLEL (PT_LOOS + 0x10) +#define PT_HP_FASTBIND (PT_LOOS + 0x11) + +/* Additional symbol types. */ +#define STT_HP_OPAQUE (STT_LOOS + 0x1) +#define STT_HP_STUB (STT_LOOS + 0x2) + #endif /* _ELF_HPPA_H */ diff --git a/include/elf/i370.h b/include/elf/i370.h new file mode 100644 index 000000000..9c021f00e --- /dev/null +++ b/include/elf/i370.h @@ -0,0 +1,46 @@ +/* i370 ELF support for BFD. + Copyright (C) 1995, 2000 Free Software Foundation, Inc. + +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 file holds definitions specific to the i370 ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_I370_H +#define _ELF_I370_H + +/* Processor specific section headers, sh_type field */ + +#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ + entries in this section \ + based on the address \ + specified in the associated \ + symbol table entry. */ + +#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */ +#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */ +/* Processor specific section flags, sh_flags field */ + +#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \ + this section from executable \ + and shared objects that it \ + builds when those objects \ + are not to be furhter \ + relocated. */ +#endif /* _ELF_I370_H */ + + diff --git a/include/elf/i386.h b/include/elf/i386.h index 219f10511..058666172 100644 --- a/include/elf/i386.h +++ b/include/elf/i386.h @@ -20,7 +20,7 @@ #ifndef _ELF_I386_H #define _ELF_I386_H -#include "reloc-macros.h" +#include "elf/reloc-macros.h" START_RELOC_NUMBERS (elf_i386_reloc_type) RELOC_NUMBER (R_386_NONE, 0) /* No reloc */ diff --git a/include/elf/i960.h b/include/elf/i960.h new file mode 100644 index 000000000..3e60289ea --- /dev/null +++ b/include/elf/i960.h @@ -0,0 +1,38 @@ +/* Intel 960 ELF support for BFD. + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_I960_H +#define _ELF_I960_H + +#include "elf/reloc-macros.h" + + +START_RELOC_NUMBERS (elf_i960_reloc_type) + RELOC_NUMBER (R_960_NONE, 0) + RELOC_NUMBER (R_960_12, 1) + RELOC_NUMBER (R_960_32, 2) + RELOC_NUMBER (R_960_IP24, 3) + RELOC_NUMBER (R_960_SUB, 4) + RELOC_NUMBER (R_960_OPTCALL, 5) + RELOC_NUMBER (R_960_OPTCALLX, 6) + RELOC_NUMBER (R_960_OPTCALLXA, 7) + EMPTY_RELOC (R_960_max) +END_RELOC_NUMBERS + +#endif /* _ELF_I960_H */ diff --git a/include/elf/m32r.h b/include/elf/m32r.h index 0537d1369..a12ae16ae 100644 --- a/include/elf/m32r.h +++ b/include/elf/m32r.h @@ -62,5 +62,7 @@ END_RELOC_NUMBERS /* m32r code. */ #define E_M32R_ARCH 0x00000000 +/* m32rx code. */ +#define E_M32RX_ARCH 0x10000000 #endif diff --git a/include/elf/m68k.h b/include/elf/m68k.h index db31cdcda..e2d51ef4a 100644 --- a/include/elf/m68k.h +++ b/include/elf/m68k.h @@ -53,4 +53,6 @@ START_RELOC_NUMBERS (elf_m68k_reloc_type) EMPTY_RELOC (R_68K_max) END_RELOC_NUMBERS +#define EF_CPU32 0x00810000 + #endif diff --git a/include/elf/mcore.h b/include/elf/mcore.h index a7c4dad11..62a88c909 100644 --- a/include/elf/mcore.h +++ b/include/elf/mcore.h @@ -1,4 +1,4 @@ -/* Motorolla MCore support for BFD. +/* Motorola MCore support for BFD. Copyright (C) 1995, 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -34,6 +34,10 @@ START_RELOC_NUMBERS (elf_mcore_reloc_type) RELOC_NUMBER (R_MCORE_PCRELJSR_IMM11BY2, 6) RELOC_NUMBER (R_MCORE_GNU_VTINHERIT, 7) RELOC_NUMBER (R_MCORE_GNU_VTENTRY, 8) + RELOC_NUMBER (R_MCORE_RELATIVE, 9) + RELOC_NUMBER (R_MCORE_COPY, 10) + RELOC_NUMBER (R_MCORE_GLOB_DAT, 11) + RELOC_NUMBER (R_MCORE_JUMP_SLOT, 12) EMPTY_RELOC (R_MCORE_max) END_RELOC_NUMBERS diff --git a/include/elf/mips.h b/include/elf/mips.h index c967248da..1e2a9f99a 100644 --- a/include/elf/mips.h +++ b/include/elf/mips.h @@ -75,6 +75,12 @@ START_RELOC_NUMBERS (elf_mips_reloc_type) /* These relocs are used for the mips16. */ RELOC_NUMBER (R_MIPS16_26, 100) RELOC_NUMBER (R_MIPS16_GPREL, 101) + /* These are GNU extensions to handle embedded-pic. */ + RELOC_NUMBER (R_MIPS_PC32, 248) + RELOC_NUMBER (R_MIPS_PC64, 249) + RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250) + RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251) + RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252) /* These are GNU extensions to enable C++ vtable garbage collection. */ RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253) RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254) @@ -617,10 +623,10 @@ extern void bfd_mips_elf32_swap_reginfo_out /* Special values for the st_other field in the symbol table. These are used in an Irix 5 dynamic symbol table. */ -#define STO_DEFAULT 0x00 -#define STO_INTERNAL 0x01 -#define STO_HIDDEN 0x02 -#define STO_PROTECTED 0x03 +#define STO_DEFAULT STV_DEFAULT +#define STO_INTERNAL STV_INTERNAL +#define STO_HIDDEN STV_HIDDEN +#define STO_PROTECTED STV_PROTECTED /* This value is used for a mips16 .text symbol. */ #define STO_MIPS16 0xf0 @@ -816,6 +822,40 @@ typedef struct bfd_vma ri_gp_value; } Elf64_Internal_RegInfo; +typedef struct +{ + /* The hash value computed from the name of the corresponding + dynamic symbol. */ + unsigned char ms_hash_value[4]; + /* Contains both the dynamic relocation index and the symbol flags + field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used + to access the individual values. The dynamic relocation index + identifies the first entry in the .rel.dyn section that + references the dynamic symbol corresponding to this msym entry. + If the index is 0, no dynamic relocations are associated with the + symbol. The symbol flags field is reserved for future use. */ + unsigned char ms_info[4]; +} Elf32_External_Msym; + +typedef struct +{ + /* The hash value computed from the name of the corresponding + dynamic symbol. */ + unsigned long ms_hash_value; + /* Contains both the dynamic relocation index and the symbol flags + field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used + to access the individual values. The dynamic relocation index + identifies the first entry in the .rel.dyn section that + references the dynamic symbol corresponding to this msym entry. + If the index is 0, no dynamic relocations are associated with the + symbol. The symbol flags field is reserved for future use. */ + unsigned long ms_info; +} Elf32_Internal_Msym; + +#define ELF32_MS_REL_INDEX(i) ((i) >> 8) +#define ELF32_MS_FLAGS(i) (i) & 0xff) +#define ELF32_MS_INFO(r, f) (((r) << 8) + ((f) & 0xff)) + /* MIPS ELF reginfo swapping routines. */ extern void bfd_mips_elf64_swap_reginfo_in PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *)); diff --git a/include/elf/mn10300.h b/include/elf/mn10300.h index 64a075045..1b90a1379 100644 --- a/include/elf/mn10300.h +++ b/include/elf/mn10300.h @@ -50,4 +50,5 @@ END_RELOC_NUMBERS the rest are open. */ #define E_MN10300_MACH_MN10300 0x00810000 +#define E_MN10300_MACH_AM33 0x00820000 #endif /* _ELF_MN10300_H */ diff --git a/include/elf/pj.h b/include/elf/pj.h new file mode 100644 index 000000000..6bb830652 --- /dev/null +++ b/include/elf/pj.h @@ -0,0 +1,45 @@ +/* picoJava ELF support for BFD. + Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _ELF_PJ_H +#define _ELF_PJ_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ + +START_RELOC_NUMBERS (elf_pj_reloc_type) + RELOC_NUMBER (R_PJ_NONE, 0) + RELOC_NUMBER (R_PJ_DATA_DIR32, 1) + RELOC_NUMBER (R_PJ_CODE_REL32, 2) + RELOC_NUMBER (R_PJ_CODE_REL16, 3) + RELOC_NUMBER (R_PJ_CODE_DIR32, 6) + RELOC_NUMBER (R_PJ_CODE_DIR16, 7) + RELOC_NUMBER (R_PJ_CODE_LO16, 13) + RELOC_NUMBER (R_PJ_CODE_HI16, 14) + RELOC_NUMBER (R_PJ_GNU_VTINHERIT, 15) + RELOC_NUMBER (R_PJ_GNU_VTENTRY, 16) + EMPTY_RELOC (R_PJ_max) +END_RELOC_NUMBERS + +#define EF_PICOJAVA_ARCH 0x0000000f +#define EF_PICOJAVA_NEWCALLS 0x00000010 +#define EF_PICOJAVA_GNUCALLS 0x00000020 /* The (currently) non standard GNU calling convention */ + +#endif diff --git a/include/elf/reloc-macros.h b/include/elf/reloc-macros.h index 976229129..42174caee 100644 --- a/include/elf/reloc-macros.h +++ b/include/elf/reloc-macros.h @@ -46,8 +46,8 @@ If RELOC_MACROS_GEN_FUNC *is* defined, then instead the following function will be generated: - static char * foo PARAMS ((unsigned long rtype)); - static char * + static const char * foo PARAMS ((unsigned long rtype)); + static const char * foo (rtype) unsigned long rtype; { diff --git a/include/elf/sh.h b/include/elf/sh.h index 4a476679a..faee50994 100644 --- a/include/elf/sh.h +++ b/include/elf/sh.h @@ -20,6 +20,33 @@ #ifndef _ELF_SH_H #define _ELF_SH_H +/* Processor specific flags for the ELF header e_flags field. */ + +#define EF_SH_MACH_MASK 0x1f +#define EF_SH_UNKNOWN 0 /* For backwards compatibility. */ +#define EF_SH1 1 +#define EF_SH2 2 +#define EF_SH3 3 +#define EF_SH_HAS_DSP(flags) ((flags) & 4) +#define EF_SH_DSP 4 +#define EF_SH3_DSP 5 +#define EF_SH_HAS_FP(flags) ((flags) & 8) +#define EF_SH3E 8 +#define EF_SH4 9 + +#define EF_SH_MERGE_MACH(mach1, mach2) \ + (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \ + || ((mach1) == EF_SH_DSP \ + && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \ + ? EF_SH3_DSP \ + : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \ + || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \ + ? EF_SH3 \ + : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \ + || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \ + ? EF_SH4 \ + : ((mach1) > (mach2) ? (mach1) : (mach2))) + #include "elf/reloc-macros.h" /* Relocations. */ diff --git a/include/elf/sparc.h b/include/elf/sparc.h index c9e4cdd40..390e4a844 100644 --- a/include/elf/sparc.h +++ b/include/elf/sparc.h @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ #define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */ #define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ +#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */ #define EF_SPARC_LEDATA 0x800000 /* little endian data */ @@ -128,6 +129,8 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type) /* little endian data relocs */ RELOC_NUMBER (R_SPARC_REV32, 56) + EMPTY_RELOC (R_SPARC_max_std) + RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250) RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251) @@ -136,21 +139,15 @@ END_RELOC_NUMBERS /* Relocation macros. */ -#define ELF64_R_TYPE_DATA(info) (((bfd_vma) (info) << 32) >> 40) -#define ELF64_R_TYPE_ID(info) (((bfd_vma) (info) << 56) >> 56) -#define ELF64_R_TYPE_INFO(data, type) (((bfd_vma) (data) << 8) \ - + (bfd_vma) (type)) - -#define DT_SPARC_REGISTER 0x70000001 +#define ELF64_R_TYPE_DATA(info) \ + (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000) +#define ELF64_R_TYPE_ID(info) \ + ((info) & 0xff) +#define ELF64_R_TYPE_INFO(data, type) \ + (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type)) -/* - * FIXME: NOT ABI -- GET RID OF THIS - * Defines the format used by the .plt. Currently defined values are - * 0 -- reserved to SI - * 1 -- absolute address in .got.plt - * 2 -- got-relative address in .got.plt - */ +/* Values for Elf64_Dyn.d_tag. */ -#define DT_SPARC_PLTFMT 0x70000001 +#define DT_SPARC_REGISTER 0x70000001 #endif /* _ELF_SPARC_H */ |