-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Explicitly set no ELF flags for .rustc section #92029
Conversation
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after CI passes
@bors r=davidtwco |
📌 Commit 57c0cb7 has been approved by |
Use debug section for .rustc For a data section, the object crate will set SHF_ALLOC by default, which is exactly what we don't want. Use a debug section instead, the same as we do for .rmeta. I checked with `objdump -h` that this produces the right flags for ELF. Fixes rust-lang#92013.
Use debug section for .rustc For a data section, the object crate will set SHF_ALLOC by default, which is exactly what we don't want. Use a debug section instead, the same as we do for .rmeta. I checked with `objdump -h` that this produces the right flags for ELF. Fixes rust-lang#92013.
@bors r- Failed in rollup #92053 on x86_64-apple:
|
@bors try Let's see whether that makes it better or worse... |
⌛ Trying commit 1b35977b8f16af8e28f5732df35ea8e23332973e with merge 0566d7bbe5b7f636a4f7f054d397634880ea4a67... |
1b35977
to
2e56e0d
Compare
@bors try |
⌛ Trying commit 2e56e0de86eaa8769873a2a7c7ed7fa91d1d7d84 with merge 3f2645cb3ad797a0fa23bed459b6be1d6daeb5b5... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
2e56e0d
to
57223c4
Compare
@bors try |
⌛ Trying commit 57223c4f412596d16c7a3cb7dc913466fdeb4006 with merge 09ae9360e8f5e4649b589e052c5a68696bd2634f... |
☀️ Try build successful - checks-actions |
For a data section, the object crate will set the SHF_ALLOC by default, which is exactly what we don't want. Explicitly set sh_flags to zero to avoid this.
57223c4
to
79d5309
Compare
Okay, the original idea of using a debug section didn't work out (as it appears to get discarded by linker with macho), so this instead explicitly sets the section flags to zero. |
@bors r+ |
📌 Commit 79d5309 has been approved by |
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#91791 (Fix an ICE when lowering a float with missing exponent magnitude) - rust-lang#91878 (Remove `in_band_lifetimes` from `rustc_infer`) - rust-lang#91895 (Remove `in_band_lifetimes` for `rustc_monomorphize`) - rust-lang#92029 (Explicitly set no ELF flags for .rustc section) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
For a data section, the object crate will set the SHF_ALLOC by default, which is exactly what we don't want. Explicitly set sh_flags to zero to avoid this.
I checked with
objdump -h
that this produces the right flags for ELF.Fixes #92013.