From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1962) id 48E593858C2C; Tue, 6 Feb 2024 08:17:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48E593858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707207467; bh=qstS0z6bvKXvhJE4frkyEpZrT4BUxqwJJHhc3aecXF8=; h=From:To:Subject:Date:From; b=BZHsnNbn7whhm3J9G0TyY1qFc2NBnNukPIiglzMGZnPoynEngJuz90lZXmoCTEHBJ KC5srNi5QfRG+gYU40Ft/ydy+7VmEh/0kRgLYH6J99BmZQT35BYHPM+j6w4gOM+lOO I2nbNPkWADIniscKK86B8h8yt9ON6/EXID6h18Bk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Stefan Liebler To: glibc-cvs@sourceware.org Subject: [glibc] string: Add hidden builtin definition for __strcpy_chk. X-Act-Checkin: glibc X-Git-Author: Stefan Liebler X-Git-Refname: refs/heads/master X-Git-Oldrev: 1e25112dc0cb2515d27d8d178b1ecce778a9d37a X-Git-Newrev: fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7 Message-Id: <20240206081747.48E593858C2C@sourceware.org> Date: Tue, 6 Feb 2024 08:17:47 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7 commit fa3eb7d5e7d32ca1ad48b48a7eb6d15b8382c3a7 Author: Stefan Liebler Date: Mon Feb 5 14:22:06 2024 +0100 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 Diff: --- debug/strcpy_chk.c | 1 + include/string.h | 1 + 2 files changed, 2 insertions(+) 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