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:
Guillem Jover
2019-08-06 18:51:45 +02:00
parent b0ebb0d4c2
commit 890699a78b
4 changed files with 18 additions and 6 deletions

View File

@@ -77,6 +77,8 @@ __weak_alias(strvisx,_strvisx)
#include <stdio.h>
#include <string.h>
#include "local-link.h"
#define _DIAGASSERT(x)
/*
@@ -735,14 +737,14 @@ strnvis_openbsd(char *mbdst, const char *mbsrc, size_t dlen, int flags)
{
return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL);
}
__asm__(".symver strnvis_openbsd,strnvis@@LIBBSD_0.2");
libbsd_symver_default(strnvis, strnvis_openbsd, LIBBSD_0.2);
int
strnvis_netbsd(char *mbdst, size_t dlen, const char *mbsrc, int flags)
{
return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL);
}
__asm__(".symver strnvis_netbsd,strnvis@LIBBSD_0.9.1");
libbsd_symver_variant(strnvis, strnvis_netbsd, LIBBSD_0.9.1);
int
stravis(char **mbdstp, const char *mbsrc, int flags)