From patchwork Tue Feb 13 21:06:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 25927 Received: (qmail 4628 invoked by alias); 13 Feb 2018 21:06:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4618 invoked by uid 89); 13 Feb 2018 21:06:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=among X-HELO: relay1.mentorg.com Date: Tue, 13 Feb 2018 21:06:49 +0000 From: Joseph Myers To: Subject: Use libc_hidden_* for __cmsg_nxthdr (bug 15105) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) 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). 2018-02-13 Joseph Myers [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. Reviewed-by: Adhemerval Zanella diff --git a/include/sys/socket.h b/include/sys/socket.h index baec6e6..26db0e0 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -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 diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c index fa0468e..bab0be6 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)