mirror of
https://github.com/astromaddie/HaloCE-VR.git
synced 2026-10-28 13:00:26 +01:00
20 lines
599 B
C
20 lines
599 B
C
/*
|
|
musl's internal features.h, with weak_alias spelled as assembler
|
|
directives: the guest is compiled for a Darwin target, which rejects alias
|
|
attributes, and its assembly is converted to ELF afterwards
|
|
(tools/android_asm_convert.py), where the alias is ordinary.
|
|
*/
|
|
|
|
#ifndef GUEST_FEATURES_H
|
|
#define GUEST_FEATURES_H
|
|
|
|
#include_next "features.h"
|
|
|
|
#undef weak_alias
|
|
#define weak_alias(old, new) \
|
|
extern __typeof(old) new; \
|
|
static void *const __guest_alias_##new __attribute__((used)) = (void *)&old; \
|
|
__asm__(".globl _" #new "\n.weak_definition _" #new "\n.set _" #new ", _" #old "\n")
|
|
|
|
#endif
|