diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-06 06:01:11 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-06 06:01:11 +0200 |
commit | b4484a96aa8488ed8e4f04d6947af23677504fe7 (patch) | |
tree | 71771568abb52d9d20ba744c5437a5315aa4fa99 /src/compat/compat-asm.h | |
parent | c1230ed0e553709f4490ff09b06631be795ca7cd (diff) |
compat: account for ancient ARM assembler
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat-asm.h')
-rw-r--r-- | src/compat/compat-asm.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/compat/compat-asm.h b/src/compat/compat-asm.h index c49f766..8ce3045 100644 --- a/src/compat/compat-asm.h +++ b/src/compat/compat-asm.h @@ -8,6 +8,7 @@ #include <linux/linkage.h> #include <linux/kconfig.h> +#include <linux/version.h> /* PaX compatibility */ #if defined(RAP_PLUGIN) @@ -15,4 +16,28 @@ #define ENTRY RAP_ENTRY #endif +#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) + .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo + .macro ret\c, reg +#if __LINUX_ARM_ARCH__ < 6 + mov\c pc, \reg +#else + .ifeqs "\reg", "lr" + bx\c \reg + .else + mov\c pc, \reg + .endif +#endif + .endm + .endr +#endif + +#if defined(__LINUX_ARM_ARCH__) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) +#include <asm/assembler.h> +#define lspush push +#define lspull pull +#undef push +#undef pull +#endif + #endif /* _WG_COMPATASM_H */ |