Created
November 17, 2011 19:43
-
-
Save ice799/1374231 to your computer and use it in GitHub Desktop.
Revisions
-
ice799 created this gist
Nov 17, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ diff --git a/src/elfcore.c b/src/elfcore.c index 4304770..598f5dc 100644 --- a/src/elfcore.c +++ b/src/elfcore.c @@ -856,13 +856,8 @@ static int CreateElfCore(void *handle, mappings[i].start_address += zeros; } - /* Do not write contents for memory segments that are read-only */ - if ((mappings[i].flags & (PF_ANONYMOUS|PF_W)) == 0) { - mappings[i].write_size = 0; - } else { - mappings[i].write_size = mappings[i].end_address - - mappings[i].start_address; - } + mappings[i].write_size = mappings[i].end_address + - mappings[i].start_address; /* Remove mapping, if it was not readable, or completely zero * anyway. The former is usually the case of stack guard pages, and