diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-06-10 10:55:58 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-06-10 10:55:58 +0000 |
commit | a7e831079363e3bb45f3172f6e59ba48e335682b (patch) | |
tree | ee4324eac9a9d66f189fab60498ec42b8226b7fc /gnu/usr.bin/binutils/include/elf | |
parent | 467cb0a471d13c5186a6ee166e60b47c30da64e9 (diff) |
Bring Cygnus versions into the trunk, keeping our local patches
Diffstat (limited to 'gnu/usr.bin/binutils/include/elf')
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/ChangeLog | 54 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/common.h | 5 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/internal.h | 29 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/mips.h | 188 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/ppc.h | 18 |
5 files changed, 286 insertions, 8 deletions
diff --git a/gnu/usr.bin/binutils/include/elf/ChangeLog b/gnu/usr.bin/binutils/include/elf/ChangeLog index 573427f4a5d..76b7908287f 100644 --- a/gnu/usr.bin/binutils/include/elf/ChangeLog +++ b/gnu/usr.bin/binutils/include/elf/ChangeLog @@ -1,6 +1,58 @@ +Fri May 31 17:28:05 1996 Ian Lance Taylor <ian@cygnus.com> + + * mips.h (Elf_External_Options, Elf_Internal_Options): Define. + (bfd_mips_elf_swap_options_in): Declare. + (bfd_mips_elf_swap_options_out): Declare. + (ODK_*): Define. + (Elf64_External_RegInfo, Elf64_Internal_RegInfo): Define. + (bfd_mips_elf64_swap_reginfo_in): Declare. + (bfd_mips_elf64_swap_reginfo_out): Declare. + +Thu May 30 12:35:57 1996 Ian Lance Taylor <ian@cygnus.com> + + * mips.h (E_MIPS_ARCH_4): Define. + +Wed May 29 15:35:33 1996 Ian Lance Taylor <ian@cygnus.com> + + * mips.h (Elf64_Mips_External_Rel): Define. + (Elf64_Mips_Internal_Rel): Define. + (Elf64_Mips_External_Rela, Elf64_Mips_Internal_Rela): Define. + (RSS_*): Define. + +Mon Apr 22 18:26:30 1996 Doug Evans <dje@canuck.cygnus.com> + + * sparc.h (R_SPARC_[56]): Always define. + +Mon Feb 19 01:55:56 1996 Doug Evans <dje@charmed.cygnus.com> + + * sparc.h (R_SPARC_{PLT32,HIPLT22,LOPLT10,PCPLT32,PCPLT22, + PCPLT10,5,6}): Don't define ifdef SPARC64_OLD_RELOCS. + +Tue Feb 6 11:33:58 1996 Doug Evans <dje@charmed.cygnus.com> + + * sparc.h (enum sparc_elf_reloc_type): Define. + +Wed Jan 17 09:09:16 1996 Doug Evans <dje@canuck.cygnus.com> + + * common.h: Define EM_SPARC32PLUS. + * sparc.h: New file. + +Thu Jan 11 16:27:34 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * ppc.h (SHF_EXCLUDE, SHT_ORDERED): New fields from the abi. + +Thu Nov 30 16:47:18 1995 Ian Lance Taylor <ian@cygnus.com> + + * internal.h (struct elf_segment_map): Add includes_filehdr and + includes_phdrs fields. + +Tue Nov 28 16:58:10 1995 Ian Lance Taylor <ian@cygnus.com> + + * internal.h (struct elf_segment_map): Define. + Tue Oct 31 15:19:36 1995 Fred Fish <fnf@cygnus.com> - * arc.h, common.h, dwarf.h, external.h, hppa.h, internal.h, + * common.h, dwarf.h, external.h, hppa.h, internal.h, mips.h, ppc.h: Protect against multiple inclusions. Thu Sep 21 13:51:58 1995 Michael Meissner <meissner@tiktok.cygnus.com> diff --git a/gnu/usr.bin/binutils/include/elf/common.h b/gnu/usr.bin/binutils/include/elf/common.h index 541564ca1e6..c9e74741c57 100644 --- a/gnu/usr.bin/binutils/include/elf/common.h +++ b/gnu/usr.bin/binutils/include/elf/common.h @@ -1,5 +1,5 @@ /* ELF support for BFD. - Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -85,6 +85,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_SPARC64 11 /* SPARC v9 (not official) 64-bit */ #define EM_PARISC 15 /* HPPA */ + +#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ + #define EM_PPC 20 /* PowerPC */ /* If it is necessary to assign new unofficial EM_* values, please pick large diff --git a/gnu/usr.bin/binutils/include/elf/internal.h b/gnu/usr.bin/binutils/include/elf/internal.h index c4229808d13..6375e892051 100644 --- a/gnu/usr.bin/binutils/include/elf/internal.h +++ b/gnu/usr.bin/binutils/include/elf/internal.h @@ -175,4 +175,33 @@ typedef struct elf_internal_dyn { #define Elf32_Internal_Dyn Elf_Internal_Dyn #define Elf64_Internal_Dyn Elf_Internal_Dyn +/* This structure is used to describe how sections should be assigned + to program segments. */ + +struct elf_segment_map +{ + /* Next program segment. */ + struct elf_segment_map *next; + /* Program segment type. */ + unsigned long p_type; + /* Program segment flags. */ + unsigned long p_flags; + /* Program segment physical address. */ + bfd_vma p_paddr; + /* Whether the p_flags field is valid; if not, the flags are based + on the section flags. */ + unsigned int p_flags_valid : 1; + /* Whether the p_paddr field is valid; if not, the physical address + is based on the section lma values. */ + unsigned int p_paddr_valid : 1; + /* Whether this segment includes the file header. */ + unsigned int includes_filehdr : 1; + /* Whether this segment includes the program headers. */ + unsigned int includes_phdrs : 1; + /* Number of sections (may be 0). */ + unsigned int count; + /* Sections. Actual number of elements is in count field. */ + asection *sections[1]; +}; + #endif /* _ELF_INTERNAL_H */ diff --git a/gnu/usr.bin/binutils/include/elf/mips.h b/gnu/usr.bin/binutils/include/elf/mips.h index f0d8cd78965..618fc3ebd2f 100644 --- a/gnu/usr.bin/binutils/include/elf/mips.h +++ b/gnu/usr.bin/binutils/include/elf/mips.h @@ -1,5 +1,5 @@ /* MIPS ELF support for BFD. - Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from information in the System V Application Binary Interface, MIPS @@ -50,6 +50,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* -mips3 code. */ #define E_MIPS_ARCH_3 0x20000000 + +/* -mips4 code. */ +#define E_MIPS_ARCH_4 0x30000000 /* Processor specific section indices. These sections do not actually exist. Symbols with a st_shndx field corresponding to one of these @@ -100,14 +103,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Section contains register usage information. */ #define SHT_MIPS_REGINFO 0x70000006 -/* Section contains miscellaneous options (used on Irix). */ +/* Section contains miscellaneous options. */ #define SHT_MIPS_OPTIONS 0x7000000d -/* DWARF debugging section (used on Irix 6). */ +/* DWARF debugging section. */ #define SHT_MIPS_DWARF 0x7000001e -/* Events section. This appears on Irix 6. I don't know what it - means. */ +/* Events section. */ #define SHT_MIPS_EVENTS 0x70000021 /* A section of type SHT_MIPS_LIBLIST contains an array of the @@ -294,5 +296,181 @@ extern void bfd_mips_elf32_swap_reginfo_out #define STO_INTERNAL 0x01 #define STO_HIDDEN 0x02 #define STO_PROTECTED 0x03 + +/* The 64-bit MIPS ELF ABI uses an usual reloc format. Each + relocation entry specifies up to three actual relocations, all at + the same address. The first relocation which required a symbol + uses the symbol in the r_sym field. The second relocation which + requires a symbol uses the symbol in the r_ssym field. If all + three relocations require a symbol, the third one uses a zero + value. */ + +/* An entry in a 64 bit SHT_REL section. */ + +typedef struct +{ + /* Address of relocation. */ + unsigned char r_offset[8]; + /* Symbol index. */ + unsigned char r_sym[4]; + /* Special symbol. */ + unsigned char r_ssym[1]; + /* Third relocation. */ + unsigned char r_type3[1]; + /* Second relocation. */ + unsigned char r_type2[1]; + /* First relocation. */ + unsigned char r_type[1]; +} Elf64_Mips_External_Rel; + +typedef struct +{ + /* Address of relocation. */ + bfd_vma r_offset; + /* Symbol index. */ + unsigned long r_sym; + /* Special symbol. */ + unsigned char r_ssym; + /* Third relocation. */ + unsigned char r_type3; + /* Second relocation. */ + unsigned char r_type2; + /* First relocation. */ + unsigned char r_type; +} Elf64_Mips_Internal_Rel; + +/* An entry in a 64 bit SHT_RELA section. */ + +typedef struct +{ + /* Address of relocation. */ + unsigned char r_offset[8]; + /* Symbol index. */ + unsigned char r_sym[4]; + /* Special symbol. */ + unsigned char r_ssym[1]; + /* Third relocation. */ + unsigned char r_type3[1]; + /* Second relocation. */ + unsigned char r_type2[1]; + /* First relocation. */ + unsigned char r_type[1]; + /* Addend. */ + unsigned char r_addend[8]; +} Elf64_Mips_External_Rela; + +typedef struct +{ + /* Address of relocation. */ + bfd_vma r_offset; + /* Symbol index. */ + unsigned long r_sym; + /* Special symbol. */ + unsigned char r_ssym; + /* Third relocation. */ + unsigned char r_type3; + /* Second relocation. */ + unsigned char r_type2; + /* First relocation. */ + unsigned char r_type; + /* Addend. */ + bfd_signed_vma r_addend; +} Elf64_Mips_Internal_Rela; + +/* Values found in the r_ssym field of a relocation entry. */ + +/* No relocation. */ +#define RSS_UNDEF 0 + +/* Value of GP. */ +#define RSS_GP 1 + +/* Value of GP in object being relocated. */ +#define RSS_GP0 2 + +/* Address of location being relocated. */ +#define RSS_LOC 3 + +/* A SHT_MIPS_OPTIONS section contains a series of options, each of + which starts with this header. */ + +typedef struct +{ + /* Type of option. */ + unsigned char kind[1]; + /* Size of option descriptor, including header. */ + unsigned char size[1]; + /* Section index of affected section, or 0 for global option. */ + unsigned char section[2]; + /* Information specific to this kind of option. */ + unsigned char info[4]; +} Elf_External_Options; + +typedef struct +{ + /* Type of option. */ + unsigned char kind; + /* Size of option descriptor, including header. */ + unsigned char size; + /* Section index of affected section, or 0 for global option. */ + unsigned short section; + /* Information specific to this kind of option. */ + unsigned long info; +} Elf_Internal_Options; + +/* MIPS ELF option header swapping routines. */ +extern void bfd_mips_elf_swap_options_in + PARAMS ((bfd *, const Elf_External_Options *, Elf_Internal_Options *)); +extern void bfd_mips_elf_swap_options_out + PARAMS ((bfd *, const Elf_Internal_Options *, Elf_External_Options *)); + +/* Values which may appear in the kind field of an Elf_Options + structure. */ + +/* Undefined. */ +#define ODK_NULL 0 + +/* Register usage and GP value. */ +#define ODK_REGINFO 1 + +/* Exception processing information. */ +#define ODK_EXCEPTIONS 2 + +/* Section padding information. */ +#define ODK_PAD 3 + +/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_Reginfo + structure. In the 64 bit ABI, it is the following structure. The + info field of the options header is not used. */ + +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned char ri_gprmask[4]; + /* Padding. */ + unsigned char ri_pad[4]; + /* Mask of co-processor registers used. */ + unsigned char ri_cprmask[4][4]; + /* GP register value for this object file. */ + unsigned char ri_gp_value[8]; +} Elf64_External_RegInfo; + +typedef struct +{ + /* Mask of general purpose registers used. */ + unsigned long ri_gprmask; + /* Padding. */ + unsigned long ri_pad; + /* Mask of co-processor registers used. */ + unsigned long ri_cprmask[4]; + /* GP register value for this object file. */ + bfd_vma ri_gp_value; +} Elf64_Internal_RegInfo; + +/* MIPS ELF reginfo swapping routines. */ +extern void bfd_mips_elf64_swap_reginfo_in + PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *)); +extern void bfd_mips_elf64_swap_reginfo_out + PARAMS ((bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *)); #endif /* _ELF_MIPS_H */ diff --git a/gnu/usr.bin/binutils/include/elf/ppc.h b/gnu/usr.bin/binutils/include/elf/ppc.h index 7e4323a8e43..1da118ddd84 100644 --- a/gnu/usr.bin/binutils/include/elf/ppc.h +++ b/gnu/usr.bin/binutils/include/elf/ppc.h @@ -1,4 +1,4 @@ -/* MIPS PPC support for BFD. +/* PPC ELF support for BFD. Copyright (C) 1995 Free Software Foundation, Inc. By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information @@ -35,4 +35,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */ #define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */ +/* Processor specific section headers, sh_type field */ + +#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ + entries in this section \ + based on the address \ + specified in the associated \ + symbol table entry. */ + +/* Processor specific section flags, sh_flags field */ + +#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \ + this section from executable \ + and shared objects that it \ + builds when those objects \ + are not to be furhter \ + relocated. */ #endif /* _ELF_PPC_H */ |