-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nasm: Use different test sources for x86 and x86_64
The x86 test files might not work on x86_64 Linux in certain cases, for example if the kernel is configured without support for x86 executables (which also gets rid of the old system call interface). Bug: https://bugs.gentoo.org/936911 (cherry picked from commit 9501228)
- Loading branch information
1 parent
e409a55
commit af9658a
Showing
6 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%include "config.asm" | ||
|
||
section .data | ||
msg: db "Hello World", 10 | ||
len: equ $ - msg | ||
|
||
section .text | ||
global main | ||
main: | ||
mov eax, 1 ; sys_write | ||
mov edi, 1 ; fd = STDOUT_FILENO | ||
mov rsi, msg ; buf = msg | ||
mov rdx, len ; count = len | ||
syscall | ||
|
||
mov eax, 60 ; sys_exit | ||
mov edi, HELLO ; exit code | ||
syscall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
%include "config.asm" | ||
|
||
%ifdef FOO | ||
%define RETVAL HELLO | ||
%endif | ||
|
||
section .data | ||
msg: db "Hello World", 10 | ||
len: equ $ - msg | ||
|
||
section .text | ||
global main | ||
main: | ||
mov eax, 1 ; sys_write | ||
mov edi, 1 ; fd = STDOUT_FILENO | ||
mov rsi, msg ; buf = msg | ||
mov rdx, len ; count = len | ||
syscall | ||
|
||
mov eax, 60 ; sys_exit | ||
mov edi, RETVAL ; exit code | ||
syscall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters