forked from OSchip/llvm-project
[PECOFF] Replace magic number with llvm::COFF::DataDirectoryIndex value
Patch by Ron Ofir. llvm-svn: 187220
This commit is contained in:
parent
2b59074ac8
commit
9c3ece328f
|
@ -382,7 +382,8 @@ public:
|
|||
}
|
||||
|
||||
void setBaseRelocField(uint32_t addr, uint32_t size) {
|
||||
auto *atom = new (_alloc) coff::COFFDataDirectoryAtom(_file, 5);
|
||||
auto *atom = new (_alloc) coff::COFFDataDirectoryAtom(
|
||||
_file, llvm::COFF::DataDirectoryIndex::BASE_RELOCATION_TABLE);
|
||||
uint64_t offset = atom->ordinal() * sizeof(llvm::object::data_directory);
|
||||
_atomLayouts.push_back(new (_alloc) AtomLayout(atom, offset, offset));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue