[PATCH] D156505: [AArch64][ELF] Support R_AARCH64_AUTH_ABS64 static relocation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 23:15:30 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp:201
+  Res = MCValue::get(Res.getSymA(), nullptr, Res.getConstant(), getKind());
+
+  return true;
----------------
delete blank line


================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h:215
+
+  static bool classof(const MCExpr *E) {
+    return E->getKind() == MCExpr::Target;
----------------
unneeded?


================
Comment at: llvm/test/MC/AArch64/ptrauth-elf-reloc.s:94
+
+// RUN: not llvm-mc -triple=aarch64 %t/err1.s 2>&1 | \
+// RUN: FileCheck %s --check-prefix=ERR1
----------------
llvm-mc has error recovery. You can test all errors in one llvm-mc invocation, instead of using many `err*.s`


================
Comment at: llvm/test/MC/AArch64/ptrauth-elf-reloc.s:95
+// RUN: not llvm-mc -triple=aarch64 %t/err1.s 2>&1 | \
+// RUN: FileCheck %s --check-prefix=ERR1
+
----------------
continuation lines are indented by 2 by convention


================
Comment at: llvm/test/MC/AArch64/ptrauth-elf-reloc.s:97
+
+// ERR1: error: expected '('
+
----------------
Newer tests are recommended to test the line/column information like:

```
// ERR: :[[#@LINE+1]]:10: error: expected '('
.quad sym at AUTH)ia,42)
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156505



More information about the llvm-commits mailing list