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

protected visibility not supported #1735

Closed
llvmbot opened this issue Apr 27, 2007 · 14 comments
Closed

protected visibility not supported #1735

llvmbot opened this issue Apr 27, 2007 · 14 comments
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 27, 2007

Bugzilla Link 1363
Resolution FIXED
Resolved on Feb 22, 2010 12:50
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

LLVM doesn't support

int bar attribute ((visibility ("protected"))) = 1;

This is needed to compile the glibc.

@asl
Copy link
Collaborator

asl commented Apr 27, 2007

Lauro, what's the semantics of protected visibility? How it should be
codegen'ed? There were some bits reserved to "future visibility types", so the
only non-trivial part should be codegen.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 27, 2007

I don't know what is its semantics, but the codegen must emit ".protected bar".

@asl
Copy link
Collaborator

asl commented Apr 27, 2007

Mine. Should be trivial.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 27, 2007

@asl
Copy link
Collaborator

asl commented Apr 28, 2007

LLVM-side patch
Lauro, please find LLVM-side patch attached. There is no linker part, you'll
have to add it by yourself. llvm-gcc part should be easy, I think (check for
VISIBILITY_PROTECTED in the same places as hidden is checked). LangRef should
be updated with the correct semantics of protected visibility as well.

Testcase:

@​X = protected global i32 1234

@lattner
Copy link
Collaborator

lattner commented Apr 29, 2007

The patch looks fine, please apply it. The critical missing pieces are LangRef.html and linker support.

-Chris

@asl
Copy link
Collaborator

asl commented Apr 29, 2007

@asl
Copy link
Collaborator

asl commented Apr 29, 2007

As for linker: ld doesn't allow multiple definitions of the same variable with
different visibility styles. It just treats this as redefinition. Should we
follow ld?

@lattner
Copy link
Collaborator

lattner commented Apr 29, 2007

Yes, we should emulate ld

@asl
Copy link
Collaborator

asl commented Apr 29, 2007

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 30, 2007

LLVM-GCC-side patch

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 30, 2007

LLVM-GCC-side patch
I missed a TREE_PUBLIC check in the previous patch.

@lattner
Copy link
Collaborator

lattner commented May 5, 2007

Patch applied, should this be closed?

@asl
Copy link
Collaborator

asl commented May 5, 2007

Yes. Definitely.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed missing-feature labels Aug 15, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

4 participants