From 73d5e101ad867e3db2d7cba06df0fd7a91182ac1 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Sat, 2 Jan 2021 18:33:27 -0800 Subject: [PATCH] build: respect EXPORT_UNPREFIXED for libucontext_makecontext --- arch/aarch64/makecontext.c | 3 ++- arch/arm/makecontext.c | 3 ++- arch/m68k/makecontext.c | 3 ++- arch/ppc/makecontext.c | 3 ++- arch/ppc64/makecontext.c | 3 ++- arch/riscv64/makecontext.c | 3 ++- arch/s390x/makecontext.c | 3 ++- arch/sh/makecontext.c | 3 ++- arch/x86/makecontext.c | 3 ++- arch/x86_64/makecontext.c | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/arch/aarch64/makecontext.c b/arch/aarch64/makecontext.c index fb291c5..fcc6ffd 100644 --- a/arch/aarch64/makecontext.c +++ b/arch/aarch64/makecontext.c @@ -52,5 +52,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/arm/makecontext.c b/arch/arm/makecontext.c index 9d1ba8d..6e98907 100644 --- a/arch/arm/makecontext.c +++ b/arch/arm/makecontext.c @@ -56,5 +56,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/m68k/makecontext.c b/arch/m68k/makecontext.c index 2cbc0f7..a454688 100644 --- a/arch/m68k/makecontext.c +++ b/arch/m68k/makecontext.c @@ -55,5 +55,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg *sp++ = (libucontext_greg_t) ucp->uc_link; } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/ppc/makecontext.c b/arch/ppc/makecontext.c index cc2a882..2c1325c 100644 --- a/arch/ppc/makecontext.c +++ b/arch/ppc/makecontext.c @@ -55,5 +55,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(), int argc, . va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/ppc64/makecontext.c b/arch/ppc64/makecontext.c index 9a9d8b2..891f85e 100644 --- a/arch/ppc64/makecontext.c +++ b/arch/ppc64/makecontext.c @@ -56,5 +56,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(), int argc, . va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/riscv64/makecontext.c b/arch/riscv64/makecontext.c index d8609f8..57b9bc3 100644 --- a/arch/riscv64/makecontext.c +++ b/arch/riscv64/makecontext.c @@ -56,5 +56,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/s390x/makecontext.c b/arch/s390x/makecontext.c index e74c6f3..e306680 100644 --- a/arch/s390x/makecontext.c +++ b/arch/s390x/makecontext.c @@ -62,5 +62,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg ucp->uc_mcontext.gregs[15] = (uintptr_t) sp; } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/sh/makecontext.c b/arch/sh/makecontext.c index ac0c2b7..1430a35 100644 --- a/arch/sh/makecontext.c +++ b/arch/sh/makecontext.c @@ -53,5 +53,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/x86/makecontext.c b/arch/x86/makecontext.c index fc292f9..14d0355 100644 --- a/arch/x86/makecontext.c +++ b/arch/x86/makecontext.c @@ -53,5 +53,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg *argp++ = (uintptr_t) ucp->uc_link; } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif diff --git a/arch/x86_64/makecontext.c b/arch/x86_64/makecontext.c index 53b85f2..33156b7 100644 --- a/arch/x86_64/makecontext.c +++ b/arch/x86_64/makecontext.c @@ -74,5 +74,6 @@ libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int arg va_end(va); } - +#ifdef EXPORT_UNPREFIXED extern __typeof(libucontext_makecontext) makecontext __attribute__((weak, __alias__("libucontext_makecontext"))); +#endif