Fix handling of TLS export names in readrpl.

They have the high bit set for some odd reason...!
This commit is contained in:
James Benton 2016-08-16 11:38:37 +01:00
parent 782e02a39c
commit 23987e8bc3

View File

@ -552,8 +552,10 @@ formatRplExports(fmt::MemoryWriter &out, Section &section)
out.write(" count = {}\n", exports->count); out.write(" count = {}\n", exports->count);
for (auto i = 0u; i < exports->count; ++i) { for (auto i = 0u; i < exports->count; ++i) {
// TLS exports have the high bit set in name for some unknown reason...
auto name = strTab + (exports->exports[i].name & 0x7FFFFFFF);
auto value = exports->exports[i].value; auto value = exports->exports[i].value;
auto name = strTab + exports->exports[i].name;
out.write(" 0x{:08X} {}\n", static_cast<uint32_t>(value), name); out.write(" 0x{:08X} {}\n", static_cast<uint32_t>(value), name);
} }
} }