mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
llvm-readobj: Print out address table when dumping COFF delay-import table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1258,6 +1258,20 @@ getDelayImportTable(const delay_import_directory_table_entry *&Result) const {
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
std::error_code DelayImportDirectoryEntryRef::
|
||||
getImportAddress(int AddrIndex, uint64_t &Result) const {
|
||||
uint32_t RVA = Table[Index].DelayImportAddressTable +
|
||||
AddrIndex * (OwningObject->is64() ? 8 : 4);
|
||||
uintptr_t IntPtr = 0;
|
||||
if (std::error_code EC = OwningObject->getRvaPtr(RVA, IntPtr))
|
||||
return EC;
|
||||
if (OwningObject->is64())
|
||||
Result = *reinterpret_cast<const uint64_t *>(IntPtr);
|
||||
else
|
||||
Result = *reinterpret_cast<const uint32_t *>(IntPtr);
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
bool ExportDirectoryEntryRef::
|
||||
operator==(const ExportDirectoryEntryRef &Other) const {
|
||||
return ExportTable == Other.ExportTable && Index == Other.Index;
|
||||
|
Reference in New Issue
Block a user