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 <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
9e4aabe4de
1 changed files with 1 additions and 0 deletions
  1. 1 0
      riscv/include/prog.ld

+ 1 - 0
riscv/include/prog.ld

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