forked from OSchip/llvm-project
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. llvm-svn: 219179
This commit is contained in:
parent
3ff2064241
commit
6cfcc294fe
|
@ -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(uint8_t *buffer,
|
|||
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(uint8_t *buffer,
|
|||
}
|
||||
}
|
||||
|
||||
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(uint8_t *bufferStart) {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue