-
Notifications
You must be signed in to change notification settings - Fork 13.4k
lld silently creates an non-working executable if both .ctors and .init_array exist #68071
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
Comments
I very recently observed this when using I'm wondering what would be the effort to implement the same functionality that bfd/gold have with regards to converting |
Actually I see that the work was done, but just not merged. https://reviews.llvm.org/D35509 Development was tracked here: #30572 At the end of the thread, the author states:
Which is ironic because I just inspected CUDA 12.2 and 12.3 linux binaries and they include |
Duplicate of #30572 and there is nothing changed. I understand the frustration but as of 2023 this appears a CUDA specific issue. You can run |
Remove the old .ctors/.dtors usage, this breaks LLVM LLD usage (llvm/llvm-project#68071) Signed-off-by: Callum Farmer <[email protected]>
Remove the old .ctors/.dtors usage, this breaks LLVM LLD usage (llvm/llvm-project#68071) Signed-off-by: Callum Farmer <[email protected]>
If input object files contain both
.ctors
and.init_array
, the result would contain both.ctors
and.init_array
, and the result is very likely to crash because some initializer are not executed. We may want to emit a warning from lld if the output may not work due to this issue.The text was updated successfully, but these errors were encountered: