Fix "[compiler-rt] Allow 3 simultaneous interceptors on Linux"

Fix inline asm trampoline type. Some architectures will complain:

<inline asm>:8:41: error: expected STT_<TYPE_IN_UPPER_CASE>, '#<type>', '%<type>' or "<type>"
    8 | .type  __interceptor_trampoline_malloc, @function

Just use %function instead, which is what is also used in
sanitizer_asm.h
This commit is contained in:
Marco Elver 2023-06-09 12:12:30 +02:00
parent b28614c4fc
commit 85d3873a45

View File

@ -196,7 +196,7 @@ const interpose_substitution substitution_##func_name[] \
__ASM_WEAK_WRAPPER(func) \
".set " #func ", " SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
".globl " SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
".type " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", @function\n" \
".type " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", %function\n" \
SANITIZER_STRINGIFY(TRAMPOLINE(func)) ":\n" \
SANITIZER_STRINGIFY(CFI_STARTPROC) "\n" \
SANITIZER_STRINGIFY(ASM_TAIL_CALL) " __interceptor_" \