Uh oh!
There was an error while loading. Please reload this page.
Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld - #66957
Conversation
parthsane
commented
Dec 2, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Testing the effects of this is difficult, but I've filed fortanix/rust-sgx#202 to track possible future improvements.
4a2475d to
067ad79Comparealexcrichton
commented
Dec 2, 2019
Could relaxation of elf relocations be a separate parameter in the target configuration? There are existing targets using LLD and this may run a risk of breaking them if they weren't expecting this to be turned on. |
jethrogb
commented
Dec 2, 2019
From what I understand, the only reason to not use the relaxations is if you're using a linker that doesn't understand them. LLD does, so there is no reason to turn them off then. Code generation might be improved if the option is turned on. I might be wrong since the feature isn't documented that well. |
alexcrichton
commented
Dec 2, 2019
If you'd like to pursue this change as-is, then I'd have a similar comment I left on another PR. I do not have the confidence to r+ this change as-is, so you'll need to find a different reviewer. I unfortunately don't know who that different reviewer would be, but you'd likely want to start with the Compiler team. |
Centril
commented
Dec 2, 2019
cc @rust-lang/compiler-contributors for possible other reviewer |
Uh oh!
There was an error while loading. Please reload this page.
For SGX, the relocation using the relocation table is done by the code in rust/src/libstd/sys/sgx/abi/reloc.rs and this code should not require relocation. Setting RelaxELFRelocations flag if allows this to happen, hence adding a Target Option for it.
067ad79 to
54b2060Comparejethrogb
commented
Dec 3, 2019
LGTM |
parthsane
commented
Dec 3, 2019
I have added |
alexcrichton
commented
Dec 3, 2019
@bors: r+ 👍 |
bors
commented
Dec 3, 2019
📌 Commit 54b2060 has been approved by |
…xcrichton Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld Changed linker for `x86_64-fortanix-unknown-sgx` target to `rust-lld` This change needed the RelaxELFRelocations flag to be set for it to work correctly r? @jethrogb
…xcrichton Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld Changed linker for `x86_64-fortanix-unknown-sgx` target to `rust-lld` This change needed the RelaxELFRelocations flag to be set for it to work correctly r? @jethrogb
Rollup of 7 pull requests Successful merges: - #66750 (Update the `wasi` crate for `wasm32-wasi`) - #66878 (Move Sessions into (new) librustc_session) - #66903 (parse_enum_item -> parse_enum_variant) - #66951 (miri: add throw_machine_stop macro) - #66957 (Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld) - #66960 ([const-prop] Fix ICE calculating enum discriminant) - #66973 (Update the minimum external LLVM to 7) Failed merges: r? @ghost
Bootstrap: change logic for choosing linker and rpath This is a follow-up from #66957 and #67023. Apparently there was one more location with a hard-coded list of targets to influence linking. I've filed #67171 to track this madness. r? @alexcrichton
Changed linker for
x86_64-fortanix-unknown-sgxtarget torust-lldThis change needed the RelaxELFRelocations flag to be set for it to work correctly
r? @jethrogb