[PATCH] D83669: [PowerPC] Support for R_PPC64_REL24_NOTOC calls where the caller has no TOC and the callee is not DSO local

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 19:17:58 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:1042
   if (s.isInPlt())
-    return make<PPC64PltCallStub>(s);
+    return (type == R_PPC64_REL24_NOTOC)
+               ? (Thunk *)make<PPC64PCRelPLTStub>(s)
----------------
Remove unneeded parens.


================
Comment at: lld/test/ELF/Inputs/ppc64-callee-global.s:1
+func_extern:
+  blr
----------------
Use `extract`?

or `llvm-mc --defsym AUX=1` and 

```
.ifdef AUX
...
.else
...
.endif
```


================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-extern.s:26
+# SYMBOL: 1: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT [<other: 0x60>] UND callee_global_TOC
+# SYMBOL: 2: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT                UND callee_global_stother0
+# SYMBOL: 3: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT [<other: 0x20>] UND callee_global_stother1
----------------
`-NEXT:`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83669





More information about the llvm-commits mailing list