musl/src/internal/libc.c
Rich Felker e1b9c1b01b save AT_HWCAP from auxv for subsequent use in machine-specific code
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.
2012-07-27 00:14:57 -04:00

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;