Skip to content
Snippets Groups Projects
Commit de250594 authored by Graeme Russ's avatar Graeme Russ
Browse files

x86: Use TEXT_BASE in linker scripts

Use TEXT_BASE rather than a hard-coded base address on x86 linker scripts.
This will allow any board to define its base link address without having
to modify the linker script
parent 76d5763a
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ ENTRY(_start) ...@@ -27,7 +27,7 @@ ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0x06000000; /* Location of bootcode in flash */ . = TEXT_BASE; /* Location of bootcode in flash */
_i386boot_text_start = .; _i386boot_text_start = .;
.text : { *(.text); } .text : { *(.text); }
...@@ -98,12 +98,12 @@ SECTIONS ...@@ -98,12 +98,12 @@ SECTIONS
* The fff0 offset of resetvec is important, however. * The fff0 offset of resetvec is important, however.
*/ */
. = 0xfffffe00; . = 0xfffffe00;
.start32 : AT (0x0603fe00) { *(.start32); } .start32 : AT (TEXT_BASE + 0x3fe00) { *(.start32); }
. = 0xf800; . = 0xf800;
.start16 : AT (0x0603f800) { *(.start16); } .start16 : AT (TEXT_BASE + 0x3f800) { *(.start16); }
. = 0xfff0; . = 0xfff0;
.resetvec : AT (0x0603fff0) { *(.resetvec); } .resetvec : AT (TEXT_BASE + 0x3fff0) { *(.resetvec); }
_i386boot_end = (LOADADDR(.resetvec) + SIZEOF(.resetvec) ); _i386boot_end = (LOADADDR(.resetvec) + SIZEOF(.resetvec) );
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment