Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Fuchsia linker defaults #72116

Merged
merged 1 commit into from
May 31, 2020
Merged

Conversation

petrhosek
Copy link
Contributor

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.

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.
@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 11, 2020
@petrhosek
Copy link
Contributor Author

r? @tmandry

@tmandry
Copy link
Member

tmandry commented May 11, 2020

@bors r+

@bors
Copy link
Contributor

bors commented May 11, 2020

📌 Commit c85768e has been approved by tmandry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 11, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 13, 2020
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.
@Dylan-DPC-zz
Copy link

Failed in rollup:

 error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "gnu" "--build-id" "--eh-frame-hdr" "--hash-style=gnu" "-z" "max-page-size=4096" "-z" "now" "-z" "rodynamic" "-z" "separate-loadable-segments" "--pack-dyn-relocs=relr" "--dynamic-linker=ld.so.1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-fuchsia/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/deps/std-0e09f6d395eaa6f3.std.alna6nf9-cgu.0.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/deps/libstd-0e09f6d395eaa6f3.so" "--version-script=/tmp/rustcbwhp9V/list" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/deps/std-0e09f6d395eaa6f3.4fieprej1tp8mo6h.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/deps/std-0e09f6d395eaa6f3.a0uq6xvjxmpgb8v.rcgu.o" "-O1" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-fuchsia/release/build/compiler_builtins-af4511d676213523/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-fuchsia/lib" "-lzircon" "-lfdio" "-Bstatic" "--whole-archive" "/tmp/rustcbwhp9V/libpanic_unwind-7eb30ea68a43da2f.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/libhashbrown-f8da062296cb2e6c.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/librustc_std_workspace_alloc-6c1ad05b2f23e95b.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/libbacktrace-63cab9c2c4e94101.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/librustc_demangle-e494c503a5894f2a.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/libunwind-b870606f95a6b2ed.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/libcfg_if-98e38276d4e48a2f.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/liblibc-c794a8041014e54a.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/liballoc-b4e4cc25a21b4ff7.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/librustc_std_workspace_core-1dc71286ddbe6287.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustcbwhp9V/libcore-500849990a4d1c55.rlib" "--no-whole-archive" "/tmp/rustcbwhp9V/libcompiler_builtins-00bb63e3d04fb880.rlib" "-Bdynamic" "-lunwind" "-lc" "-lfdio" "-shared" "--sysroot=/usr/local/x86_64-fuchsia" "-L/usr/local/x86_64-fuchsia/lib" "-L/usr/local/lib/x86_64-fuchsia/lib"
  = note: rust-lld: error: unknown -z value: separate-loadable-segments

@Dylan-DPC-zz
Copy link

@bors r- rollup=never

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 13, 2020
@Elinvynia
Copy link
Contributor

Ping from triage: @petrhosek
Hello, any news on this?

@Elinvynia Elinvynia added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 20, 2020
@petrhosek
Copy link
Contributor Author

-z separate-loadable-segments option has landed in lld 8 months ago in llvm/llvm-project@0264950 which should be already included in LLVM that's used by Rust. However, it seems like this bot uses a version of rust-lld in stage0 that doesn't include this option?

@tmandry
Copy link
Member

tmandry commented May 21, 2020

It's whatever LLVM version is in-tree, which right now is pretty old (9.x with some cherry-picks). #67759 brings it up to date, hopefully it lands today.

@Elinvynia
Copy link
Contributor

Ping from triage: @petrhosek It seems like the required PR has landed, could you have another look?

@Elinvynia Elinvynia added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 27, 2020
@petrhosek
Copy link
Contributor Author

Can we try and land this change again? There should be any further changes needed to the patch.

@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 27, 2020
@tmandry
Copy link
Member

tmandry commented May 28, 2020

@bors r+

@bors
Copy link
Contributor

bors commented May 28, 2020

📌 Commit c85768e has been approved by tmandry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2020
@Dylan-DPC-zz
Copy link

@bors p=1

@bors
Copy link
Contributor

bors commented May 29, 2020

⌛ Testing commit c85768e with merge 6c96ea2e849ad677d47ac158f0f1b1ec2dcbcd39...

@Dylan-DPC-zz
Copy link

queue is long so yielding ( a bit late )

@bors retry

@bors
Copy link
Contributor

bors commented May 30, 2020

⌛ Testing commit c85768e with merge e345b4d97a5d16d450fa2854b427988b66502af6...

@JohnTitor
Copy link
Member

@bors retry yield

@bors
Copy link
Contributor

bors commented May 30, 2020

⌛ Testing commit c85768e with merge d9e434b9e06520f56a3245257bf10f4ca78d9917...

@bors
Copy link
Contributor

bors commented May 30, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 30, 2020
@JohnTitor
Copy link
Member

Spurious?

curl: (56) SSLRead() return error -9806
clang+llvm-9.0.0-x86_64-darwin-apple/bin/llc: Lzma library error:  No progress is possible
tar: Error exit delayed from previous errors.

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 30, 2020
@bors
Copy link
Contributor

bors commented May 30, 2020

⌛ Testing commit c85768e with merge 0800454aa5cbe2088c977005e1cfe5dbec218b09...

@Dylan-DPC-zz
Copy link

@bors retry yield

@bors
Copy link
Contributor

bors commented May 30, 2020

⌛ Testing commit c85768e with merge d9a332c2b4e515764934a7fbc1c54a23a6bbb866...

@Dylan-DPC-zz
Copy link

@bors retry

@bors
Copy link
Contributor

bors commented May 31, 2020

⌛ Testing commit c85768e with merge ea7181b...

@bors
Copy link
Contributor

bors commented May 31, 2020

☀️ Test successful - checks-azure
Approved by: tmandry
Pushing ea7181b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 31, 2020
@bors bors merged commit ea7181b into rust-lang:master May 31, 2020
@workingjubilee workingjubilee added the O-fuchsia Operating system: Fuchsia label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-fuchsia Operating system: Fuchsia S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants