[PATCH] D145850: [AsmPrinter] Use linker-private symbols in xray_instr_map

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 11 15:47:14 PDT 2023


MaskRay added a comment.

`xray_fn_idx` entries should use PC-relative relocations as well, but I never get around to fix it. I wonder whether the change may make this patch unneeded or we are going to find other Mach-O relocation related issues.

---

> All emitted entries in xray_instr_map use local labels, so the entire section ends up filled with local (r_extern=0) relocations, which is not allowed on x86_64 in Mach-O.

I wondered why `clang --target=arm64-apple-darwin -fxray-instrument -fxray-instruction-threshold=1 a.c` works while `-S` then `-c a.o` reported an assembler report.
The issue seems to be related to d6223a24718df3c30b67422c2eb6d0e93af9c4e8


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145850/new/

https://reviews.llvm.org/D145850



More information about the llvm-commits mailing list