diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-07-25 01:44:32 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-07-25 01:44:32 +0000 |
| commit | 3afd5bfd7bb2a7741da9c61860eb80d103be3b04 (patch) | |
| tree | 7f068c5854c6fd004977074ab4b0d27cb37f956f /lld/COFF/DLL.cpp | |
| parent | 922b702bf9d4a27cde8fe08f9bb694b8ca8d94ac (diff) | |
| download | bcm5719-llvm-3afd5bfd7bb2a7741da9c61860eb80d103be3b04.tar.gz bcm5719-llvm-3afd5bfd7bb2a7741da9c61860eb80d103be3b04.zip | |
COFF: Handle base relocation as a tuple of relocation type and RVA. NFC.
On x64 and x86, we use only one base relocation type, so we handled
base relocations just as a list of RVAs. That doesn't work well for
ARM becuase we have to handle two types of base relocations on ARM.
This patch changes the type of base relocation from uint32_t to
{reltype, uint32_t} to make it easy to port this code to ARM.
llvm-svn: 243197
Diffstat (limited to 'lld/COFF/DLL.cpp')
| -rw-r--r-- | lld/COFF/DLL.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/COFF/DLL.cpp b/lld/COFF/DLL.cpp index 9e1731dcafa..09123bcaacc 100644 --- a/lld/COFF/DLL.cpp +++ b/lld/COFF/DLL.cpp @@ -319,9 +319,9 @@ public: write32le(Buf + FileOff + 13, Helper->getRVA() - RVA - 17); } - void getBaserels(std::vector<uint32_t> *Res) override { - Res->push_back(RVA + 3); - Res->push_back(RVA + 8); + void getBaserels(std::vector<Baserel> *Res) override { + Res->emplace_back(RVA + 3); + Res->emplace_back(RVA + 8); } Defined *Imp = nullptr; @@ -367,8 +367,8 @@ public: write64le(Buf + FileOff, Thunk->getRVA() + Config->ImageBase); } - void getBaserels(std::vector<uint32_t> *Res) override { - Res->push_back(RVA); + void getBaserels(std::vector<Baserel> *Res) override { + Res->emplace_back(RVA); } Chunk *Thunk; |

