From e4452a2d19279d4c90bcafe09ec3cbfd3efe9b6a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 15 Feb 2018 20:59:12 +0000 Subject: Use libc_hidden_* for __cmsg_nxthdr (bug 15105). Among other localplt test failures when building with -Os, there are libc.so PLT references for __cmsg_nxthdr. This is a simple case of a function that is inlined for -O2 but not for -Os; this patch adds libc_hidden_proto / libc_hidden_def for it to avoid a localplt failure even when it is not inlined. Tested for x86_64 (both that it removes this particular localplt failure for -Os - but other such failures remain so the bug can't yet be closed - and that the testsuite continues to pass without -Os). [BZ #15105] * include/sys/socket.h [!_ISOMAC] (__cmsg_nxthdr): Use libc_hidden_proto. * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Use libc_hidden_def. --- sysdeps/unix/sysv/linux/cmsg_nxthdr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c index fa0468efda..bab0be6884 100644 --- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c +++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c @@ -37,3 +37,4 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg) return NULL; return cmsg; } +libc_hidden_def (__cmsg_nxthdr) -- cgit 1.4.1