@@ -37,7 +37,7 @@ if {[istarget "mips*-*-vxworks"]} {
{{readelf --segments vxworks2.sd}}
"vxworks2"}
{"VxWorks executable test 2 (static)"
- "-Tvxworks1.ld" ""
+ "-Tvxworks2-static.ld" ""
"-mips2" {vxworks2.s}
{{readelf --segments vxworks2-static.sd}}
"vxworks2"}
@@ -1,8 +1,19 @@
+PHDRS
+{
+ headers PT_PHDR PHDRS;
+ header_load PT_LOAD PHDRS;
+ interp PT_INTERP;
+ code PT_LOAD;
+ data PT_LOAD;
+ dynamic PT_DYNAMIC;
+}
+
SECTIONS
{
. = 0x80000;
- .interp : { *(.interp) }
- .hash : { *(.hash) }
+ . = . + SIZEOF_HEADERS;
+ .interp : { *(.interp) } :interp :headers :header_load
+ .hash : { *(.hash) } :code
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
@@ -17,10 +28,10 @@ SECTIONS
.text : { *(.text) }
. = ALIGN (0x1000);
- .dynamic : { *(.dynamic) }
+ .dynamic : { *(.dynamic) } :data :dynamic
. = ALIGN (0x400);
- .got : { *(.got.plt) *(.got) }
+ .got : { *(.got.plt) *(.got) } :data
. = ALIGN (0x400);
.data : { *(.data) }
@@ -28,5 +39,6 @@ SECTIONS
. = ALIGN (0x400);
.bss : { *(.bss) *(.dynbss) }
+
/DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
}
@@ -6,8 +6,8 @@ Program Headers:
Type .*
PHDR .*
#...
- LOAD .* 0x00080000 0x00080000 .* R E 0x1000
- LOAD .* 0x00081000 0x00081000 .* RW 0x1000
+ LOAD .* 0x00080... 0x00080... .* R E 0x1000
+ LOAD .* 0x00081... 0x00081... .* RW 0x1000
DYNAMIC .*
#...
@@ -0,0 +1,25 @@
+SECTIONS
+{
+ . = 0x80000;
+ .hash : { *(.hash) }
+
+ . = ALIGN (0x400);
+ .rela.plt : { *(.rela.plt) }
+
+ . = ALIGN (0x400);
+ .plt : { *(.plt) }
+
+ . = ALIGN (0x400);
+ .text : { *(.text) }
+
+ . = ALIGN (0x1000);
+ .got : { *(.got.plt) *(.got) }
+
+ . = ALIGN (0x400);
+ .data : { *(.data) }
+
+ . = ALIGN (0x400);
+ .bss : { *(.bss) *(.dynbss) }
+
+ /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
+}