From: John Hodge (sonata) Date: Tue, 6 Nov 2012 05:11:30 +0000 (+0800) Subject: ld-acess/libc - Implimenting functions required by ARM eabi X-Git-Tag: rel0.15~668 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=1409c5235c5228061ba6605fc1f41302f4f3fe78;p=tpg%2Facess2.git ld-acess/libc - Implimenting functions required by ARM eabi --- diff --git a/Usermode/Libraries/Makefile.tpl b/Usermode/Libraries/Makefile.tpl index e252210d..bf2e9320 100644 --- a/Usermode/Libraries/Makefile.tpl +++ b/Usermode/Libraries/Makefile.tpl @@ -38,7 +38,7 @@ $(_BIN): $(OBJ) $(_LIBS) @mkdir -p $(dir $(_BIN)) @echo [LD] -o $(BIN) $(OBJ) @$(LD) $(LDFLAGS) -o $(_BIN) $(OBJ) $(shell $(CC) -print-libgcc-file-name) - @$(DISASM) -S $(_BIN) > $(_OBJPREFIX)$(BIN).dsm + @$(DISASM) -D -S $(_BIN) > $(_OBJPREFIX)$(BIN).dsm $(_OBJPREFIX)%.o: %.c @echo [CC] -o $@ diff --git a/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h b/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h index 46128b21..2c85b14e 100644 --- a/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h +++ b/Usermode/Libraries/ld-acess.so_src/arch/armv7.S.h @@ -39,6 +39,16 @@ __clear_cache: svc #0x1001 mov pc, lr + +@ >r0: PC +@ >r1: Pointer to item count +@ +//#include #include #include #include "lib.h" @@ -22,3 +22,22 @@ sighandler_t signal(int num, sighandler_t handler) sighandlers[num] = handler; return prev; } + +int raise(int signal) +{ + if( signal < 0 || signal > NUM_SIGNALS ) + return 1; + switch(signal) + { + case SIGABRT: + abort(); + break; + } + return 0; +} + +void abort(void) +{ + // raise(SIGABRT); + _exit(-1); +}