Set the ELF entry point in simple system linker script

This is part of work to run binaries created for the simple system
under Spike. Spike's default behaviour (after a weird 'rom' trampoline
at 0x1000) is to obey the entry point given in the ELF file. So let's
set it correctly.
This commit is contained in:
Rupert Swarbrick 2020-02-27 17:10:11 +00:00 committed by Rupert Swarbrick
parent 38d6932a6a
commit 59b3f7f476

View file

@ -16,12 +16,17 @@ _min_stack = 0x2000; /* 8K - minimum stack space to reserve */
_stack_len = LENGTH(stack);
_stack_start = ORIGIN(stack) + LENGTH(stack);
_entry_point = _vectors_start + 0x80;
ENTRY(_entry_point)
SECTIONS
{
.vectors :
{
. = ALIGN(4);
_vectors_start = .;
KEEP(*(.vectors))
_vectors_end = .;
} > ram
.text : {