aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/minidump_writer/linux_dumper.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc
index 00d18189..43b74ad9 100644
--- a/src/client/linux/minidump_writer/linux_dumper.cc
+++ b/src/client/linux/minidump_writer/linux_dumper.cc
@@ -510,10 +510,15 @@ void LinuxDumper::LatePostprocessMappings() {
}
if (ehdr.e_type == ET_DYN) {
// Compute the effective load bias for this mapped library, and update
- // the mapping to hold that rather than |start_addr|. Where the library
- // does not contain Android packed relocations, GetEffectiveLoadBias()
- // returns |start_addr| and the mapping entry is not changed.
- mapping->start_addr = GetEffectiveLoadBias(&ehdr, mapping->start_addr);
+ // the mapping to hold that rather than |start_addr|, at the same time
+ // adjusting |size| to account for the change in |start_addr|. Where
+ // the library does not contain Android packed relocations,
+ // GetEffectiveLoadBias() returns |start_addr| and the mapping entry
+ // is not changed.
+ const uintptr_t load_bias = GetEffectiveLoadBias(&ehdr,
+ mapping->start_addr);
+ mapping->size += mapping->start_addr - load_bias;
+ mapping->start_addr = load_bias;
}
}
}