From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id CE4F43858C78 for ; Sat, 12 Mar 2022 14:22:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CE4F43858C78 Received: from [IPv6:240e:358:11d9:b600:dc73:854d:832e:4] (unknown [IPv6:240e:358:11d9:b600:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 12F5465EE8 for ; Sat, 12 Mar 2022 09:22:08 -0500 (EST) Message-ID: <84f7610cf64aa40e838a8289100517b2318d8bc6.camel@mengyan1223.wang> Subject: [PATCH] gold: don't invoke IA32 syscall in x86_64 assembly testcase From: Xi Ruoyao To: binutils@sourceware.org Date: Sat, 12 Mar 2022 22:21:58 +0800 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3038.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2022 14:22:13 -0000 pr17704a_test.s is a x86_64 assembly file, but it invokes IA32 exit syscall with "int 0x80". This causes a segfault on kernels with CONFIG_IA32_EMULATION disabled. gold/ * testsuite/pr17704a_test.s (_start): Invoke x86_64 exit syscall instead of its IA32 counterpart. --- gold/testsuite/pr17704a_test.s | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gold/testsuite/pr17704a_test.s b/gold/testsuite/pr17704a_test.s index 2b39e649f9e..8a645496faf 100644 --- a/gold/testsuite/pr17704a_test.s +++ b/gold/testsuite/pr17704a_test.s @@ -14,10 +14,10 @@ _start: leaq bar(%rip), %rsi testb $1, %sil je .L9 - mov $1, %eax - mov $1, %ebx - int $0x80 + mov $60, %rax + mov $1, %rdi + syscall .L9: - mov $1, %eax - mov $0, %ebx - int $0x80 + mov $60, %rax + mov $0, %rdi + syscall -- 2.35.1