]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libc_hidden_* for __cmsg_nxthdr (bug 15105).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 15 Feb 2018 20:59:12 +0000 (20:59 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 15 Feb 2018 20:59:12 +0000 (20:59 +0000)
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.

ChangeLog
include/sys/socket.h
sysdeps/unix/sysv/linux/cmsg_nxthdr.c

index 36ee49336afc93f0ba5590c797e919431d434996..1d9e54b250f63621c95db942a5955f6923af437e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-02-15  Joseph Myers  <joseph@codesourcery.com>
 
+       [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.
+
        [BZ #15105]
        * include/stdio.h [!_ISOMAC && IS_IN (libc)] (fputs): Use
        libc_hidden_proto.
index baec6e6439a089ec895ac1a5939526b550aae11f..26db0e0d7731a14ce9f98234d32933d2350243be 100644 (file)
@@ -154,5 +154,7 @@ libc_hidden_proto (__libc_sa_len)
 # define SA_LEN(_x)      __libc_sa_len((_x)->sa_family)
 #endif
 
+libc_hidden_proto (__cmsg_nxthdr)
+
 #endif
 #endif
index fa0468efdaa447a361e269b916d2bad25e7c9878..bab0be6884d9da1c1c7eec133cac86ce4b8a2ba2 100644 (file)
@@ -37,3 +37,4 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
     return NULL;
   return cmsg;
 }
+libc_hidden_def (__cmsg_nxthdr)