You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Regression] GlobalValue with DLLImport Storage is dso_local! #101377
Confirmed with cargo-bisect-rustc --with-src --preserve --start 2022-09-01 -- build --target x86_64-unknown-uefi that #100537 is where it starts failing:
searched nightlies: from nightly-2022-09-01 to nightly-2022-09-03
regressed nightly: nightly-2022-09-02
searched commit range: 9243168...2e35f95
regressed commit: aa857eb
It feels wrong to produce executables with DLLImport annotations, knowing that UEFI loaders will never read .idata sections. While technically they could, I am not aware of any such implementations and the spec clearly states All other linkage to and from an UEFI image is done programmatically.
So I think there is some bug hiding somewhere. However, reverting to PIC to get things working is preferable to the status quo.
Activity
nicholasbishop commentedon Sep 3, 2022
Confirmed with
cargo-bisect-rustc --with-src --preserve --start 2022-09-01 -- build --target x86_64-unknown-uefithat #100537 is where it starts failing:searched nightlies: from nightly-2022-09-01 to nightly-2022-09-03
regressed nightly: nightly-2022-09-02
searched commit range: 9243168...2e35f95
regressed commit: aa857eb
bisected with cargo-bisect-rustc v0.6.4
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
The
uefi-servicescrate specifically seems to trigger the failure, compiling with justuefiseems OK.nicholasbishop commentedon Sep 4, 2022
Here's a slightly reduced test case:
Build output:
It seems the issue here is the switch from PIC to static for the reloc model in the UEFI targets. I will put up a PR to switch it back.
dvdhrm commentedon Sep 5, 2022
It feels wrong to produce executables with
DLLImportannotations, knowing that UEFI loaders will never read.idatasections. While technically they could, I am not aware of any such implementations and the spec clearly statesAll other linkage to and from an UEFI image is done programmatically.So I think there is some bug hiding somewhere. However, reverting to PIC to get things working is preferable to the status quo.
The linked PR looks good to me!
Use RelocModel::Pic for UEFI targets
Rollup merge of rust-lang#101413 - nicholasbishop:bishop-remove-uefi-…