diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-09-06 13:20:39 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-09-06 13:20:39 +0000 |
commit | 18f9950911d3d126c8157849341a35418d8a2dd4 (patch) | |
tree | ea84e62922f5ab697aebef6198d198c9af06e41d /dev-util/elfkickers/files | |
parent | Apply patch to disable striping, we handle it by PM. (diff) | |
download | gentoo-2-18f9950911d3d126c8157849341a35418d8a2dd4.tar.gz gentoo-2-18f9950911d3d126c8157849341a35418d8a2dd4.tar.bz2 gentoo-2-18f9950911d3d126c8157849341a35418d8a2dd4.zip |
Patch for missing ELF defs on FreeBSD, bug #380085
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/elfkickers/files')
-rw-r--r-- | dev-util/elfkickers/files/add-freebsd-elf-defs.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-util/elfkickers/files/add-freebsd-elf-defs.patch b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch new file mode 100644 index 000000000000..792a91d6dfb2 --- /dev/null +++ b/dev-util/elfkickers/files/add-freebsd-elf-defs.patch @@ -0,0 +1,68 @@ +--- ./elfrw/elfrw.h.orig 2011-05-31 01:47:08.000000000 +0200 ++++ ./elfrw/elfrw.h 2011-06-08 12:16:37.000000000 +0200 +@@ -10,6 +10,24 @@ + #include <stdio.h> + #include <elf.h> + ++#ifdef __FreeBSD__ ++typedef uint16_t Elf64_Section; ++ ++#define PT_GNU_STACK 0x6474e551 ++#define PT_GNU_RELRO 0x6474e552 ++ ++#if __FreeBSD_version < 700022 ++#define SHT_GNU_HASH 0x6ffffff6 ++#define EM_CRIS 76 ++#define EM_M32R 88 ++#define EM_MN10300 89 ++#endif ++ ++#define ELFCLASSNUM 3 ++#define ELFDATANUM 3 ++#define EV_NUM 2 ++#endif ++ + /* + * The initialization functions. Call one of these to set the flavor + * of ELF structures to translate to and from. The library can be +--- ./elftoc/readelf.h.orig 2011-05-22 20:46:29.000000000 +0200 ++++ ./elftoc/readelf.h 2011-06-08 12:16:37.000000000 +0200 +@@ -7,6 +7,12 @@ + #ifndef _readelf_h_ + #define _readelf_h_ + ++#ifdef __FreeBSD__ ++#define ELFCLASSNUM 3 ++#define ELFDATANUM 3 ++#define EV_NUM 2 ++#endif ++ + /* Read all of the basic headers from the file image (namely the ELF + * header, the program segment header table, and the section header + * table). False is returned if the file could not be parsed as an ELF +--- ./elftoc/pieces.c.orig 2011-05-26 03:25:14.000000000 +0200 ++++ ./elftoc/pieces.c 2011-06-08 12:16:37.000000000 +0200 +@@ -16,6 +16,10 @@ + #include "out.h" + #include "pieces.h" + ++#ifdef __FreeBSD__ ++typedef uint64_t Elf32_Xword; ++#endif ++ + /* Flags used to insert warnings in the generated source code. + */ + #define PW_MISALIGNED 0x0001 /* piece misaligned for original type */ +--- ./elftoc/outbase.h.orig 2011-05-22 20:46:29.000000000 +0200 ++++ ./elftoc/outbase.h 2011-06-08 12:16:37.000000000 +0200 +@@ -7,6 +7,10 @@ + #ifndef _outbase_h_ + #define _outbase_h_ + ++#ifdef __FreeBSD__ ++#define NT_AUXV 6 ++#endif ++ + /* Set the current output file. Call this before calling any output + * functions. (The FILE* argument is given as a void* so as to not + * include stdio.h here.) |