Browse Source

riscv: tweak prog.ld

Wow, this was no fun to find. The riscv toolchain adds
symbols of type "S", and they were being put into the binary
AFTER end. The only symptom was apparent corruption of the
allocator pool in rc.

The reason was that the variable interrupt, having been put
by the allocator into the S section, was sitting right
on top of the magic for the first allocated block.
When interrupt was set to 0, it blew away the magic.
Thanks to spike and its ability to halt when
memory changes this was actually findable.

Signed-off-by: Ronald G. Minnich <>
Ronald G. Minnich 3 years ago
1 changed files with 1 additions and 0 deletions
  1. 1 0

+ 1 - 0

@@ -27,6 +27,7 @@ SECTIONS
 	.bss : {
+		*(.*)
 	PROVIDE(end = .);