From b4ba33e33b6d64913c08ed1809e711ce98422454 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 6 Oct 2018 06:01:11 +0200 Subject: compat: account for ancient ARM assembler --- src/compat/compat-asm.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/compat/compat-asm.h') 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 #include +#include /* 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 +#define lspush push +#define lspull pull +#undef push +#undef pull +#endif + #endif /* _WG_COMPATASM_H */ -- cgit v1.2.3-59-g8ed1b