mirror of
https://github.com/rui314/mold.git
synced 2024-12-25 17:34:02 +03:00
temporary
This commit is contained in:
parent
2791f3fb3a
commit
d2e5d9db03
24
test/hello.s
Normal file
24
test/hello.s
Normal file
@ -0,0 +1,24 @@
|
||||
// RUN: cc -o %t.o -c %s
|
||||
// RUN: mold -o %t.exe /usr/lib/x86_64-linux-gnu/crt1.o \
|
||||
// RUN: /usr/lib/x86_64-linux-gnu/crti.o \
|
||||
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginT.o \
|
||||
// RUN: %t.o \
|
||||
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a \
|
||||
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_eh.a \
|
||||
// RUN: /usr/lib/x86_64-linux-gnu/libc.a \
|
||||
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o \
|
||||
// RUN: /usr/lib/x86_64-linux-gnu/crtn.o
|
||||
// RUN: %t.exe
|
||||
|
||||
.text
|
||||
.globl main
|
||||
main:
|
||||
lea msg(%rip), %rdi
|
||||
xor %rax, %rax
|
||||
call printf
|
||||
xor %rax, %rax
|
||||
ret
|
||||
|
||||
.data
|
||||
msg:
|
||||
.string "Hello world\n"
|
@ -1,24 +0,0 @@
|
||||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
||||
# RUN: mold -o %t.exe \
|
||||
# RUN: /usr/lib/x86_64-linux-gnu/crt1.o \
|
||||
# RUN: /usr/lib/x86_64-linux-gnu/crti.o \
|
||||
# RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginT.o \
|
||||
# RUN: %t.o \
|
||||
# RUN: /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a \
|
||||
# RUN: /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_eh.a \
|
||||
# RUN: /usr/lib/x86_64-linux-gnu/libc.a \
|
||||
# RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o \
|
||||
# RUN: /usr/lib/x86_64-linux-gnu/crtn.o
|
||||
|
||||
.text
|
||||
.globl main
|
||||
main:
|
||||
lea .Lhello(%rip), %rdi
|
||||
xor %eax, %eax
|
||||
call printf
|
||||
xor %edi, %edi
|
||||
call exit
|
||||
|
||||
.data
|
||||
.Lhello:
|
||||
.ascii "Hello world!\n"
|
Loading…
Reference in New Issue
Block a user