Skip to content

Commit fec9e0c

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 f91d5a2 commit fec9e0c

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
@@ -346,6 +346,7 @@ impl<'a> GccLinker<'a> {
346346
if self.sess.opts.cg.target_cpu.as_ref().unwrap_or(&self.sess.target.cpu) == "sbfv2"
347347
{
348348
self.linker_arg("--section-start=.text=0x100000000");
349+
self.linker_arg("--pack-dyn-relocs=relr");
349350
}
350351
}
351352
}

0 commit comments

Comments
 (0)