aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Zhuang <zhuangqiubin@gmail.com>2024-07-31 10:20:49 +0800
committerGitHub <noreply@github.com>2024-07-30 19:20:49 -0700
commit68c70f52115267097bc1381f3e85a18df15bbad4 (patch)
treece0ae47427ee7b9ba4ef64cce094de52a58e0dd0
parent7878085d2546af0eb7af72a1df00996d5d8c43fb (diff)
downloadriscv-tests-68c70f52115267097bc1381f3e85a18df15bbad4.zip
riscv-tests-68c70f52115267097bc1381f3e85a18df15bbad4.tar.gz
riscv-tests-68c70f52115267097bc1381f3e85a18df15bbad4.tar.bz2
debug: update lds to merge more section (#573)
merge .bss.* to .bss then entry.S can clear it.
-rwxr-xr-xdebug/targets/RISC-V/spike32.lds9
-rwxr-xr-xdebug/targets/RISC-V/spike64.lds9
2 files changed, 12 insertions, 6 deletions
diff --git a/debug/targets/RISC-V/spike32.lds b/debug/targets/RISC-V/spike32.lds
index 77bb1ba..1e3f34f 100755
--- a/debug/targets/RISC-V/spike32.lds
+++ b/debug/targets/RISC-V/spike32.lds
@@ -5,14 +5,17 @@ SECTIONS
/* Leave some space for pk's data structures, which includes tohost/fromhost
* which are special addresses we ought to leave alone. */
. = 0x10110000;
- .text :
+ .text :
{
*(.text.entry)
*(.text)
+ *(.text.*)
}
/* data segment */
- .data : { *(.data) }
+ .rodata : { *(.rodata .rodata.*) }
+
+ .data : { *(.data .data.*) }
.sdata : {
__global_pointer$ = . + 0x800;
@@ -27,7 +30,7 @@ SECTIONS
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
}
- .bss : { *(.bss) }
+ .bss : { *(.bss .bss.*) }
__bss_end = .;
__malloc_start = .;
diff --git a/debug/targets/RISC-V/spike64.lds b/debug/targets/RISC-V/spike64.lds
index 2e7d65d..9cbf36f 100755
--- a/debug/targets/RISC-V/spike64.lds
+++ b/debug/targets/RISC-V/spike64.lds
@@ -3,14 +3,17 @@ OUTPUT_ARCH( "riscv" )
SECTIONS
{
. = 0x1212340000;
- .text :
+ .text :
{
*(.text.entry)
*(.text)
+ *(.text.*)
}
/* data segment */
- .data : { *(.data) }
+ .rodata : { *(.rodata .rodata.*) }
+
+ .data : { *(.data .data.*) }
.sdata : {
__global_pointer$ = . + 0x800;
@@ -25,7 +28,7 @@ SECTIONS
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
}
- .bss : { *(.bss) }
+ .bss : { *(.bss .bss.*) }
__bss_end = .;
__malloc_start = .;