diff --git a/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h b/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h index acd235c41bec7b99d172eb4a4da81d4a8d18bc7f..7d9931af2fb984282abcc5ec7e01e4a1115bd432 100644 --- a/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h +++ b/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h @@ -44,8 +44,10 @@ #elif (defined(__riscv) && (__riscv_xlen == 64)) -// FIXME: have not tested it out, is it ok? -#define GOT_RELOC(sym) auipc a0, %got_pcrel_hi(sym) +// clang driver for android default enables "-mrelocation-model pic", so 'la' should +// be able to access GOT. A better choise is to use 'lga' but clang has not supported +// this pseudo-inst yet. +#define GOT_RELOC(sym) la a0, sym #define CALL(sym) call sym@plt #define DATA_WORD(val) .quad val #define MAIN .globl main; main: nop; ret diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index 94dd8a30561a15b28c98814d833c33fb37f9cb29..28ceea1e2b432d557df017acd6c3219a9deaf6fc 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -367,8 +367,10 @@ typedef struct ucontext_t { unsigned long int __uc_flags; struct ucontext_t *uc_link; stack_t uc_stack; - sigset_t uc_sigmask; - sigset64_t uc_sigmask64; + union { + sigset_t uc_sigmask; + sigset64_t uc_sigmask64; + }; unsigned char __reserved[1024 / 8 - sizeof (sigset_t)]; mcontext_t uc_mcontext; } ucontext_t;