diff options
author | peter <peter@FreeBSD.org> | 2003-05-01 03:46:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-05-01 03:46:12 +0000 |
commit | 4303109c6b194cd3d3ac0f38a7ad85c8f3b800a6 (patch) | |
tree | cc7ec87e501cf347c051a9d2ec5b8d17000149a9 | |
parent | 957453a3d6786f4818fbd27a7f852964acadfa16 (diff) | |
download | FreeBSD-src-4303109c6b194cd3d3ac0f38a7ad85c8f3b800a6.zip FreeBSD-src-4303109c6b194cd3d3ac0f38a7ad85c8f3b800a6.tar.gz |
Hack to enable getting two different elf32 and elf64 loaders in the
same i386 loader binary.
-rw-r--r-- | sys/i386/include/elf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/i386/include/elf.h b/sys/i386/include/elf.h index 46d512c..c9ec741 100644 --- a/sys/i386/include/elf.h +++ b/sys/i386/include/elf.h @@ -34,8 +34,14 @@ */ #include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */ +#if defined(__ELF_WORD_SIZE) && __ELF_WORD_SIZE == 64 +#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */ +#endif +#ifndef __ELF_WORD_SIZE #define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */ +#endif + #include <sys/elf_generic.h> #define ELF_ARCH EM_386 @@ -58,6 +64,13 @@ typedef struct { /* Auxiliary vector entry on initial stack */ } a_un; } Elf32_Auxinfo; +#if __ELF_WORD_SIZE == 64 +/* Fake for amd64 loader support */ +typedef struct { + int fake; +} Elf64_Auxinfo; +#endif + __ElfType(Auxinfo); /* Values for a_type. */ |