diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-11-06 01:14:02 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-11-06 01:14:02 +0000 |
| commit | 58942cc8ec6f195eeb3346d842cd19a73db8eca5 (patch) | |
| tree | 8fe93d2bd640fe80368d6f627b18630eb52c5f89 /lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | |
| parent | 6e863d12e5213e0dd5901cda373f3fa3f3537812 (diff) | |
| download | bcm5719-llvm-58942cc8ec6f195eeb3346d842cd19a73db8eca5.tar.gz bcm5719-llvm-58942cc8ec6f195eeb3346d842cd19a73db8eca5.zip | |
[PECOFF] Add a comment for SECREL relocation.
llvm-svn: 221423
Diffstat (limited to 'lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp')
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp index b397222b992..2c682a4bee3 100644 --- a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp @@ -538,6 +538,8 @@ static int getSectionIndex(uint64_t targetAddr, static uint32_t getSectionStartAddr(uint64_t targetAddr, const std::vector<uint64_t> §ionRva) { + // Scan the list of section start addresses to find the section start address + // for the given RVA. for (int i = 0, e = sectionRva.size(); i < e; ++i) if (i == e - 1 || (sectionRva[i] <= targetAddr && targetAddr < sectionRva[i + 1])) return sectionRva[i]; |

