blob: f9b8c85afcfba2b6f7d905424b484e81f315bda4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- include/elfhacks.h.orig 2020-08-16 16:54:20 UTC
+++ include/elfhacks.h
@@ -58,6 +58,16 @@ extern "C" {
# endif
#endif
+#ifndef __ELF_NATIVE_CLASS
+#define __ELF_NATIVE_CLASS __WORDSIZE
+#endif
+
+/* We use this macro to refer to ELF types independent of the native wordsize.
+ `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
+#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
+#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
+#define _ElfW_1(e,w,t) e##w##t
+
/**
* \defgroup elfhacks elfhacks
* Elfhacks is a collection of functions that aim for retvieving
|