From: Xi Ruoyao <xry111@mengyan1223.wang>
To: binutils@sourceware.org
Subject: [PATCH] gold: don't invoke IA32 syscall in x86_64 assembly testcase
Date: Sat, 12 Mar 2022 22:21:58 +0800 [thread overview]
Message-ID: <84f7610cf64aa40e838a8289100517b2318d8bc6.camel@mengyan1223.wang> (raw)
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
next reply other threads:[~2022-03-12 14:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-12 14:21 Xi Ruoyao [this message]
2022-03-31 10:21 ` Xi Ruoyao
2022-03-31 10:41 ` Jan Beulich
2022-03-31 15:03 ` Xi Ruoyao
2022-03-31 16:05 ` Cary Coutant
2022-04-08 23:25 ` Xi Ruoyao
2022-04-28 16:15 ` [PING^2 PATCH] " Xi Ruoyao
2022-05-06 15:03 ` [PING^3 " Xi Ruoyao
2022-05-18 7:40 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84f7610cf64aa40e838a8289100517b2318d8bc6.camel@mengyan1223.wang \
--to=xry111@mengyan1223.wang \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).