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 12896 - ld.gold complains about bad relocations when building libphobos2.so #3715

Merged
merged 1 commit into from
Jul 4, 2014

Conversation

MartinNowak
Copy link
Member

Revert "Merge pull request #3597 from MartinNowak/fix879"

This reverts commit dc0cd23, reversing
changes made to e01af42.

This reverts commit dc0cd23, reversing
changes made to e01af42.
@dnadlinger
Copy link
Member

@MartinNowak: I'd appreciate if we could have a short chat about ironing out the few remaining kinks in shared library support. I have two ideas for this specific problem, one of which is ugly, but seems to work for LDC (just stupidly push a reference to the current module's module info ref symbol on the stack in the dso ctor). But there are a also couple of other issues where it would be great if we could make sure not to duplicate work. Just shoot me an email if you have a few minutes. I'll probably also be around on #d@freenode.net later this evening.

@WalterBright
Copy link
Member

Handy link: https://issues.dlang.org/show_bug.cgi?id=12896

And Martin's rationale:

The ld.gold linker is complaining about a bad offset for the fake relocations added to pin the deh_eh and the minfo section. Those are 0-sized NONE relocations added to the end of the d_dso_init function. The gold linker complains, because it thinks there is no space for the relocation (the section only has 56 bytes) even though it doesn't require any space. A simple solution would be to set the relocation offset to 0 (i.e. the begin of d_dso_init) but there are further issues with --gc-sections and ld.gold which necessitate a different solution, so reverting is the best option for now.

@WalterBright
Copy link
Member

Auto-merge toggled on

WalterBright added a commit that referenced this pull request Jul 4, 2014
fix Issue 12896 - ld.gold complains about bad relocations when building libphobos2.so
@WalterBright WalterBright merged commit bcf55ca into dlang:master Jul 4, 2014
@MartinNowak MartinNowak deleted the fix12896 branch July 4, 2014 22:22
9rnsr pushed a commit to 9rnsr/dmd that referenced this pull request Jul 7, 2014
fix Issue 12896 - ld.gold complains about bad relocations when building libphobos2.so
@dnadlinger
Copy link
Member

Further discussion at the original bug report: https://issues.dlang.org/show_bug.cgi?id=879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants