[PATCH] D34857: [COFF, ARM64] Add initial relocation types

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 16 14:28:34 PDT 2017


compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.

Please fix the relocation type before you commit this.



================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp:50
                                          const MCAsmBackend &MAB) const {
-  const MCFixupKindInfo &Info = MAB.getFixupKindInfo(Fixup.getKind());
-  report_fatal_error(Twine("unsupported relocation type: ") + Info.Name);
+  MCSymbolRefExpr::VariantKind Modifier = Target.isAbsolute() ?
+                                          MCSymbolRefExpr::VK_None :
----------------
Use `auto` and clang-format.


================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp:66
+    case MCSymbolRefExpr::VK_SECREL:
+      return COFF::IMAGE_REL_ARM_SECREL;
+    }
----------------
Shouldn't this be `IMAGE_REL_ARM64_SECREL`?


================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp:67
+      return COFF::IMAGE_REL_ARM_SECREL;
+    }
+  case FK_Data_8:
----------------
Why no newline here?  Can you make the newline spacing uniform?


================
Comment at: test/MC/AArch64/coff-relocations.s:2
+; RUN: llvm-mc -triple aarch64-windows -filetype obj -o - %s | \
+; RUN: llvm-readobj -r - | FileCheck %s
+
----------------
Don't think that you need the second `RUN:` here.


Repository:
  rL LLVM

https://reviews.llvm.org/D34857





More information about the llvm-commits mailing list