[SH] Adjust stack area for simulator

Oleg Endo oleg.endo@t-online.de
Thu Apr 7 13:20:00 GMT 2016


Hi,

When using the default configuration, sh-sim runs effectively with
something like 3 MBytes of RAM.  This is because the stack base address
is set to 0x300000 in the default linker script.

When using sh-sim for running the GCC testsuite, the limited RAM
results in a bunch of "heap stack collision" type of errors.  The
attached patch raises the stack base address and VM memory size to
around 1 GByte.  Although that seems a lot, on modern systems it should
be fine, as not all reserved memory will be committed, if it's not
touched.  With this, running the GCC with e.g. -j12 shows no problems
and in turn quite some failures disappear.

Cheers,
Oleg


ld/ChangeLog:
	* emulparams/shelf.sh: Set stack area to 0x3FFFFF00.

sim/ChangeLog:
	* sh/interp.c (sim_memory_size): Default init to 30.
	(parse_and_set_memory_size): Adjust upper bound to 31.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_sim_stack_adj.patch
Type: text/x-patch
Size: 1746 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160407/14d35e42/attachment.bin>


More information about the Binutils mailing list