X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/f410558f5d60087e4c310119a1751b437121c3b9..e456bf1059cf7e6b8b71545d1b2f2092b55a9684:/unit-tests/test-cases/dtrace-old-probes/main.c diff --git a/unit-tests/test-cases/dtrace-old-probes/main.c b/unit-tests/test-cases/dtrace-old-probes/main.c index 811449a..bd02587 100644 --- a/unit-tests/test-cases/dtrace-old-probes/main.c +++ b/unit-tests/test-cases/dtrace-old-probes/main.c @@ -13,12 +13,21 @@ #define DTRACE_LAB(p, n) \ "__dtrace_probe$" DTRACE_TOSTRING(%=__LINE__) DTRACE_STRINGIFY(_##p##___##n) +#if (defined __x86_64__ || defined __arm64__) +#define DTRACE_LABEL(p, n) \ + ".section __DATA, __data\n\t" \ + ".globl " DTRACE_LAB(p, n) "\n\t" \ + DTRACE_LAB(p, n) ":" ".quad 1f""\n\t" \ + ".text" "\n\t" \ + "1:" +#else #define DTRACE_LABEL(p, n) \ ".section __DATA, __data\n\t" \ ".globl " DTRACE_LAB(p, n) "\n\t" \ DTRACE_LAB(p, n) ":\n\t" ".long 1f""\n\t" \ ".text" "\n\t" \ "1:" +#endif #define DTRACE_CALL(p,n) \ DTRACE_LABEL(p,n) \