Skip to content

Commit 4be0d7b

Browse files
alessandrodLucasSte
authored andcommitted
[SOL] sbfv2: output _RELATIVE relocations in a separate SHT_RELR section
sbfv2 only produces _RELATIVE relocations and those can be packed much more efficiently using SHT_RELR. See https://reviews.llvm.org/D48247.
1 parent 58758c2 commit 4be0d7b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ impl<'a> GccLinker<'a> {
363363
if self.sess.opts.cg.target_cpu.as_ref().unwrap_or(&self.sess.target.cpu) == "sbfv2"
364364
{
365365
self.linker_arg("--section-start=.text=0x100000000");
366+
self.linker_arg("--pack-dyn-relocs=relr");
366367
}
367368
}
368369
}

0 commit comments

Comments
 (0)