History log of /haiku/headers/private/system/symbol_visibility.h
Revision Date Author Comments
# 857c79a6 09-Oct-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

Introduce symbol_visibility.h with macros to define hidden functions

These were used in function_remapper.cpp but can be used elsewhere too,
so move them to a private header. Also use them for the stack protector
hidden function definition (probably not so useful since gcc2 doesn't
support using the stack protector anyway?).

The gcc2 way to make a symbol hidden is to manually generate the .hidden
directive in the assembler output. This is not perfect: it is hard to
use for C++ functions and methods (manual mangling of the name is
needed), and inline assembler can only be inserted inside functions. But
the alternative is patching gcc2 to add support for the function
attribute, and I don't want to dig into that today.