riscv: Set text_offset correctly for M-Mode