Mercurial > hg > CbC > CbC_llvm
comparison lld/MachO/Arch/X86_64.cpp @ 252:1f2b6ac9f198 llvm-original
LLVM16-1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Aug 2023 09:04:13 +0900 |
parents | c4bab56944e8 |
children |
comparison
equal
deleted
inserted
replaced
237:c80f45b162ad | 252:1f2b6ac9f198 |
---|---|
229 assert(r.type == X86_64_RELOC_BRANCH); | 229 assert(r.type == X86_64_RELOC_BRANCH); |
230 | 230 |
231 if (config->outputType == MH_OBJECT) | 231 if (config->outputType == MH_OBJECT) |
232 return; | 232 return; |
233 | 233 |
234 if (sym->getName().startswith("___dtrace_probe")) { | 234 if (sym->getName().starts_with("___dtrace_probe")) { |
235 // change call site to a NOP | 235 // change call site to a NOP |
236 loc[-1] = 0x90; | 236 loc[-1] = 0x90; |
237 write32le(loc, 0x00401F0F); | 237 write32le(loc, 0x00401F0F); |
238 } else if (sym->getName().startswith("___dtrace_isenabled")) { | 238 } else if (sym->getName().starts_with("___dtrace_isenabled")) { |
239 // change call site to a clear eax | 239 // change call site to a clear eax |
240 loc[-1] = 0x33; | 240 loc[-1] = 0x33; |
241 write32le(loc, 0x909090C0); | 241 write32le(loc, 0x909090C0); |
242 } else { | 242 } else { |
243 error("Unrecognized dtrace symbol prefix: " + toString(*sym)); | 243 error("Unrecognized dtrace symbol prefix: " + toString(*sym)); |