- fixed ld script

git-svn-id: http://moon:8086/svn/mips@153 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-04-06 15:31:59 +00:00
parent 56240c9a5e
commit 306750948a
2 changed files with 13 additions and 12 deletions
+7 -7
View File
@@ -15,10 +15,11 @@ SECTIONS
{ {
.start : .start :
{ {
start = ALIGN(2); . = ALIGN(4);
entry = ALIGN(2); start = .;
_entry = ALIGN(2); entry = .;
__entry = ALIGN(2); _entry = .;
__entry = .;
KEEP (*(.start)) KEEP (*(.start))
} >ram } >ram
@@ -52,7 +53,7 @@ SECTIONS
} >ram } >ram
.data1 : { *(.data1) } >ram .data1 : { *(.data1) } >ram
.got.plt : { *(.got.plt) } >ram .got.plt : { *(.got.plt) } >ram
. = .; . = ALIGN(4);
_gp = ALIGN(16) + 0x7ff0; _gp = ALIGN(16) + 0x7ff0;
.got : { *(.got) } .got : { *(.got) }
/* We want the small data sections together, so single-instruction offsets /* We want the small data sections together, so single-instruction offsets
@@ -62,7 +63,7 @@ SECTIONS
{ {
*(.sdata .sdata.*) *(.sdata .sdata.*)
} >ram } >ram
__bss_start = .; __bss_start = ALIGN(4);
.sbss : .sbss :
{ {
*(.sbss .sbss.*) *(.sbss .sbss.*)
@@ -80,7 +81,6 @@ SECTIONS
. = ALIGN(. != 0 ? 32 / 8 : 1); . = ALIGN(. != 0 ? 32 / 8 : 1);
} >ram } >ram
. = ALIGN(32 / 8); . = ALIGN(32 / 8);
. = ALIGN(32 / 8);
_end = .; PROVIDE (end = .); _end = .; PROVIDE (end = .);
. = (ORIGIN(ram) + LENGTH(ram) - DEBUGGER_VAR_SIZE - 0x10); . = (ORIGIN(ram) + LENGTH(ram) - DEBUGGER_VAR_SIZE - 0x10);
stack_ptr = . | ~(LENGTH(ram)-1) & 0x7fffffff; stack_ptr = . | ~(LENGTH(ram)-1) & 0x7fffffff;
+6 -5
View File
@@ -16,10 +16,11 @@ SECTIONS
{ {
.start : .start :
{ {
start = ALIGN(2); . = ALIGN(4);
entry = ALIGN(2); start = .;
_entry = ALIGN(2); entry = .;
__entry = ALIGN(2); _entry = .;
__entry = .;
*(.start) *(.start)
} >ram } >ram
@@ -62,7 +63,7 @@ SECTIONS
{ {
*(.sdata .sdata.*) *(.sdata .sdata.*)
} >ram } >ram
__bss_start = .; __bss_start = ALIGN(4);
.sbss : .sbss :
{ {
*(.sbss .sbss.*) *(.sbss .sbss.*)