diff options
author | Andreas Tobler <andreast@sourceware.org> | 2011-03-15 21:03:44 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@sourceware.org> | 2011-03-15 21:03:44 +0000 |
commit | 7470fc63007e0e9291d3a96af88771c86fae7e52 (patch) | |
tree | 190d688113942b242a22abaa0c2a5efe3fb73ea3 /gdb/testsuite/gdb.base/jit-main.c | |
parent | b5215db0fff69b1142ff88553a90390ca53a5bed (diff) | |
download | gdb-7470fc63007e0e9291d3a96af88771c86fae7e52.zip gdb-7470fc63007e0e9291d3a96af88771c86fae7e52.tar.gz gdb-7470fc63007e0e9291d3a96af88771c86fae7e52.tar.bz2 |
2011-03-15 Andreas Tobler <andreast@fgznet.ch>
* gdb.base/jit-main.c: Define ElfW for non glibc elf targets.
Diffstat (limited to 'gdb/testsuite/gdb.base/jit-main.c')
-rw-r--r-- | gdb/testsuite/gdb.base/jit-main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/jit-main.c b/gdb/testsuite/gdb.base/jit-main.c index 07ff198..b20c516 100644 --- a/gdb/testsuite/gdb.base/jit-main.c +++ b/gdb/testsuite/gdb.base/jit-main.c @@ -29,6 +29,19 @@ #include <sys/mman.h> #include <sys/stat.h> +/* ElfW is coming from linux. On other platforms it does not exist. + Let us define it here. */ +#ifndef ElfW +# if (defined (_LP64) || defined (__LP64__)) +# define WORDSIZE 64 +# else +# define WORDSIZE 32 +# endif /* _LP64 || __LP64__ */ +#define ElfW(type) _ElfW (Elf, WORDSIZE, type) +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) +#define _ElfW_1(e,w,t) e##w##t +#endif /* !ElfW */ + typedef enum { JIT_NOACTION = 0, |