S390: Get rid of linknamespace failures for utmp functions.
Commit Message
Hi,
i get the following linknamespace-testsuite failures on s390-32:
FAIL: conform/POSIX2008/glob.h/linknamespace
FAIL: conform/XOPEN2K8/glob.h/linknamespace
[initial] glob -> [libc.a(glob.o)] getlogin_r -> [libc.a(getlogin_r.o)]
__libc_utmp_jump_table -> [libc.a(getutent_r.o)] getutent_r
[initial] glob -> [libc.a(glob.o)] getlogin_r -> [libc.a(getlogin_r.o)]
__libc_utmp_jump_table -> [libc.a(getutent_r.o)] pututline
conform/POSIX2008/glob.h/linknamespace.out (END)
FAIL: conform/POSIX2008/wordexp.h/linknamespace
FAIL: conform/XOPEN2K8/wordexp.h/linknamespace
[initial] wordexp -> [libc.a(wordexp.o)] glob -> [libc.a(glob.o)]
getlogin_r -> [libc.a(getlogin_r.o)] __libc_utmp_jump_table ->
[libc.a(getutent_r.o)] getutent_r
[initial] wordexp -> [libc.a(wordexp.o)] glob -> [libc.a(glob.o)]
getlogin_r -> [libc.a(getlogin_r.o)] __libc_utmp_jump_table ->
[libc.a(getutent_r.o)] pututline
conform/POSIX2008/wordexp.h/linknamespace.out (END)
FAIL: conform/UNIX98/utmpx.h/linknamespace
FAIL: conform/XOPEN2K/utmpx.h/linknamespace
FAIL: conform/XOPEN2K8/utmpx.h/linknamespace
FAIL: conform/XPG4/utmpx.h/linknamespace
[initial] getutxent -> [libc.a(getutxent.o)] __getutent ->
[libc.a(getutent.o)] getutent
[initial] endutxent -> [libc.a(endutxent.o)] __endutent ->
[libc.a(getutent_r.o)] getutent_r
[initial] getutxid -> [libc.a(getutxid.o)] __getutid ->
[libc.a(getutid.o)] getutid
[initial] getutxid -> [libc.a(getutxid.o)] __getutid ->
[libc.a(getutid.o)] __getutid_r -> [libc.a(getutid_r.o)] getutid_r
[initial] getutxline -> [libc.a(getutxline.o)] __getutline ->
[libc.a(getutline.o)] getutline
[initial] getutxline -> [libc.a(getutxline.o)] __getutline ->
[libc.a(getutline.o)] __getutline_r -> [libc.a(getutline_r.o)] getutline_r
[initial] endutxent -> [libc.a(endutxent.o)] __endutent ->
[libc.a(getutent_r.o)] pututline
conform/XOPEN2K/utmpx.h/linknamespace.out (END)
The commit 4057dc459ae9de59c67628db3db844c7a3765d00
introduced symbol-versioning for those utmp functions with
the macro default_symbol_version, which expands to strong_alias
in the STATIC-case.
But in common-code those funtions are weak aliased.
Thus this patch uses default_symbol_version in the SHARED-case
and weak_alias in the STATIC-case.
The mentioned testsuite-failues are passing now
and there are no new failures.
Ok to commit?
Bye
Stefan
---
2015-01-14 Stefan Liebler <stli@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
(getutent): Use weak_alias in non SHARED case
and default_symbol_version in SHARED case.
* sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
(getutent_r, pututline): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
(getutid): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c
(getutid_r): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
(getutline): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c
(getutline_r): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
(updwtmp): Likewise.
Comments
As usual, if the bug (i.e. the strong references to unreserved symbols)
was present in a release, a report should be filed in Bugzilla for it, a
[BZ #N] entry put in the ChangeLog entry and the bug number included in
the list of fixed bugs in NEWS, and then that bug closed once the fix is
checked in.
@@ -21,8 +21,12 @@
#include "utmp-compat.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutent.c"
+#if defined SHARED
default_symbol_version (__getutent, getutent, UTMP_COMPAT_BASE);
+#endif
@@ -23,12 +23,16 @@
#include "utmp-compat.h"
#include "utmp-private.h"
+#if defined SHARED
weak_alias (__setutent, setutent)
weak_alias (__endutent, endutent)
-#undef weak_alias
-#define weak_alias(n,a)
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutent_r.c"
+#if defined SHARED
default_symbol_version (__getutent_r, getutent_r, UTMP_COMPAT_BASE);
default_symbol_version (__pututline, pututline, UTMP_COMPAT_BASE);
+#endif
@@ -21,8 +21,12 @@
#include "utmp-compat.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutid.c"
+#if defined SHARED
default_symbol_version (__getutid, getutid, UTMP_COMPAT_BASE);
+#endif
@@ -24,8 +24,12 @@
#include "utmp-compat.h"
#include "utmp-private.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutid_r.c"
+#if defined SHARED
default_symbol_version (__getutid_r, getutid_r, UTMP_COMPAT_BASE);
+#endif
@@ -21,8 +21,12 @@
#include "utmp-compat.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutline.c"
+#if defined SHARED
default_symbol_version (__getutline, getutline, UTMP_COMPAT_BASE);
+#endif
@@ -23,8 +23,12 @@
#include "utmp-compat.h"
#include "utmp-private.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "login/getutline_r.c"
+#if defined SHARED
default_symbol_version (__getutline_r, getutline_r, UTMP_COMPAT_BASE);;
+#endif
@@ -21,8 +21,12 @@
#include "utmp-compat.h"
#include "utmp-private.h"
-#undef weak_alias
-#define weak_alias(n,a)
+#if defined SHARED
+# undef weak_alias
+# define weak_alias(n,a)
+#endif
#include "sysdeps/gnu/updwtmp.c"
+#if defined SHARED
default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);
+#endif