projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e863d1
)
[PECOFF] Add a comment for SECREL relocation.
author
Rui Ueyama
<ruiu@google.com>
Thu, 6 Nov 2014 01:14:02 +0000
(
01:14
+0000)
committer
Rui Ueyama
<ruiu@google.com>
Thu, 6 Nov 2014 01:14:02 +0000
(
01:14
+0000)
llvm-svn: 221423
lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
patch
|
blob
|
history
diff --git
a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
index
b397222
..
2c682a4
100644
(file)
--- 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];