[PATCH] D97576: [lld-macho][nfc] Remove TODO regarding addends
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 1 09:30:31 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf083f652c3fd: [lld-macho][nfc] Remove TODO regarding addends (authored by int3).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97576/new/
https://reviews.llvm.org/D97576
Files:
lld/MachO/InputFiles.cpp
Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -330,8 +330,7 @@
// The implicit addend for pcrel section relocations is the pcrel offset
// in terms of the addresses in the input file. Here we adjust it so
// that it describes the offset from the start of the referent section.
- // TODO: The offset of 4 is probably not right for ARM64, nor for
- // relocations with r_length != 2.
+ assert(target->hasAttr(r.type, RelocAttrBits::BYTE4));
referentOffset =
sec.addr + relInfo.r_address + 4 + totalAddend - referentSec.addr;
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97576.327147.patch
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210301/942bd180/attachment.bin>
More information about the llvm-commits
mailing list