mirror of
https://github.com/Noratrieb/elven-forest.git
synced 2026-01-15 11:15:02 +01:00
test data
This commit is contained in:
parent
94a6a0e999
commit
5de9ea38ca
7 changed files with 85 additions and 14 deletions
12
test_data/calls_obj.c
Normal file
12
test_data/calls_obj.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int uwu()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("%d", uwu());
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -8,6 +8,9 @@ for rust_file in $SCRIPT_DIR/*.rs; do
|
|||
done
|
||||
|
||||
for c_obj_file in $SCRIPT_DIR/*_obj.c; do
|
||||
echo $c_obj_file
|
||||
cc "$c_obj_file" -c -o "$SCRIPT_DIR/out/$(basename $c_obj_file .c)"
|
||||
cc "$c_obj_file" -c -o "$SCRIPT_DIR/out/$(basename $c_obj_file .c).o"
|
||||
done
|
||||
|
||||
for asm_file in $SCRIPT_DIR/*.asm; do
|
||||
nasm "$asm_file" -felf64 -o "$SCRIPT_DIR/out/$(basename $asm_file .asm).o"
|
||||
done
|
||||
|
|
|
|||
7
test_data/empty.asm
Normal file
7
test_data/empty.asm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
global _start
|
||||
|
||||
section .text
|
||||
_start:
|
||||
mov rax, 60
|
||||
mov rdi, 0
|
||||
syscall
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, World!");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include<stdio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
puts("Hello, World!");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue