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 879 - support for --gc-sections #3597

Merged
merged 1 commit into from
May 28, 2014
Merged

Conversation

MartinNowak
Copy link
Member

  • pin .deh_eh and .minfo by emitting fake references in dso startup code
  • enable --gc-sections linker switch

Issue 879 - support for --gc-sections

@WalterBright
Copy link
Member

If this only works on Linux, it's still worth pulling, as long as the old behavior is used on other platforms rather than them failing.

@MartinNowak
Copy link
Member Author

OK @WalterBright , updated the pull to only be active on linux.

- pin .deh_eh and .minfo by emitting fake references in dso startup code

- enable --gc-sections linker switch
@MartinNowak
Copy link
Member Author

Changed to use R_arch_NONE relocations.

1 similar comment
@MartinNowak
Copy link
Member Author

Changed to use R_arch_NONE relocations.

WalterBright added a commit that referenced this pull request May 28, 2014
fix 879 - support for --gc-sections
@WalterBright WalterBright merged commit dc0cd23 into dlang:master May 28, 2014
@MartinNowak MartinNowak deleted the fix879 branch May 28, 2014 20:06
@MartinNowak
Copy link
Member Author

FYI @Dicebot

@mihails-strasuns
Copy link

Description looks AWESOME :)
Bookmarked, going to experiment with it next weekend.

@mihails-strasuns
Copy link

Does not seem to make any actual effect. Using this trivial snippet:

void foo2()
{
}

void foo1()
{
    foo2();
}

void main()
{
}

nm a.out | grep foo shows that unused functions are still present in the binary :(

MartinNowak added a commit to MartinNowak/dmd that referenced this pull request Jul 4, 2014
This reverts commit dc0cd23, reversing
changes made to e01af42.
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