]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
string: Add hidden builtin definition for __strcpy_chk.
authorStefan Liebler <stli@linux.ibm.com>
Mon, 5 Feb 2024 13:22:06 +0000 (14:22 +0100)
committerStefan Liebler <stli@linux.ibm.com>
Tue, 6 Feb 2024 08:17:04 +0000 (09:17 +0100)
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>
debug/strcpy_chk.c
include/string.h

index e54780dddeac6826ffa29fe2607145aa7e0eb859..dd2c453417d7e0c65896a15841bd27724191b54e 100644 (file)
@@ -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)
index 86d1fa4abe7c58eb231bbad4483c70a51ffdf48b..3b4c6007d789949bd0a9b3f307c585cb881996d2 100644 (file)
@@ -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