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/936911pull/12255/head
parent
d3f28217c5
commit
9501228168
6 changed files with 43 additions and 3 deletions
@ -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 |
@ -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 |
Loading…
Reference in new issue