[PATCH] D155732: [MC][COFF][AArch64] Avoid incorrect IMAGE_REL_ARM64_BRANCH26 relocations.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 18:55:12 PDT 2023


hjyamauchi added a comment.

Please take another look. @efriedma



================
Comment at: llvm/lib/MC/WinCOFFObjectWriter.cpp:935
+              Offset < Layout.getSectionAddressSize(&A.getSection()))) {
+          report_fatal_error(
+              "cannot add a symbol that's outside of the section");
----------------
efriedma wrote:
> `Asm.getContext().reportError()`, like code earlier in this function.
Done.


================
Comment at: llvm/lib/MC/WinCOFFObjectWriter.cpp:944
+      Reloc.Symb = S;
+      FixedValue = 0;  // Zero offset
+    } else {
----------------
efriedma wrote:
> I don't understand why it's safe to throw away the "FixedValue" here; there could be an explicit offset.
Done.


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

https://reviews.llvm.org/D155732



More information about the llvm-commits mailing list