]> git.sur5r.net Git - u-boot/blobdiff - board/eNET/u-boot.lds
x86: Use TEXT_BASE in linker scripts
[u-boot] / board / eNET / u-boot.lds
index 4ea424d320c08be3da8958240841e664082cf0da..d78d75f2c5992b35d3718d26f3dfdf8a1a1fcd60 100644 (file)
@@ -27,29 +27,49 @@ ENTRY(_start)
 
 SECTIONS
 {
-       . = 0x38040000;         /* Location of bootcode in flash */
+       . = TEXT_BASE;          /* Location of bootcode in flash */
+       _i386boot_text_start = .;
        .text  : { *(.text); }
 
        . = ALIGN(4);
        .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
 
        _i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata);
+       . = ALIGN(4);
+
+       .data : { *(.data) }
+       . = ALIGN(4);
+
+       .interp : { *(.interp) }
+       . = ALIGN(4);
+
+       .dynsym : { *(.dynsym) }
+       . = ALIGN(4);
 
-       . = 0x03FF0000;         /* Ram data segment to use */
-       _i386boot_romdata_dest = ABSOLUTE(.);
-       .data : AT ( LOADADDR(.rodata) + SIZEOF(.rodata) ) { *(.data) }
-       _i386boot_romdata_start = LOADADDR(.data);
+       .dynstr : { *(.dynstr) }
+       . = ALIGN(4);
 
+       .hash : { *(.hash) }
        . = ALIGN(4);
-       .got : AT ( LOADADDR(.data) + SIZEOF(.data) ) { *(.got) }
 
+       .got : { *(.got) }
        . = ALIGN(4);
+
+       .got.plt : { *(.got.plt) }
+       . = ALIGN(4);
+
+       .dynamic (NOLOAD) : { *(.dynamic) }
+       . = ALIGN(4);
+
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
+       . = ALIGN(4);
        __u_boot_cmd_end = .;
        _i386boot_cmd_start = LOADADDR(.u_boot_cmd);
 
-       _i386boot_romdata_size = SIZEOF(.data) + SIZEOF(.got) + SIZEOF(.u_boot_cmd);
+       _i386boot_rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       _i386boot_rel_dyn_end = .;
 
        . = ALIGN(4);
        _i386boot_bss_start = ABSOLUTE(.);
@@ -57,7 +77,7 @@ SECTIONS
        _i386boot_bss_size = SIZEOF(.bss);
 
        /* 16bit realmode trampoline code */
-       .realmode 0x7c0 : AT ( LOADADDR(.got) + SIZEOF(.got) + SIZEOF(.u_boot_cmd)) { *(.realmode) }
+       .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { *(.realmode) }
 
        _i386boot_realmode = LOADADDR(.realmode);
        _i386boot_realmode_size = SIZEOF(.realmode);
@@ -77,14 +97,13 @@ SECTIONS
         * at reset and the code have to fit.
         * The fff0 offset of resetvec is important, however.
         */
-
        . = 0xfffffe00;
-       .start32 : AT (0x3807fe00) { *(.start32); }
+       .start32 : AT (TEXT_BASE + 0x3fe00) { *(.start32); }
 
        . = 0xf800;
-       .start16 : AT (0x3807f800) { *(.start16); }
+       .start16 : AT (TEXT_BASE + 0x3f800) { *(.start16); }
 
        . = 0xfff0;
-       .resetvec : AT (0x3807fff0) { *(.resetvec); }
+       .resetvec : AT (TEXT_BASE + 0x3fff0) { *(.resetvec); }
        _i386boot_end = (LOADADDR(.resetvec) + SIZEOF(.resetvec) );
 }