[RemoteMirrors] Fix losing the remote address on StaticMirror

The Offset field of a DynamicRelocation is either an offset or a remote
address, but was being treated only as a remote address on
getDynamicSymbol.
This commit is contained in:
Augusto Noronha
2025-07-11 16:33:19 -07:00
parent bfb026cb9e
commit 9e85b88d9d
2 changed files with 12 additions and 4 deletions

View File

@@ -39,8 +39,12 @@ private:
uint64_t HeaderAddress;
std::vector<Segment> Segments;
struct DynamicRelocation {
/// The symbol name that the pointer refers to. Empty if only an absolute
/// address is available.
StringRef Symbol;
uint64_t Offset;
// The offset (if the symbol is available), or the resolved remote address
// if the symbol is empty.
uint64_t OffsetOrAddress;
};
llvm::DenseMap<uint64_t, DynamicRelocation> DynamicRelocations;