diff options
author | Guillem Jover <guillem@hadrons.org> | 2019-08-06 18:51:45 +0200 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2019-08-08 03:22:09 +0200 |
commit | 890699a78b892a8591cd465f97d4967ee94d54c9 (patch) | |
tree | 86e94e164ce774644eaecccaf1b464df6d583626 /src/local-link.h | |
parent | b0ebb0d4c26b281facbab7a774510b541637b13b (diff) |
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.
Diffstat (limited to 'src/local-link.h')
-rw-r--r-- | src/local-link.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/local-link.h b/src/local-link.h index 5f3c0fd..5a17bfe 100644 --- a/src/local-link.h +++ b/src/local-link.h @@ -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 |