* [PATCH] s390x: Add hidden definition for __sigsetjmp
@ 2016-11-14 14:57 Florian Weimer
2016-11-15 13:19 ` Stefan Liebler
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2016-11-14 14:57 UTC (permalink / raw)
To: libc-alpha
2016-11-14 Florian Weimer <fweimer@redhat.com>
* sysdeps/s390/s390-64/setjmp.S (NEED_COMPAT_SYMBOLS): New macro.
(libc_hidden_def): Remove redefinition.
(__sigsetjmp): Add hidden definition.
* sysdeps/s390/s390-32/setjmp.S (NEED_COMPAT_SYMBOLS): New macro.
(libc_hidden_def): Remove redefinition.
(__sigsetjmp): Add hidden definition.
diff --git a/sysdeps/s390/s390-32/setjmp.S b/sysdeps/s390/s390-32/setjmp.S
index dbacb0f..c460b5e 100644
--- a/sysdeps/s390/s390-32/setjmp.S
+++ b/sysdeps/s390/s390-32/setjmp.S
@@ -24,17 +24,15 @@
#include <shlib-compat.h>
#include <stap-probe.h>
-#if !IS_IN (rtld)
-# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
- /* we need a unique name in case of symbol versioning. */
-# define setjmp __v1setjmp
-# define _setjmp __v1_setjmp
-# define __sigsetjmp __v1__sigsetjmp
-
-# undef libc_hidden_def
-# define libc_hidden_def(name) strong_alias(_setjmp, __GI__setjmp)
-# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* !IS_IN (rtld) */
+#if !IS_IN (rtld) && defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+# define NEED_COMPAT_SYMBOLS 1
+/* We need a unique name in case of symbol versioning. */
+# define setjmp __v1setjmp
+# define _setjmp __v1_setjmp
+# define __sigsetjmp __v1__sigsetjmp
+#else
+# define NEED_COMPAT_SYMBOLS 0
+#endif
/* We include the BSD entry points here as well. */
ENTRY (setjmp)
@@ -47,7 +45,11 @@ ENTRY(_setjmp)
lhi %r3,0 /* second argument of zero */
j .Linternal_sigsetjmp /* branch relativ to __sigsetjmp */
END (_setjmp)
+#if NEED_COMPAT_SYMBOLS
+strong_alias (_setjmp, __GI__setjmp)
+#else
libc_hidden_def (_setjmp)
+#endif
ENTRY(__setjmp)
lhi %r3,0 /* second argument of zero */
@@ -92,15 +94,19 @@ ENTRY(__sigsetjmp)
.L1: .long __sigjmp_save
#endif
END (__sigsetjmp)
+#if NEED_COMPAT_SYMBOLS
+strong_alias (__sigsetjmp, __GI___sigsetjmp)
+#else
+libc_hidden_def (__sigsetjmp)
+#endif
-#if !IS_IN (rtld)
-# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+#if NEED_COMPAT_SYMBOLS
/* In glibc release 2.19 new versions of setjmp-functions were introduced,
but were reverted before 2.20. Thus both versions are the same function. */
-# undef setjmp
-# undef _setjmp
-# undef __sigsetjmp
+# undef setjmp
+# undef _setjmp
+# undef __sigsetjmp
strong_alias (__v1setjmp, __v2setjmp);
versioned_symbol (libc, __v1setjmp, setjmp, GLIBC_2_0);
@@ -113,5 +119,4 @@ compat_symbol (libc, __v2_setjmp, _setjmp, GLIBC_2_19);
strong_alias (__v1__sigsetjmp, __v2__sigsetjmp);
versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
-# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* if !IS_IN (rtld) */
+#endif /* NEED_COMPAT_SYMBOLS */
diff --git a/sysdeps/s390/s390-64/setjmp.S b/sysdeps/s390/s390-64/setjmp.S
index bbcb70d..09f1a8d 100644
--- a/sysdeps/s390/s390-64/setjmp.S
+++ b/sysdeps/s390/s390-64/setjmp.S
@@ -24,17 +24,15 @@
#include <shlib-compat.h>
#include <stap-probe.h>
-#if !IS_IN (rtld)
-# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
- /* we need a unique name in case of symbol versioning. */
-# define setjmp __v1setjmp
-# define _setjmp __v1_setjmp
-# define __sigsetjmp __v1__sigsetjmp
-
-# undef libc_hidden_def
-# define libc_hidden_def(name) strong_alias(_setjmp, __GI__setjmp)
-# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* !IS_IN (rtld) */
+#if !IS_IN (rtld) && defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+# define NEED_COMPAT_SYMBOLS 1
+/* We need a unique name in case of symbol versioning. */
+# define setjmp __v1setjmp
+# define _setjmp __v1_setjmp
+# define __sigsetjmp __v1__sigsetjmp
+#else
+# define NEED_COMPAT_SYMBOLS 0
+#endif
/* We include the BSD entry points here as well. */
ENTRY (setjmp)
@@ -47,7 +45,11 @@ ENTRY(_setjmp)
slgr %r3,%r3 /* Second argument of zero. */
j .Linternal_sigsetjmp /* Branch relativ to __sigsetjmp. */
END (_setjmp)
+#if NEED_COMPAT_SYMBOLS
+strong_alias (_setjmp, __GI__setjmp)
+#else
libc_hidden_def (_setjmp)
+#endif
ENTRY(__setjmp)
slgr %r3,%r3 /* Second argument of zero. */
@@ -87,15 +89,19 @@ ENTRY(__sigsetjmp)
jg __sigjmp_save
#endif
END (__sigsetjmp)
+#if NEED_COMPAT_SYMBOLS
+strong_alias (__sigsetjmp, __GI___sigsetjmp)
+#else
+libc_hidden_def (__sigsetjmp)
+#endif
-#if !IS_IN (rtld)
-# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+#if NEED_COMPAT_SYMBOLS
/* In glibc release 2.19 new versions of setjmp-functions were introduced,
but were reverted before 2.20. Thus both versions are the same function. */
-# undef setjmp
-# undef _setjmp
-# undef __sigsetjmp
+# undef setjmp
+# undef _setjmp
+# undef __sigsetjmp
strong_alias (__v1setjmp, __v2setjmp);
versioned_symbol (libc, __v1setjmp, setjmp, GLIBC_2_0);
@@ -108,5 +114,4 @@ compat_symbol (libc, __v2_setjmp, _setjmp, GLIBC_2_19);
strong_alias (__v1__sigsetjmp, __v2__sigsetjmp);
versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
-# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* if !IS_IN (rtld) */
+#endif /* NEED_COMPAT_SYMBOLS */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] s390x: Add hidden definition for __sigsetjmp
2016-11-14 14:57 [PATCH] s390x: Add hidden definition for __sigsetjmp Florian Weimer
@ 2016-11-15 13:19 ` Stefan Liebler
2016-11-15 14:52 ` Florian Weimer
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Liebler @ 2016-11-15 13:19 UTC (permalink / raw)
To: libc-alpha
Hi Florian,
See the small comment below. Otherwise this patch is okay.
Thanks.
On 11/14/2016 03:57 PM, Florian Weimer wrote:
> 2016-11-14 Florian Weimer <fweimer@redhat.com>
>
> * sysdeps/s390/s390-64/setjmp.S (NEED_COMPAT_SYMBOLS): New macro.
> (libc_hidden_def): Remove redefinition.
> (__sigsetjmp): Add hidden definition.
> * sysdeps/s390/s390-32/setjmp.S (NEED_COMPAT_SYMBOLS): New macro.
> (libc_hidden_def): Remove redefinition.
> (__sigsetjmp): Add hidden definition.
>
> diff --git a/sysdeps/s390/s390-32/setjmp.S b/sysdeps/s390/s390-32/setjmp.S
> index dbacb0f..c460b5e 100644
> --- a/sysdeps/s390/s390-32/setjmp.S
> +++ b/sysdeps/s390/s390-32/setjmp.S
> @@ -24,17 +24,15 @@
> #include <shlib-compat.h>
> #include <stap-probe.h>
>
> -#if !IS_IN (rtld)
> -# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
> - /* we need a unique name in case of symbol versioning. */
> -# define setjmp __v1setjmp
> -# define _setjmp __v1_setjmp
> -# define __sigsetjmp __v1__sigsetjmp
> -
> -# undef libc_hidden_def
> -# define libc_hidden_def(name) strong_alias(_setjmp, __GI__setjmp)
> -# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
> -#endif /* !IS_IN (rtld) */
> +#if !IS_IN (rtld) && defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
This line is too long and there are two spaces between && and SHLIB_COMPAT.
The same applies to sysdeps/s390/s390-64/setjmp.S.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] s390x: Add hidden definition for __sigsetjmp
2016-11-15 13:19 ` Stefan Liebler
@ 2016-11-15 14:52 ` Florian Weimer
0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2016-11-15 14:52 UTC (permalink / raw)
To: Stefan Liebler, libc-alpha
On 11/15/2016 02:18 PM, Stefan Liebler wrote:
>> -#endif /* !IS_IN (rtld) */
>> +#if !IS_IN (rtld) && defined SHARED && SHLIB_COMPAT (libc,
>> GLIBC_2_19, GLIBC_2_20)
> This line is too long and there are two spaces between && and SHLIB_COMPAT.
> The same applies to sysdeps/s390/s390-64/setjmp.S.
Thanks. Fixed & re-tested & pushed.
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-15 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-14 14:57 [PATCH] s390x: Add hidden definition for __sigsetjmp Florian Weimer
2016-11-15 13:19 ` Stefan Liebler
2016-11-15 14:52 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).