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
fix Issue 17338 - [Reg 2.075] link failure unsupported symbol section #6717
Conversation
- fix usage of "guessed" comdat section index (section_cnt + 1), which ignored extended section indices with more than 65280 sections - fixed by setting the weak identifying group section symbol (sh_info) after creating a .text section for it
This will fix the vibe.d libasync test, not sure if we want to add a test with more than 64K COMDAT sections. |
Thanks, @MartinNowak , glad to get this corrected. |
Auto-merge toggled on |
https://issues.dlang.org/show_bug.cgi?id=17338 Fixes the regression introduced by: |
if (I64) | ||
SymbolTable64[STI_FILE].st_shndx = comdatidx2; | ||
else | ||
SymbolTable[STI_FILE].st_shndx = comdatidx2; |
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.
Not sure what this was supposed to do.
if (comdatidx2 != comdatidx) | ||
{ | ||
/* This can happen if there are two function definitions with the same signature. | ||
* It really should be an error, but it's in the test suite as compile1.d, bug6720() |
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.
Turns out the issue with Higgs is caused by Issue 17339 – ambiguous mangling with module level const values as alias template argument. So there are 2 instantiations with identical mangling, causing s->Sseg
to go into the section of the first instantion, and the linker complaining that the group references an earlier section.
Since they have the same mangling (and hopefully definition), and which one gets chosen depends on weak linkage anyhow, we might just reuse the first instantiations group.
fixup for - #6717 [Reg 2.075] link failure unsupported symbol section
ignored extended section indices with more than 65280 sections
after creating a .text section for it