Patches done in conjunction with Juan Zamorano Flores

<jzamora@avellano.datsi.fi.upm.es>.  He debugged enough to let me
know what was wrong and I supplied the code. :)
This commit is contained in:
Joel Sherrill
1998-10-26 16:18:58 +00:00
parent 2f3692ee72
commit db88957493
7 changed files with 31 additions and 14 deletions

View File

@@ -13,6 +13,8 @@
* $Id$
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x12800, l = 1M
@@ -60,6 +62,9 @@ SECTIONS
_bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -11,6 +11,9 @@
* stack grows up towards high memory. This works for
* both the rom68k and the mon68k monitors.
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x10000, l = 2M
@@ -58,6 +61,9 @@ SECTIONS
_bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -13,6 +13,7 @@
* $Id$
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x3000, l = 1M
@@ -60,6 +61,9 @@ SECTIONS
_bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -17,6 +17,8 @@
* $Id$
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x5000, l = 0x3fafff
@@ -64,6 +66,9 @@ SECTIONS
_bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -17,6 +17,8 @@
* $Id$
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x7000, l = 0x3d8fff
@@ -64,6 +66,9 @@ SECTIONS
_bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -20,6 +20,8 @@
* $Id$
*/
StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
MEMORY
{
ram : org = 0x100000, l = 1M
@@ -62,6 +64,9 @@ SECTIONS
bss_start = . ;
*(.bss)
*(COMMON)
. += StackSize; /* XXX -- Old gld can't handle this */
. = ALIGN (16);
stack_init = .;
end = . ;
_end = . ;
}

View File

@@ -77,10 +77,7 @@ loop: movel #0,a1@+ | to zero out uninitialized
cmpal a0,a1
jlt loop | loop until _end reached
movel # SYM (end),d0 | d0 = end of bss/start of heap
addl # SYM (heap_size),d0 | d0 = end of heap
movel d0, SYM (stack_start) | Save for brk() routine
addl # SYM (stack_size),d0 | make room for stack
movel # SYM (stack_init),d0 | d0 = stop of stack
andl #0xffffffc0,d0 | align it on 16 byte boundary
movw #0x3700,sr | SUPV MODE,INTERRUPTS OFF!!!
movel d0,a7 | set master stack pointer
@@ -124,9 +121,6 @@ BEGIN_DATA
SYM (start_frame):
.space 4,0
PUBLIC (stack_start)
SYM (stack_start):
.space 4,0
END_DATA
BEGIN_BSS
@@ -152,13 +146,6 @@ SYM (initial_usp):
SYM (initial_sr):
.space 2
PUBLIC (heap_size)
.set SYM (heap_size),0x2000
PUBLIC (stack_size)
.set SYM (stack_size),0x1000
END_DATA
#endif
END