shithub: scc

Download patch

ref: 6d5cccdbfa78d757b07efa64195f49a5db7e46e1
parent: 85d760f44e6c6622057d1db8aba52cd5902dca95
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Feb 20 02:44:52 EST 2019

[test/ld] Add basic test files for ld-coff32

diff: cannot open b/tests/ld/execute//null: file does not exist: 'b/tests/ld/execute//null' diff: cannot open b/tests/ld//null: file does not exist: 'b/tests/ld//null'
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -6,6 +6,7 @@
 DIRS=ar/execute \
      nm/execute \
      as/execute \
+     ld/execute \
      libc/execute \
      scc/execute scc/error
 
--- /dev/null
+++ b/tests/ld/execute/Makefile
@@ -1,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
--- /dev/null
+++ b/tests/ld/execute/f1.s
@@ -1,0 +1,6 @@
+	.file	"f1.s"
+
+	.globl	f1
+	.globl	f2
+	.globl	f3
+f1:	.long	0
--- /dev/null
+++ b/tests/ld/execute/f2.s
@@ -1,0 +1,5 @@
+	.file	"f2.s"
+
+	.globl	f1
+	.globl	f2
+f2:	.long	0
--- /dev/null
+++ b/tests/ld/execute/f3.s
@@ -1,0 +1,4 @@
+	.file	"f3.s"
+
+	.globl	f3
+f3:	.long	0