diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2024-02-05 14:22:06 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2024-02-06 09:17:04 +0100 |
commit | fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7 (patch) | |
tree | 8e27c39601591c096173b9675866996c7f46df22 | |
parent | 1e25112dc0cb2515d27d8d178b1ecce778a9d37a (diff) | |
download | glibc-fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7.tar glibc-fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7.tar.gz glibc-fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7.tar.bz2 glibc-fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7.zip |
string: Add hidden builtin definition for __strcpy_chk.
Otherwise on at least x86_64 and s390x there is an unwanted PLT entry
in libc.so when configured with --enable-fortify-source=3 and build
with -Os.
This is observed in elf/check-localplt
Extra PLT reference: libc.so: __strcpy_chk
The call to PLT entry is in inet/ruserpass.c.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | debug/strcpy_chk.c | 1 | ||||
-rw-r--r-- | include/string.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/debug/strcpy_chk.c b/debug/strcpy_chk.c index e54780ddde..dd2c453417 100644 --- a/debug/strcpy_chk.c +++ b/debug/strcpy_chk.c @@ -31,3 +31,4 @@ __strcpy_chk (char *dest, const char *src, size_t destlen) return memcpy (dest, src, len + 1); } +libc_hidden_builtin_def (__strcpy_chk) diff --git a/include/string.h b/include/string.h index 86d1fa4abe..3b4c6007d7 100644 --- a/include/string.h +++ b/include/string.h @@ -215,6 +215,7 @@ libc_hidden_builtin_proto (__mempcpy_chk) libc_hidden_builtin_proto (__memset_chk) libc_hidden_builtin_proto (__stpcpy_chk) libc_hidden_builtin_proto (__strncpy_chk) +libc_hidden_builtin_proto (__strcpy_chk) #endif |