[lld] r219179 - PE/COFF: rename applyRelocations* family
Saleem Abdulrasool
compnerd at compnerd.org
Mon Oct 6 18:12:14 PDT 2014
Author: compnerd
Date: Mon Oct 6 20:12:13 2014
New Revision: 219179
URL: http://llvm.org/viewvc/llvm-project?rev=219179&view=rev
Log:
PE/COFF: rename applyRelocations* family
Use x86 and x64 which is the canonical Microsoft vernacular for the targets.
Addresses post-commit review comments from Rui.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=219179&r1=219178&r2=219179&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Mon Oct 6 20:12:13 2014
@@ -220,14 +220,14 @@ public:
std::map<const Atom *, uint64_t> &atomRva,
std::vector<uint64_t> §ionRva,
uint64_t imageBaseAddress);
- void applyRelocationsX86_32(uint8_t *buffer,
- std::map<const Atom *, uint64_t> &atomRva,
- std::vector<uint64_t> §ionRva,
- uint64_t imageBaseAddress);
- void applyRelocationsX86_64(uint8_t *buffer,
- std::map<const Atom *, uint64_t> &atomRva,
- std::vector<uint64_t> §ionRva,
- uint64_t imageBaseAddress);
+ void applyRelocationsX86(uint8_t *buffer,
+ std::map<const Atom *, uint64_t> &atomRva,
+ std::vector<uint64_t> §ionRva,
+ uint64_t imageBaseAddress);
+ void applyRelocationsX64(uint8_t *buffer,
+ std::map<const Atom *, uint64_t> &atomRva,
+ std::vector<uint64_t> §ionRva,
+ uint64_t imageBaseAddress);
void printAtomAddresses(uint64_t baseAddr) const;
void addBaseRelocations(std::vector<uint64_t> &relocSites) const;
@@ -511,10 +511,10 @@ void AtomChunk::applyRelocationsARM(uint
uint64_t imageBaseAddress) {
}
-void AtomChunk::applyRelocationsX86_32(uint8_t *buffer,
- std::map<const Atom *, uint64_t> &atomRva,
- std::vector<uint64_t> §ionRva,
- uint64_t imageBaseAddress) {
+void AtomChunk::applyRelocationsX86(uint8_t *buffer,
+ std::map<const Atom *, uint64_t> &atomRva,
+ std::vector<uint64_t> §ionRva,
+ uint64_t imageBaseAddress) {
buffer += _fileOffset;
for (const auto *layout : _atomLayouts) {
const DefinedAtom *atom = cast<DefinedAtom>(layout->_atom);
@@ -564,10 +564,10 @@ void AtomChunk::applyRelocationsX86_32(u
}
}
-void AtomChunk::applyRelocationsX86_64(uint8_t *buffer,
- std::map<const Atom *, uint64_t> &atomRva,
- std::vector<uint64_t> §ionRva,
- uint64_t imageBase) {
+void AtomChunk::applyRelocationsX64(uint8_t *buffer,
+ std::map<const Atom *, uint64_t> &atomRva,
+ std::vector<uint64_t> §ionRva,
+ uint64_t imageBase) {
buffer += _fileOffset;
for (const auto *layout : _atomLayouts) {
const DefinedAtom *atom = cast<DefinedAtom>(layout->_atom);
@@ -1116,10 +1116,10 @@ void PECOFFWriter::applyAllRelocations(u
chunk->applyRelocationsARM(bufferStart, _atomRva, sectionRva, base);
break;
case llvm::COFF::IMAGE_FILE_MACHINE_I386:
- chunk->applyRelocationsX86_32(bufferStart, _atomRva, sectionRva, base);
+ chunk->applyRelocationsX86(bufferStart, _atomRva, sectionRva, base);
break;
case llvm::COFF::IMAGE_FILE_MACHINE_AMD64:
- chunk->applyRelocationsX86_64(bufferStart, _atomRva, sectionRva, base);
+ chunk->applyRelocationsX64(bufferStart, _atomRva, sectionRva, base);
break;
}
}
More information about the llvm-commits
mailing list