Skip to content

Public extern functions no longer gets exported with LTO #37077

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

Closed
Zoxc opened this issue Oct 10, 2016 · 3 comments
Closed

Public extern functions no longer gets exported with LTO #37077

Zoxc opened this issue Oct 10, 2016 · 3 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Zoxc
Copy link
Contributor

Zoxc commented Oct 10, 2016

Public extern functions no longer gets exported with -C lto. Tested on 3210fd5

In particular this breaks rlibc.

Related #18134

@toothbrush7777777
Copy link

toothbrush7777777 commented Apr 18, 2017

@Zoxc Is there any workaround? I just ran into this exact problem.

@toothbrush7777777
Copy link

toothbrush7777777 commented Apr 19, 2017

@Zoxc If the functions are included in the project, everything works as intended. If they are in an external rlib such as rlibc, the linker aborts with undefined reference to `memset'. Is this due to the linkage(weak) attribute?

@Mark-Simulacrum Mark-Simulacrum added the A-linkage Area: linking into static, shared libraries and binaries label Jun 20, 2017
@Mark-Simulacrum Mark-Simulacrum added C-enhancement Category: An issue proposing an enhancement or a PR with one. C-bug Category: This is a bug. and removed C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jul 26, 2017
@Enselic Enselic added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Sep 13, 2023
@jackh726
Copy link
Member

I'm going to close this since there is no reproduction (and the linked issue has been closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants