mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Right now all of the relocations are 32-bit dwarf, and the relocation
information doesn't return an addend for Rel relocations. Go ahead and use this information to fix relocation handling inside dwarfdump for 32-bit ELF REL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171126 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -108,8 +108,8 @@ DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
|
||||
= cu->getContext().relocMap().find(*offset_ptr);
|
||||
if (AI != cu->getContext().relocMap().end()) {
|
||||
const std::pair<uint8_t, int64_t> &R = AI->second;
|
||||
Value.uval = R.second;
|
||||
*offset_ptr += R.first;
|
||||
Value.uval = data.getUnsigned(offset_ptr, cu->getAddressByteSize()) +
|
||||
R.second;
|
||||
} else
|
||||
Value.uval = data.getUnsigned(offset_ptr, cu->getAddressByteSize());
|
||||
break;
|
||||
@@ -156,8 +156,7 @@ DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
|
||||
= cu->getContext().relocMap().find(*offset_ptr);
|
||||
if (AI != cu->getContext().relocMap().end()) {
|
||||
const std::pair<uint8_t, int64_t> &R = AI->second;
|
||||
Value.uval = R.second;
|
||||
*offset_ptr += R.first;
|
||||
Value.uval = data.getU32(offset_ptr) + R.second;
|
||||
} else
|
||||
Value.uval = data.getU32(offset_ptr);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user