hack libelf to work

This commit is contained in:
Wolfgang Thaller 2017-09-28 23:44:08 +02:00
parent 3df5e3bd13
commit c70816ace7
12 changed files with 21 additions and 23 deletions

View File

@ -19,10 +19,6 @@
#ifndef _ELF_H
#define _ELF_H 1
#include <features.h>
__BEGIN_DECLS
/* Standard ELF types. */
#include <stdint.h>
@ -3683,6 +3679,4 @@ enum
#define R_BPF_NONE 0 /* No reloc */
#define R_BPF_MAP_FD 1 /* Map fd to pointer */
__END_DECLS
#endif /* elf.h */

View File

@ -31,10 +31,9 @@
#define _COMMON_H 1
#include <ar.h>
#include <byteswap.h>
#include <endian.h>
#include <stdlib.h>
#include <string.h>
#include "portable_endian.h"
#include "libelfP.h"

View File

@ -56,8 +56,10 @@
#define N_(Str) Str
/* Compiler-specific definitions. */
#define strong_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
//#define strong_alias(name, aliasname) \
// extern __typeof (name) aliasname __attribute__ ((alias (#name)));
#define strong_alias(name, aliasname)
#ifdef __i386__
# define internal_function __attribute__ ((regparm (3), stdcall))
@ -186,5 +188,8 @@ asm (".section predict_data, \"aw\"; .previous\n"
# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
#endif
#define bswap_16(x) __builtin_bswap16(x)
#define bswap_32(x) __builtin_bswap32(x)
#define bswap_64(x) __builtin_bswap64(x)
#endif /* eu-config.h */

View File

@ -32,7 +32,6 @@
#endif
#include <assert.h>
#include <endian.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
@ -40,6 +39,7 @@
#include "gelf.h"
#include "libelfP.h"
#include "elf-knowledge.h"
#include "portable_endian.h"
#ifndef LIBELFBITS
# define LIBELFBITS 32

View File

@ -64,5 +64,6 @@ elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version)
* __libelf_type_sizes[0][ELFW(ELFCLASS,LIBELFBITS) - 1][type]);
#endif
}
#define local_strong_alias(n1, n2) strong_alias (n1, n2)
local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS, msize))
//#define local_strong_alias(n1, n2) strong_alias (n1, n2)
//local_strong_alias (elfw2(LIBELFBITS, fsize), __elfw2(LIBELFBITS, msize))

View File

@ -32,7 +32,6 @@
#endif
#include <assert.h>
#include <endian.h>
#include <libelf.h>
#include <stdbool.h>
#include <string.h>
@ -40,6 +39,7 @@
#include <system.h>
#include "libelfP.h"
#include "elf-knowledge.h"
#include "portable_endian.h"
#ifndef LIBELFBITS
# define LIBELFBITS 32

View File

@ -32,10 +32,10 @@
#endif
#include <assert.h>
#include <endian.h>
#include <string.h>
#include "libelfP.h"
#include "portable_endian.h"
#ifndef LIBELFBITS
# define LIBELFBITS 32

View File

@ -32,10 +32,10 @@
#endif
#include <assert.h>
#include <endian.h>
#include <string.h>
#include "libelfP.h"
#include "portable_endian.h"
#ifndef LIBELFBITS
# define LIBELFBITS 32

View File

@ -32,13 +32,14 @@
#endif
#include <assert.h>
#include <libintl.h>
//#include <libintl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "libelfP.h"
#define N_(x) x
/* The error number. */
static /* __thread */ int global_error;

View File

@ -32,8 +32,6 @@
#endif
#include <assert.h>
#include <byteswap.h>
#include <endian.h>
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
@ -44,7 +42,7 @@
#include <system.h>
#include <dl-hash.h>
#include "libelfP.h"
#include "portable_endian.h"
static int
read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p)

View File

@ -31,12 +31,12 @@
# include <config.h>
#endif
#include <byteswap.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "libelfP.h"
#include "portable_endian.h"
#ifndef LIBELFBITS
# define LIBELFBITS 32

View File

@ -40,8 +40,8 @@
#include <string.h>
/* gettext helper macros. */
#define _(Str) dgettext ("elfutils", Str)
//#define _(Str) dgettext ("elfutils", Str)
#define _(Str) Str
/* Helper Macros to write 32 bit and 64 bit functions. */
#define __elfw2_(Bits, Name) __elf##Bits##_##Name