Skip to content

Commit

Permalink
Update the Fuchsia linker defaults
Browse files Browse the repository at this point in the history
This updates the linker defaults aligning them with Clang. Specifically,
we use 4K pages on all platforms, we always use BIND_NOW, we prefer all
loadable segments be separate and page aligned, and we support RELR
relocations.
  • Loading branch information
petrhosek committed May 11, 2020
1 parent 3fe4dd2 commit c85768e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/librustc_target/spec/fuchsia_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ pub fn opts() -> TargetOptions {
"--eh-frame-hdr".to_string(),
"--hash-style=gnu".to_string(),
"-z".to_string(),
"max-page-size=4096".to_string(),
"-z".to_string(),
"now".to_string(),
"-z".to_string(),
"rodynamic".to_string(),
"-z".to_string(),
"separate-loadable-segments".to_string(),
"--pack-dyn-relocs=relr".to_string(),
],
);

Expand Down

0 comments on commit c85768e

Please sign in to comment.