From e13063aad7aee341d278d2a879a76ec7b59b2ad8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 14 Sep 2018 23:08:53 -0400 Subject: add hidden version of &errno accessor function this significantly improves codegen in functions that need to access errno but otherwise have no need for a GOT pointer. we could probably improve it much more by including an inline version of the &errno accessor function, but that depends on having the definitions of struct __pthread and __pthread_self(), which at present would expose a lot more than is appropriate. moving them to a small tls.h later might make this more reasonable. --- src/errno/__errno_location.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/errno') diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c index ad9f9241..7f9d6027 100644 --- a/src/errno/__errno_location.c +++ b/src/errno/__errno_location.c @@ -5,3 +5,5 @@ int *__errno_location(void) { return &__pthread_self()->errno_val; } + +weak_alias(__errno_location, ___errno_location); -- cgit v1.2.1