summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-01-23 12:59:12 +0000
committerguenther <guenther@openbsd.org>2017-01-23 12:59:12 +0000
commit28d073a51380d1c7986f3a7adcd298b4418d718c (patch)
tree534e452e8d9d4c3f244f62666e6d579543b7699d
parentSlow down the churn and continue using old pledge name "ioctl" instead (diff)
downloadwireguard-openbsd-28d073a51380d1c7986f3a7adcd298b4418d718c.tar.xz
wireguard-openbsd-28d073a51380d1c7986f3a7adcd298b4418d718c.zip
The functionality of _dl_allocate_tib() is used internally, so rename
it to allocate_tib(), mark that hidden, then make the exported function an alias of that. ok kettenis@
-rw-r--r--libexec/ld.so/tib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.so/tib.c b/libexec/ld.so/tib.c
index 969edb2e1eb..a909488ebbe 100644
--- a/libexec/ld.so/tib.c
+++ b/libexec/ld.so/tib.c
@@ -34,6 +34,7 @@
/* If we need the syscall, use our local syscall definition */
#define __set_tcb(tcb) _dl_set_tcb(tcb)
+__dso_hidden void *allocate_tib(size_t);
static int static_tls_size;
@@ -46,7 +47,7 @@ int _dl_tib_static_done;
* for variant 2. If non-zero, tib_thread is set to point to that area.
*/
void *
-_dl_allocate_tib(size_t extra)
+allocate_tib(size_t extra)
{
char *base;
struct tib *tib;
@@ -98,6 +99,7 @@ _dl_allocate_tib(size_t extra)
return (tib);
}
+__strong_alias(_dl_allocate_tib, allocate_tib);
void
_dl_free_tib(void *tib, size_t extra)
@@ -183,7 +185,7 @@ _dl_allocate_first_tib(void)
{
struct tib *tib;
- tib = _dl_allocate_tib(0);
+ tib = allocate_tib(0);
tib->tib_tid = _dl_getthrid();
TCB_SET(TIB_TO_TCB(tib));