Skip to content

Commit f91d5a2

Browse files
alessandrodLucasSte
authored andcommitted
[SOL] sbfv2: place the rodata segment at MM_PROGRAM_START
With this _RELATIVE relocations can be ignored in the vm. Relocations are still produced in case we change address space layout in the future.
1 parent 80c8acb commit f91d5a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ impl<'a> GccLinker<'a> {
343343
} else {
344344
self.linker_arg("--entry=entrypoint");
345345
}
346+
if self.sess.opts.cg.target_cpu.as_ref().unwrap_or(&self.sess.target.cpu) == "sbfv2"
347+
{
348+
self.linker_arg("--section-start=.text=0x100000000");
349+
}
346350
}
347351
}
348352
}

0 commit comments

Comments
 (0)