Usermode/ld-acess - Disabled PIC (not needed) mmap_binary
authorJohn Hodge <[email protected]>
Sun, 28 Aug 2011 04:08:16 +0000 (12:08 +0800)
committerJohn Hodge <[email protected]>
Sun, 28 Aug 2011 04:08:51 +0000 (12:08 +0800)
Also added (commented out) debug to malloc() in libc

Usermode/Libraries/ld-acess.so_src/Makefile
Usermode/Libraries/libc.so_src/heap.c

index 4b99ecd..2bdfc48 100644 (file)
@@ -9,7 +9,7 @@ OBJ += arch/$(ARCHDIR).ao
 BIN = ld-acess.so
 EXTRABIN := libld-acess.so
 
-CFLAGS   = -g -Wall -fno-builtin -fno-leading-underscore -fno-stack-protector -fPIC
+CFLAGS   = -g -Wall -fno-builtin -fno-leading-underscore -fno-stack-protector
 CFLAGS  += $(CPPFLAGS)
 LDFLAGS  = -g -T arch/$(ARCHDIR).ld -Map map.txt --export-dynamic
 
index 7ce6bca..4fcc8be 100644 (file)
@@ -54,6 +54,7 @@ EXPORT void *malloc(size_t bytes)
        void    *bestMatchAddr = 0;\r
        heap_head       *curBlock;\r
        \r
+//     _SysDebug("&_heap_start = %p, _heap_start = %p", &_heap_start, _heap_start);\r
        // Initialise Heap\r
        if(_heap_start == NULL)\r
        {\r
@@ -63,6 +64,7 @@ EXPORT void *malloc(size_t bytes)
        }\r
        \r
        curBlock = _heap_start;\r
+//     _SysDebug("_heap_start = %p", _heap_start);\r
        \r
        bestSize = bytes + sizeof(heap_head) + sizeof(heap_foot) + BLOCK_SIZE - 1;\r
        bestSize = (bestSize/BLOCK_SIZE)*BLOCK_SIZE;    //Round up to block size\r

UCC git Repository :: git.ucc.asn.au