Skip to content

Commit c85768e

Browse files
committed
Update the Fuchsia linker defaults
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.
1 parent 3fe4dd2 commit c85768e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc_target/spec/fuchsia_base.rs

+7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ pub fn opts() -> TargetOptions {
99
"--eh-frame-hdr".to_string(),
1010
"--hash-style=gnu".to_string(),
1111
"-z".to_string(),
12+
"max-page-size=4096".to_string(),
13+
"-z".to_string(),
14+
"now".to_string(),
15+
"-z".to_string(),
1216
"rodynamic".to_string(),
17+
"-z".to_string(),
18+
"separate-loadable-segments".to_string(),
19+
"--pack-dyn-relocs=relr".to_string(),
1320
],
1421
);
1522

0 commit comments

Comments
 (0)