Parcourir la source

Make linker script compatible with GNU linker.

Assigning to the dot inside the section declaration is section
relative, not absolute.
Vadzim Dambrouski il y a 5 ans
Parent
commit
4e9aa15f02
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      riscv-rt/link.x

+ 2 - 2
riscv-rt/link.x

@@ -25,7 +25,7 @@ SECTIONS
   .text.dummy (NOLOAD) :
   .text.dummy (NOLOAD) :
   {
   {
     /* This section is intended to make _stext address work */
     /* This section is intended to make _stext address work */
-    . = _stext;
+    . = ABSOLUTE(_stext);
   } > REGION_TEXT
   } > REGION_TEXT
 
 
   .text _stext :
   .text _stext :
@@ -84,7 +84,7 @@ SECTIONS
   .stack (NOLOAD) :
   .stack (NOLOAD) :
   {
   {
     _estack = .;
     _estack = .;
-    . = _stack_start;
+    . = ABSOLUTE(_stack_start);
     _sstack = .;
     _sstack = .;
   } > REGION_STACK
   } > REGION_STACK