Skip to content

Commit 58758c2

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 f019c24 commit 58758c2

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
@@ -360,6 +360,10 @@ impl<'a> GccLinker<'a> {
360360
} else {
361361
self.linker_arg("--entry=entrypoint");
362362
}
363+
if self.sess.opts.cg.target_cpu.as_ref().unwrap_or(&self.sess.target.cpu) == "sbfv2"
364+
{
365+
self.linker_arg("--section-start=.text=0x100000000");
366+
}
363367
}
364368
}
365369
}

0 commit comments

Comments
 (0)