diff options
author | Pavel Labath <labath@google.com> | 2015-09-30 08:20:42 -0400 |
---|---|---|
committer | Mark Mentovai <mark@chromium.org> | 2015-09-30 08:20:42 -0400 |
commit | 01c8f7cf46f186cb89f1fded8b642a8ec6c532de (patch) | |
tree | cedbb274cc7b91d0e7a4f4f66d49bc2de69c9bd6 | |
parent | Fix automake files after README.md -> README rename (diff) | |
download | breakpad-01c8f7cf46f186cb89f1fded8b642a8ec6c532de.tar.xz |
[mac] Teach dump_syms to handle additional zerofill sections
This patch allows dump_syms to handle S_THREAD_LOCAL_ZEROFILL
and S_GB_ZEROFILL section in the same way as the more common
S_ZEROFILL section. Previously, dump_syms would fail to dump
a binary containing a __DATA,__thread_bss section, because it
tried to look up its data (and failed).
R=mark@chromium.org
Review URL: https://codereview.chromium.org/1369233003 .
Patch from Pavel Labath <labath@google.com>.
-rw-r--r-- | src/common/mac/macho_reader.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/mac/macho_reader.cc b/src/common/mac/macho_reader.cc index 9fcb58e3..6d7207ce 100644 --- a/src/common/mac/macho_reader.cc +++ b/src/common/mac/macho_reader.cc @@ -481,7 +481,9 @@ bool Reader::WalkSegmentSections(const Segment &segment, reporter_->SectionsMissing(segment.name); return false; } - if ((section.flags & SECTION_TYPE) == S_ZEROFILL) { + const uint32_t section_type = section.flags & SECTION_TYPE; + if (section_type == S_ZEROFILL || section_type == S_THREAD_LOCAL_ZEROFILL || + section_type == S_GB_ZEROFILL) { // Zero-fill sections have a size, but no contents. section.contents.start = section.contents.end = NULL; } else if (segment.contents.start == NULL && |