Skip to content

Commit 29432a6

Browse files
committed
test(port_riscv): place the SBI entry point at the base address
Fixes S-mode target tests failing on QEMU 7.0.0, where [a change][1] was introduced to use the image base address as the entry point and ignore the one specified by an ELF header. [1]: https://gitlab.com/qemu-project/qemu/-/commit/7e322a7f23a60b0e181b55ef722fdf390ec4e463
1 parent 171289c commit 29432a6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/r3_port_riscv_test_driver/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ macro_rules! instantiate_test {
9090
port::use_rt!(unsafe SystemTraits);
9191

9292
#[cfg(feature = "boot-minimal-s")]
93+
#[link_section = ".text_pre"]
9394
#[no_mangle]
9495
#[naked]
9596
extern "C" fn start() {

src/r3_test_runner/src/targets.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ impl LinkerScripts {
8181
8282
.text :
8383
{
84+
KEEP(*(.text_pre .text_pre.*));
8485
*(.text .text.*);
8586
. = ALIGN(4);
8687
__etext = .;

0 commit comments

Comments
 (0)