upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/pe_loader.cpp')
-rw-r--r--runtime/src/pe_loader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp
index a59f9d0b1..2400536d0 100644
--- a/runtime/src/pe_loader.cpp
+++ b/runtime/src/pe_loader.cpp
@@ -929,6 +929,7 @@ void Loader::parse_exports(Module& m) {
929 // into the string, so forwarders are kept apart and followed when an import asks for one. 929 // into the string, so forwarders are kept apart and followed when an import asks for one.
930 const uint64_t dir_begin = dir.VirtualAddress, dir_end = dir_begin + dir.Size; 930 const uint64_t dir_begin = dir.VirtualAddress, dir_end = dir_begin + dir.Size;
931 auto add_export = [&](const std::string& key, uint32_t rva) { 931 auto add_export = [&](const std::string& key, uint32_t rva) {
932 if (!rva) return; // An unused address-table slot is absent even when a name refers to it.
932 if (rva >= dir_begin && rva < dir_end) 933 if (rva >= dir_begin && rva < dir_end)
933 m.forwarders[key] = read_string(m.name, m.base, m.size, rva, "a forwarded export"); 934 m.forwarders[key] = read_string(m.name, m.base, m.size, rva, "a forwarded export");
934 else if (rva >= m.size) // base + rva would point past the mapping, and a caller would jump there 935 else if (rva >= m.size) // base + rva would point past the mapping, and a caller would jump there