Skip to content

Commit

Permalink
[SOL] Set max page size for program header alignment (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte authored Mar 6, 2025
1 parent 08b7341 commit 88c5b91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion compiler/rustc_target/src/spec/base/sbf_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,18 @@ PHDRS
";

pub fn opts(version: &'static str) -> TargetOptions {
let mut linker_args: Vec<&str> = vec![
"--threads=1", "-z", "notext", "--Bdynamic"
];

if version != "v3" {
linker_args.push("-z");
linker_args.push("max-page-size=4096");
}

let pre_link_args = TargetOptions::link_args(
LinkerFlavor::Gnu(Cc::No, Lld::No),
&["--threads=1", "-z", "notext", "--Bdynamic"],
linker_args.as_slice(),
);

let linker_script = if version == "v3" {
Expand Down

0 comments on commit 88c5b91

Please sign in to comment.