mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
MFppc64:
Provide ELF definitions for 64-bit PowerPC. This unbreaks the powerpc loader build.
This commit is contained in:
parent
cd646aba81
commit
d83af91b99
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209945
@ -36,14 +36,26 @@
|
||||
* [ppc-eabi-1995-01.pdf] for details.
|
||||
*/
|
||||
|
||||
#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
|
||||
|
||||
#ifndef __ELF_WORD_SIZE
|
||||
#ifdef __powerpc64__
|
||||
#define __ELF_WORD_SIZE 64 /* Used by <sys/elf_generic.h> */
|
||||
#else
|
||||
#define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
|
||||
#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
|
||||
#include <sys/elf_generic.h>
|
||||
|
||||
#if __ELF_WORD_SIZE == 64
|
||||
#define ELF_ARCH EM_PPC64
|
||||
#define ELF_MACHINE_OK(x) ((x) == EM_PPC64)
|
||||
#else
|
||||
#define ELF_ARCH EM_PPC
|
||||
|
||||
#define ELF_ARCH32 EM_PPC
|
||||
#define ELF_MACHINE_OK(x) ((x) == EM_PPC)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Auxiliary vector entries for passing information to the interpreter.
|
||||
@ -61,6 +73,15 @@ typedef struct { /* Auxiliary vector entry on initial stack */
|
||||
} a_un;
|
||||
} Elf32_Auxinfo;
|
||||
|
||||
typedef struct { /* Auxiliary vector entry on initial stack */
|
||||
long a_type; /* Entry type. */
|
||||
union {
|
||||
long a_val; /* Integer value. */
|
||||
void *a_ptr; /* Address. */
|
||||
void (*a_fcn)(void); /* Function pointer (not used). */
|
||||
} a_un;
|
||||
} Elf64_Auxinfo;
|
||||
|
||||
__ElfType(Auxinfo);
|
||||
|
||||
/* Values for a_type. */
|
||||
@ -91,10 +112,17 @@ __ElfType(Auxinfo);
|
||||
#define R_PPC_EMB_COUNT (R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1)
|
||||
|
||||
/* Define "machine" characteristics */
|
||||
#if __ELF_WORD_SIZE == 64
|
||||
#define ELF_TARG_CLASS ELFCLASS64
|
||||
#define ELF_TARG_DATA ELFDATA2MSB
|
||||
#define ELF_TARG_MACH EM_PPC64
|
||||
#define ELF_TARG_VER 1
|
||||
#else
|
||||
#define ELF_TARG_CLASS ELFCLASS32
|
||||
#define ELF_TARG_DATA ELFDATA2MSB
|
||||
#define ELF_TARG_MACH EM_PPC
|
||||
#define ELF_TARG_VER 1
|
||||
#endif
|
||||
|
||||
#define ET_DYN_LOAD_ADDR 0x01010000
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user