[PATCH] D43287: [LLD] [COFF] Add support for ARM64 secrel relocations for add/load instructions

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 21:09:38 PST 2018


ruiu added inline comments.


================
Comment at: COFF/Chunks.cpp:218-222
+  if (!OS) {
+    if (Sec->isCodeView())
+      return;
+    fatal("SECREL relocation cannot be applied to absolute symbols");
+  }
----------------
You should factor out this part of code.


================
Comment at: COFF/Chunks.cpp:225
+  SecRel >>= Shift;
+  if (Shift > 0 && SecRel > 0xfff) {
+    error("overflow in SECREL_HIGH12A relocation in section: " +
----------------
Why do you need to check for Shift?


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43287





More information about the llvm-commits mailing list