mirror of
https://github.com/fluencelabs/musl
synced 2025-06-08 20:41:35 +00:00
it's expected that this will be needed/useful only in asm, so I've given it its own symbol that can be addressed in pc-relative ways from asm rather than adding a field in the __libc structure which would require hard-coding the offset wherever it's used.
18 lines
235 B
C
18 lines
235 B
C
#include "libc.h"
|
|
|
|
#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
|
|
|
|
size_t __hwcap;
|