Skip to content

Commit 4e9aa15

Browse files
committed
Make linker script compatible with GNU linker.
Assigning to the dot inside the section declaration is section relative, not absolute.
1 parent 888a763 commit 4e9aa15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

riscv-rt/link.x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SECTIONS
2525
.text.dummy (NOLOAD) :
2626
{
2727
/* This section is intended to make _stext address work */
28-
. = _stext;
28+
. = ABSOLUTE(_stext);
2929
} > REGION_TEXT
3030

3131
.text _stext :
@@ -84,7 +84,7 @@ SECTIONS
8484
.stack (NOLOAD) :
8585
{
8686
_estack = .;
87-
. = _stack_start;
87+
. = ABSOLUTE(_stack_start);
8888
_sstack = .;
8989
} > REGION_STACK
9090

0 commit comments

Comments
 (0)