Any *tor that is explicitly defined is dead weight if that definition doesn't do anything the compiler wouldn't do. But that has nothing to do with whether the thing is inlined or not.
Type: Posts; User: CornedBee
Any *tor that is explicitly defined is dead weight if that definition doesn't do anything the compiler wouldn't do. But that has nothing to do with whether the thing is inlined or not.
Moreover, the executable can contain code like this:
for every file in directory
if file is a shared library
load shared library
if shared library contains plugin init function
...
That's compiler-specific. Most use GCC's __attribute__ syntax.
E.g.
__attribute__((visibility("hidden"))) void fn(); // Function is not visible outside the module....
ELF visibility is whether other modules of the program can import a function. It applies equally to shared libraries (.so) as to core executables - ELF doesn't see much of a difference between them....
Depends. What did you set its visibility to? In ELF systems, all symbols have external visibility by default, so the compiler can't remove them - a shared object might want to load the function.
Eh? I thought LTO was still an experimental branch of the current GCC development.