]> git.ipfire.org Git - thirdparty/glibc.git/commit
Use libc_hidden_* for __cmsg_nxthdr (bug 15105).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 15 Feb 2018 20:59:12 +0000 (20:59 +0000)
committerFangrui Song <maskray@google.com>
Fri, 19 Nov 2021 21:20:26 +0000 (13:20 -0800)
commit633d14073f5d2f257e12ceffcdcd2ada51483af5
tree555104fb58fba5fef24e1ae6a768d6fcbc095e96
parentd7c1214f4d417119c4cca5c36c2adfc4d83be8fc
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)
include/sys/socket.h
sysdeps/unix/sysv/linux/cmsg_nxthdr.c