mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-02 02:31:07 +00:00
hack libelf to work
This commit is contained in:
parent
3df5e3bd13
commit
c70816ace7
@ -19,10 +19,6 @@
|
|||||||
#ifndef _ELF_H
|
#ifndef _ELF_H
|
||||||
#define _ELF_H 1
|
#define _ELF_H 1
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
|
||||||
|
|
||||||
/* Standard ELF types. */
|
/* Standard ELF types. */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -3683,6 +3679,4 @@ enum
|
|||||||
#define R_BPF_NONE 0 /* No reloc */
|
#define R_BPF_NONE 0 /* No reloc */
|
||||||
#define R_BPF_MAP_FD 1 /* Map fd to pointer */
|
#define R_BPF_MAP_FD 1 /* Map fd to pointer */
|
||||||
|
|
||||||
__END_DECLS
|
|
||||||
|
|
||||||
#endif /* elf.h */
|
#endif /* elf.h */
|
||||||
|
@ -31,10 +31,9 @@
|
|||||||
#define _COMMON_H 1
|
#define _COMMON_H 1
|
||||||
|
|
||||||
#include <ar.h>
|
#include <ar.h>
|
||||||
#include <byteswap.h>
|
|
||||||
#include <endian.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
|
||||||
|
@ -56,8 +56,10 @@
|
|||||||
#define N_(Str) Str
|
#define N_(Str) Str
|
||||||
|
|
||||||
/* Compiler-specific definitions. */
|
/* Compiler-specific definitions. */
|
||||||
#define strong_alias(name, aliasname) \
|
//#define strong_alias(name, aliasname) \
|
||||||
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
|
// extern __typeof (name) aliasname __attribute__ ((alias (#name)));
|
||||||
|
|
||||||
|
#define strong_alias(name, aliasname)
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# define internal_function __attribute__ ((regparm (3), stdcall))
|
# 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"
|
# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
|
||||||
#endif
|
#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 */
|
#endif /* eu-config.h */
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <endian.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -40,6 +39,7 @@
|
|||||||
#include "gelf.h"
|
#include "gelf.h"
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
#include "elf-knowledge.h"
|
#include "elf-knowledge.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#ifndef LIBELFBITS
|
#ifndef LIBELFBITS
|
||||||
# define LIBELFBITS 32
|
# define LIBELFBITS 32
|
||||||
|
@ -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]);
|
* __libelf_type_sizes[0][ELFW(ELFCLASS,LIBELFBITS) - 1][type]);
|
||||||
#endif
|
#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))
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <endian.h>
|
|
||||||
#include <libelf.h>
|
#include <libelf.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -40,6 +39,7 @@
|
|||||||
#include <system.h>
|
#include <system.h>
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
#include "elf-knowledge.h"
|
#include "elf-knowledge.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#ifndef LIBELFBITS
|
#ifndef LIBELFBITS
|
||||||
# define LIBELFBITS 32
|
# define LIBELFBITS 32
|
||||||
|
@ -32,10 +32,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <endian.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#ifndef LIBELFBITS
|
#ifndef LIBELFBITS
|
||||||
# define LIBELFBITS 32
|
# define LIBELFBITS 32
|
||||||
|
@ -32,10 +32,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <endian.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#ifndef LIBELFBITS
|
#ifndef LIBELFBITS
|
||||||
# define LIBELFBITS 32
|
# define LIBELFBITS 32
|
||||||
|
@ -32,13 +32,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <libintl.h>
|
//#include <libintl.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
|
||||||
|
#define N_(x) x
|
||||||
|
|
||||||
/* The error number. */
|
/* The error number. */
|
||||||
static /* __thread */ int global_error;
|
static /* __thread */ int global_error;
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <byteswap.h>
|
|
||||||
#include <endian.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -44,7 +42,7 @@
|
|||||||
#include <system.h>
|
#include <system.h>
|
||||||
#include <dl-hash.h>
|
#include <dl-hash.h>
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p)
|
read_number_entries (uint64_t *nump, Elf *elf, size_t *offp, bool index64_p)
|
||||||
|
@ -31,12 +31,12 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <byteswap.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "libelfP.h"
|
#include "libelfP.h"
|
||||||
|
#include "portable_endian.h"
|
||||||
|
|
||||||
#ifndef LIBELFBITS
|
#ifndef LIBELFBITS
|
||||||
# define LIBELFBITS 32
|
# define LIBELFBITS 32
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* gettext helper macros. */
|
/* 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. */
|
/* Helper Macros to write 32 bit and 64 bit functions. */
|
||||||
#define __elfw2_(Bits, Name) __elf##Bits##_##Name
|
#define __elfw2_(Bits, Name) __elf##Bits##_##Name
|
||||||
|
Loading…
Reference in New Issue
Block a user