Skip to content

Commit 84b0dfa

Browse files
committed
[SOL] Set max page size for program header alignment (#118)
1 parent b7b8aa7 commit 84b0dfa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: compiler/rustc_target/src/spec/base/sbf_base.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,18 @@ PHDRS
8282
";
8383

8484
pub fn opts(version: &'static str) -> TargetOptions {
85+
let mut linker_args: Vec<&str> = vec![
86+
"--threads=1", "-z", "notext", "--Bdynamic"
87+
];
88+
89+
if version != "v3" {
90+
linker_args.push("-z");
91+
linker_args.push("max-page-size=4096");
92+
}
93+
8594
let pre_link_args = TargetOptions::link_args(
8695
LinkerFlavor::Gnu(Cc::No, Lld::No),
87-
&["--threads=1", "-z", "notext", "--Bdynamic"],
96+
linker_args.as_slice(),
8897
);
8998

9099
let linker_script = if version == "v3" {

0 commit comments

Comments
 (0)