Skip to content
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

Merged
merged 1 commit into from Apr 21, 2017

Conversation

MartinNowak
Copy link
Member

  • 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

- 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
@MartinNowak
Copy link
Member Author

MartinNowak commented Apr 21, 2017

This will fix the vibe.d libasync test, not sure if we want to add a test with more than 64K COMDAT sections.

@WalterBright
Copy link
Member

Thanks, @MartinNowak , glad to get this corrected.

@WalterBright
Copy link
Member

Auto-merge toggled on

@WalterBright
Copy link
Member

https://issues.dlang.org/show_bug.cgi?id=17338

Fixes the regression introduced by:

#6564

@WalterBright WalterBright merged commit a484020 into dlang:master Apr 21, 2017
if (I64)
SymbolTable64[STI_FILE].st_shndx = comdatidx2;
else
SymbolTable[STI_FILE].st_shndx = comdatidx2;
Copy link
Member Author

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()
Copy link
Member Author

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.

WalterBright added a commit that referenced this pull request Apr 22, 2017
fixup for - #6717 [Reg 2.075] link failure unsupported symbol section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants