-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
-ffunction-sections triggers an LLVM assert on windows #13846
Comments
#13793 issue has been fixed now, but it seems that other obscure bug exists in llvm or linker.
Linker failed to find |
@klutzy Are you able to reproduce those 'obscure bugs' with the latest Rust? |
I re-enabled function sections on Windows in the current master branch, and it compiled and passed tests without errors. |
It is expected that |
I am talking about size of the final executable, not about rlib. I thought all text/data sections get merged during linking. Is there some residual per-section overhead?
Good question... There was a patch enabling |
... and the answer is ... NO |
Oh you may be right. I think I'm forgetting the exact specifics but what you're saying sounds right. Maybe there's a mixture of the two happening on windows?
:( |
Kind of a wishlist feature, so closing. We just have to remember this problem if somebody ever tries to turn -ffunction-sections on again. Reopen if you disagree. |
update FIXME(rust-lang#6298) to point to open issue 15020 update FIXME(rust-lang#6268) to point to RFC 811 update FIXME(rust-lang#10520) to point to RFC 1751 remove FIXME for emscripten issue 4563 and include target in `test_estimate_scaling_factor` remove FIXME(rust-lang#18207) since node_id isn't used for `ref` pattern analysis remove FIXME(rust-lang#6308) since DST was implemented in rust-lang#12938 remove FIXME(rust-lang#2658) since it was decided to not reorganize module remove FIXME(rust-lang#20590) since it was decided to stay conservative with projection types remove FIXME(rust-lang#20297) since it was decided that solving the issue is unnecessary remove FIXME(rust-lang#27086) since closures do correspond to structs now remove FIXME(rust-lang#13846) and enable `function_sections` for windows remove mention of rust-lang#22079 in FIXME(rust-lang#22079) since this is a general FIXME remove FIXME(rust-lang#5074) since the restriction on borrow were lifted
FTR this feature works fine nowadays but it causes LD older than 2.32 to misalign relocations information, LLD is unaffected. |
It's the same assert as seen by #13793. I suspect that they are related bugs, and that this is likely an upstream LLVM bug.
This is a tracking issue for this for now. I'm going to turn off -ffunction-sections for windows.
The text was updated successfully, but these errors were encountered: