68000: add all the pieces for the signal return path helper
authorAlan Cox <alan@linux.intel.com>
Wed, 19 Oct 2016 19:53:48 +0000 (20:53 +0100)
committerAlan Cox <alan@linux.intel.com>
Wed, 19 Oct 2016 19:53:48 +0000 (20:53 +0100)
Library/elf2flt.ld
Library/libs/Makefile.68000
Library/libs/signal68000.S [new file with mode: 0644]

index d9f26b4..82c97fa 100644 (file)
@@ -16,6 +16,7 @@ SECTIONS {
                . = . + 4;
                . = ALIGN(0x4) ;
                _stext = . ;
+               *(.signal)
                *(.literal .text)
                *(.literal.* .text.*)
                *(.gnu.warning)
index 82e5a59..fd368b5 100644 (file)
@@ -11,7 +11,7 @@ KRN_HEADERS_SRC = $(addprefix ../../Kernel/include/,$(KRN_HEADERS))
 KRN_HEADERS_COPY = $(addprefix ../include/sys/,$(KRN_HEADERS))
 SRC_CRT0 = crt0_$(PLATFORM).s crt0nostdio_$(PLATFORM).s
 OBJ_CRT0 = $(SRC_CRT0:.s=.o)
-SRC_ASM = setjmp_68000.S
+SRC_ASM = setjmp_68000.S signal68000.S
 OBJ_ASM = $(SRC_ASM:.S=.o)
 SRC_C =  __argv.c abort.c asctime.c assert.c atexit.c
 SRC_C += bcmp.c bcopy.c bsearch.c bzero.c calloc.c cfree.c clock.c closedir.c
diff --git a/Library/libs/signal68000.S b/Library/libs/signal68000.S
new file mode 100644 (file)
index 0000000..e02607f
--- /dev/null
@@ -0,0 +1,12 @@
+       .section signal,"x"
+
+       .globl _sigunwind
+
+.mri 1
+;
+;      Must be linked first (base + 0x40)
+;
+_sigunwind:
+       movem.l (sp)+,a0/a1/d0/d1
+       move.w (sp)+,ccr
+       rts