Skip to content

Commit

Permalink
debug: update lds to merge more section (#573)
Browse files Browse the repository at this point in the history
merge .bss.* to .bss then entry.S can clear it.
  • Loading branch information
zqb-all authored Jul 31, 2024
1 parent 7878085 commit 68c70f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions debug/targets/RISC-V/spike32.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -27,7 +30,7 @@ SECTIONS
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
}
.bss : { *(.bss) }
.bss : { *(.bss .bss.*) }
__bss_end = .;

__malloc_start = .;
Expand Down
9 changes: 6 additions & 3 deletions debug/targets/RISC-V/spike64.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,7 +28,7 @@ SECTIONS
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
}
.bss : { *(.bss) }
.bss : { *(.bss .bss.*) }
__bss_end = .;

__malloc_start = .;
Expand Down

0 comments on commit 68c70f5

Please sign in to comment.