X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Finternal%2Flibc.c;h=c1e21ca021a45ebe7f2736a4cba13d75e0c1613d;hb=fcaec912ed406659832f452e71a6c965308362dd;hp=5e8e9d95311f346013ce0c12c99f474fd98ea0ab;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/internal/libc.c b/src/internal/libc.c index 5e8e9d95..c1e21ca0 100644 --- a/src/internal/libc.c +++ b/src/internal/libc.c @@ -1,3 +1,15 @@ #include "libc.h" -struct libc libc; +#ifdef USE_LIBC_ACCESSOR +struct __libc *__libc_loc() +{ + static struct __libc __libc; + return &__libc; +} +#else +struct __libc __libc; +#endif + +#ifdef BROKEN_VISIBILITY +__asm__(".hidden __libc"); +#endif