What are difference between the ELF symbol visibility levels?
8
votes
1
answer
6045
views
The [NASM docs on *"
elf
Extensions to the GLOBAL Directive"* say,](https://www.nasm.us/doc/nasmdoc7.html)
> Optionally, you can control the ELF visibility of the symbol. Just add one of the visibility keywords: default
, internal
, hidden
, or protected
. The default is default
of course.
Where are these defined? and how does ld
use them? I see [access levels mentioned frequently in C++ which include *protected*, *public*, and *private*](https://en.cppreference.com/w/cpp/language/access) , but I don't know if this is what ELF is referencing?
My use-case is C and Assembly so if you can make this relevant to those two languages and the linker, extra points.
Asked by Evan Carroll
(34663 rep)
Oct 1, 2018, 11:47 PM
Last activity: Oct 2, 2018, 02:41 PM
Last activity: Oct 2, 2018, 02:41 PM