commit 4a59d9140388e39c986b69f0c5a0ac12a55608a1
parent 060d8fee07a5fb0b9e65e519c5bb8c9f1c127242
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 20 Feb 2019 07:44:52 +0000
[test/ld] Add basic test files for ld-coff32
Diffstat:
5 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
@@ -6,6 +6,7 @@ include $(PROJECTDIR)/scripts/rules.mk
DIRS=ar/execute \
nm/execute \
as/execute \
+ ld/execute \
libc/execute \
scc/execute scc/error
diff --git a/tests/ld/execute/Makefile b/tests/ld/execute/Makefile
@@ -0,0 +1,20 @@
+AS = z80-unknown-coff-as
+AR = ../../../bin/ar
+LD = ../../../bin/ld
+RL = ../../../bin/ranlib
+
+OBJS = f1.o f2.o
+OBJLIB = f3.o
+
+all test: a.out
+
+a.out: $(OBJS) f.a
+ $(LD) $(OBJS) f.a
+
+f.a: $(OBJLIB)
+ $(AR) -rv $@ $?
+ $(RL) $@
+ rm $?
+
+clean:
+ rm -f *.o *.a a.out
diff --git a/tests/ld/execute/f1.s b/tests/ld/execute/f1.s
@@ -0,0 +1,6 @@
+ .file "f1.s"
+
+ .globl f1
+ .globl f2
+ .globl f3
+f1: .long 0
diff --git a/tests/ld/execute/f2.s b/tests/ld/execute/f2.s
@@ -0,0 +1,5 @@
+ .file "f2.s"
+
+ .globl f1
+ .globl f2
+f2: .long 0
diff --git a/tests/ld/execute/f3.s b/tests/ld/execute/f3.s
@@ -0,0 +1,4 @@
+ .file "f3.s"
+
+ .globl f3
+f3: .long 0