mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-27 19:10:23 +01:00
build: Abstract symbol versioning via new libbsd_symver_* macros
This makes it more obvious what they are doing. It will make it easier to make these directives more portable, as they are really ELF specific.
This commit is contained in:
@@ -30,4 +30,11 @@
|
||||
#define libbsd_link_warning(symbol, msg) \
|
||||
static const char libbsd_emit_link_warning_##symbol[] \
|
||||
__attribute__((__used__,__section__(".gnu.warning." #symbol))) = msg;
|
||||
|
||||
#define libbsd_symver_default(alias, symbol, version) \
|
||||
__asm__(".symver " #symbol "," #alias "@@" #version)
|
||||
|
||||
#define libbsd_symver_variant(alias, symbol, version) \
|
||||
__asm__(".symver " #symbol "," #alias "@" #version)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user