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

-fvisibility=internal not implemented #9555

Closed
rnk opened this issue Feb 10, 2011 · 3 comments
Closed

-fvisibility=internal not implemented #9555

rnk opened this issue Feb 10, 2011 · 3 comments
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@rnk
Copy link
Collaborator

rnk commented Feb 10, 2011

Bugzilla Link 9183
Resolution FIXED
Resolved on Oct 21, 2015 17:01
Version trunk
OS All

Extended Description

I ran into this while compiling DynamoRIO with clang.

Does anyone even know what the heck it means? So far as I can tell, it's identical to hidden visibility, except that you also promise that no one outside the DSO you going to link can get a function pointer to functions with internal visibility. That interpretation is based on this Intel doc:

http://software.intel.com/sites/products/documentation/studio/composer/en-us/2009/compiler_c/copts/common_options/option_fvisibility.htm

To aim for bug-for-bug compatibility with the gcc driver, I'd just interpret internal as hidden. Alternatively, someone can go look at the gcc source and see how they interpret internal.

If calling it hidden works, I can write a patch.

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 10, 2011

The GCC docs have a longer description of visibility="hidden" (and also of visibility="protected"):

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Internal visibility is like hidden visibility, but with additional processor specific semantics. Unless otherwise specified by the psABI, GCC defines internal visibility to mean that a function is /never/ called from another module. Compare this with hidden functions which, while they cannot be referenced directly by other modules, can be referenced indirectly via function pointers. By indicating that a function cannot be called from outside the module, GCC may for instance omit the load of a PIC register since it is known that the calling function loaded the correct value.

@rnk
Copy link
Collaborator Author

rnk commented Feb 10, 2011

Thanks, my google-fu failed me because I was searching for "fvisibility internal", which missed the attributes.

That seems like it's an optimization relevant to x86_32. Is it worth mapping internal to hidden and leaving this bug open until someone implements the optimization?

@rnk
Copy link
Collaborator Author

rnk commented Oct 22, 2015

Fixed, 4 years later. r250954

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
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 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants