Open biggestsonicfan opened 4 years ago
I don't know if it will work properly or not, but I copied the values from cycx.ld and referenced the value stored in heapsize.s and used that to create:
_heap_size = 0x2000;
_heap_base = (_end + 0xf) & ~0xf;
_heap_end = _heap_base + _heap_size - 1;
_stackbase = (_heap_end + 0x10) & ~0x0f;
It gets past the error but unsure if this code will actually work, so leaving this open for now.
From crtnin.s
/* set up stack pointer:
* The heap will begin at '_end'; its length is 'heap_size'
* bytes. The stack will begin at the first 64-byte-aligned
* block after the heap.
*
* A default value of 'heap_size' is set by linking with libnindy.a
* The default can be overridden by redefining this symbol at link
* time (with a line of the form 'heap_size=XXXX;' in the lnk960
* linker specification file; or one of the form
* "-defsym heap_size=XXXX" on the gld960 invocation line).
*/
If ldconst _end, sp /* set sp = address of end of heap */
is the end of the heap, should _heap_base
really be defined as (_end + 0xf) & ~0xf;
?
Removing brk.o and ll_init.o from the libll Makefile and _LL_init();
from init_c.c of libc (for testing purposes), got rid of this error.
I need to understand why those are used in those files, specifically brk.c.
From
brk.c
of the libll :However, in our linker-directive file there are no such definitions. An example of a definition is seen in 7-5 of the i960 Processor Software Utilities User's Guide.