From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id EF0943858005; Thu, 10 Aug 2023 16:22:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF0943858005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691684566; bh=PhQfMWsfAOk2lREYTBekpNOz/jaHW0bFxtBlLMEQcWY=; h=From:To:Subject:Date:From; b=VKt80ZWLuVFJDR7tEnqWQl62GQX12zDQOKk2Hn1ENx47ty/bWgR5Q7rFlV2lPKYPi nT+Bl6I/1KdrJANnDDJFQpHrclywoszunSm3KTkudt4F7rFlFLPu5f3MUybFmDNcqn gl+c81kWmS8P7JZrXcJHj6tLi4SPSpLCbmch98yQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] x86_64: Fix build with --disable-multiarch (BZ 30721) X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: b163fca6c399808f6c447be98d09cd1165e78e07 X-Git-Newrev: 51cb52214fcd72849c640b12f5099ed3ac776181 Message-Id: <20230810162246.EF0943858005@sourceware.org> Date: Thu, 10 Aug 2023 16:22:46 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=51cb52214fcd72849c640b12f5099ed3ac776181 commit 51cb52214fcd72849c640b12f5099ed3ac776181 Author: Adhemerval Zanella Date: Tue Aug 8 09:27:54 2023 -0300 x86_64: Fix build with --disable-multiarch (BZ 30721) With multiarch disabled, the default memmove implementation provides the fortify routines for memcpy, mempcpy, and memmove. However, it does not provide the internal hidden definitions used when building with fortify enabled. The memset has a similar issue. Checked on x86_64-linux-gnu building with different options: default and --disable-multi-arch plus default, --disable-default-pie, --enable-fortify-source={2,3}, and --enable-fortify-source={2,3} with --disable-default-pie. Tested-by: Andreas K. Huettel Reviewed-by: Siddhesh Poyarekar Diff: --- sysdeps/x86_64/memcpy.S | 2 +- sysdeps/x86_64/memmove.S | 3 +++ sysdeps/x86_64/memset.S | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S index d98500a78a..4922cba657 100644 --- a/sysdeps/x86_64/memcpy.S +++ b/sysdeps/x86_64/memcpy.S @@ -1 +1 @@ -/* Implemented in memcpy.S. */ +/* Implemented in memmove.S. */ diff --git a/sysdeps/x86_64/memmove.S b/sysdeps/x86_64/memmove.S index f0b84e3b52..c3c08165e1 100644 --- a/sysdeps/x86_64/memmove.S +++ b/sysdeps/x86_64/memmove.S @@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy) #ifndef USE_MULTIARCH libc_hidden_builtin_def (memmove) +libc_hidden_builtin_def (__memmove_chk) +libc_hidden_builtin_def (__memcpy_chk) +libc_hidden_builtin_def (__mempcpy_chk) # if defined SHARED && IS_IN (libc) strong_alias (memmove, __memcpy) libc_hidden_ver (memmove, memcpy) diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S index 7c99df36db..c6df24e8de 100644 --- a/sysdeps/x86_64/memset.S +++ b/sysdeps/x86_64/memset.S @@ -32,6 +32,7 @@ #include "isa-default-impl.h" libc_hidden_builtin_def (memset) +libc_hidden_builtin_def (__memset_chk) #if IS_IN (libc) libc_hidden_def (__wmemset)