This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix vsyslog namespace (bug 18533)


syslog functions (in POSIX) bring in the strong symbol vsyslog (not in
POSIX).  This patch fixes this by changing this symbol from a strong
alias to a weak alias.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).  (vsyslog becomes weak
in the static libraries, which is what's needed; the particular macro
sequence in use leaves it as strong in the shared libraries, hence
those libraries being completely unchanged, but it doesn't generally
matter whether symbols exported from the shared libraries are weak or
strong.)

2015-06-14  Joseph Myers  <joseph@codesourcery.com>

	[BZ #18533]
	* misc/syslog.c (vsyslog): Define as a weak alias of __vsyslog,
	not a strong alias.
	* conform/Makefile (test-xfail-XOPEN2K8/syslog.h/linknamespace):
	Remove variable.

diff --git a/conform/Makefile b/conform/Makefile
index 9ad7601..567046f 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -359,4 +359,3 @@ test-xfail-XOPEN2K/fmtmsg.h/linknamespace = yes
 test-xfail-XOPEN2K/syslog.h/linknamespace = yes
 test-xfail-POSIX2008/semaphore.h/linknamespace = yes
 test-xfail-XOPEN2K8/fmtmsg.h/linknamespace = yes
-test-xfail-XOPEN2K8/syslog.h/linknamespace = yes
diff --git a/misc/syslog.c b/misc/syslog.c
index 3979f42..35cae6c 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -324,7 +324,7 @@ __vsyslog(int pri, const char *fmt, va_list ap)
   __vsyslog_chk (pri, -1, fmt, ap);
 }
 ldbl_hidden_def (__vsyslog, vsyslog)
-ldbl_strong_alias (__vsyslog, vsyslog)
+ldbl_weak_alias (__vsyslog, vsyslog)
 
 static struct sockaddr_un SyslogAddr;	/* AF_UNIX address of local logger */
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]