diff --git a/src/elfcore.cc b/src/elfcore.cc index c6a436d..2a7138e 100644 --- a/src/elfcore.cc +++ b/src/elfcore.cc @@ -906,7 +906,7 @@ static int CreateElfCore(void *handle, ssize_t (*writer)(void *, const void *, s mappings[i].flags = (mappings[i].flags >> 1) & PF_MASK; /* Skip leading zeroed pages (as found in the stack segment) */ - if ((mappings[i].flags & PF_R) && !is_device) { + if ((mappings[i].flags & PF_R) && !is_device && !dontdump) { zeros = LeadingZeros(loopback, (void *)mappings[i].start_address, mappings[i].end_address - mappings[i].start_address, pagesize); mappings[i].start_address += zeros;