public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for __cmsg_nxthdr (bug 15105).
@ 2021-11-15 22:40 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-11-15 22:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f39edfdeefcc823371cf6104aee76e45fb02825

commit 8f39edfdeefcc823371cf6104aee76e45fb02825
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Feb 15 20:59:12 2018 +0000

    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.
    
    (cherry picked from commit e4452a2d19279d4c90bcafe09ec3cbfd3efe9b6a)

Diff:
---
 include/sys/socket.h                  | 2 ++
 sysdeps/unix/sysv/linux/cmsg_nxthdr.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/sys/socket.h b/include/sys/socket.h
index baec6e6439..26db0e0d77 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 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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for __cmsg_nxthdr (bug 15105).
@ 2021-11-19 21:21 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-11-19 21:21 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=633d14073f5d2f257e12ceffcdcd2ada51483af5

commit 633d14073f5d2f257e12ceffcdcd2ada51483af5
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Feb 15 20:59:12 2018 +0000

    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.
    
    (cherry picked from commit e4452a2d19279d4c90bcafe09ec3cbfd3efe9b6a)

Diff:
---
 include/sys/socket.h                  | 2 ++
 sysdeps/unix/sysv/linux/cmsg_nxthdr.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/sys/socket.h b/include/sys/socket.h
index baec6e6439..26db0e0d77 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 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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-19 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 22:40 [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for __cmsg_nxthdr (bug 15105) Fangrui Song
2021-11-19 21:21 Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).