Mercurial > pub > dyncall > dyncall
changeset 268:03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
author | Tassilo Philipp |
---|---|
date | Sat, 27 May 2017 19:57:34 +0200 |
parents | f8fe0f87b7c1 |
children | 3581366858a6 |
files | dyncall/dyncall_call.S dyncall/dyncall_macros.h dyncallback/dyncall_callback_arch.S |
diffstat | 3 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dyncall/dyncall_call.S Sat May 27 19:18:23 2017 +0200 +++ b/dyncall/dyncall_call.S Sat May 27 19:57:34 2017 +0200 @@ -77,3 +77,11 @@ # endif #endif + +/* Use .note.GNU-stack to explicitly indicate a non-exec stack, b/c of bad */ +/* default behaviour when translating handwritten assembly files (needed on */ +/* GNU/* platforms, Android and FreeBSD, as tests have shown). */ +#if (defined(DC__C_CLANG) || defined(DC__C_GNU)) && defined(__ELF__) && (defined(DC__OS_Linux) || defined(DC__OS_FreeBSD)) +.section .note.GNU-stack,"",%progbits +#endif +
--- a/dyncall/dyncall_macros.h Sat May 27 19:18:23 2017 +0200 +++ b/dyncall/dyncall_macros.h Sat May 27 19:57:34 2017 +0200 @@ -142,7 +142,7 @@ #define DC__C_MSVC /* LLVM clang. */ -#elif defined(__clang__) +#elif defined(__clang__) || defined(__llvm__) #define DC__C_CLANG /* The GNU Compiler Collection - GCC. */
--- a/dyncallback/dyncall_callback_arch.S Sat May 27 19:18:23 2017 +0200 +++ b/dyncallback/dyncall_callback_arch.S Sat May 27 19:57:34 2017 +0200 @@ -79,3 +79,11 @@ # endif #endif + +/* Use .note.GNU-stack to explicitly indicate a non-exec stack, b/c of bad */ +/* default behaviour when translating handwritten assembly files (needed on */ +/* GNU/* platforms, Android and FreeBSD, as tests have shown). */ +#if (defined(DC__C_CLANG) || defined(DC__C_GNU)) && defined(__ELF__) && (defined(DC__OS_Linux) || defined(DC__OS_FreeBSD)) +.section .note.GNU-stack,"",%progbits +#endif +