diff options
author | Peter Collingbourne <pcc@google.com> | 2017-05-24 16:25:09 -0700 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2017-05-25 00:14:08 +0000 |
commit | fbfd41af5fc63e0baa8f2ffbf87ded6d74f98233 (patch) | |
tree | e0446c1b639cde10f764be874bcfbe4e3d8d5630 /src/client | |
parent | Wrap config.h include in HAVE_CONFIG_H. (diff) | |
download | breakpad-fbfd41af5fc63e0baa8f2ffbf87ded6d74f98233.tar.xz |
Simplify ELF parser code.
The layout of Elf32_Nhdr and Elf64_Nhdr is the same, so remove
templating and code that extracts the elfclass from the ELF file.
Testing: "make check" and breakpad_unittests when patched into
chromium.
Bug: chromium:716484
Change-Id: I41442cfff48afc6ae1a5b604d22b67550a910376
Reviewed-on: https://chromium-review.googlesource.com/514450
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/linux/minidump_writer/linux_dumper.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc index 3b8c80ab..8de32d44 100644 --- a/src/client/linux/minidump_writer/linux_dumper.cc +++ b/src/client/linux/minidump_writer/linux_dumper.cc @@ -352,17 +352,16 @@ bool ElfFileSoNameFromMappedFile( const void* segment_start; size_t segment_size; - int elf_class; - if (!FindElfSection(elf_base, ".dynamic", SHT_DYNAMIC, - &segment_start, &segment_size, &elf_class)) { + if (!FindElfSection(elf_base, ".dynamic", SHT_DYNAMIC, &segment_start, + &segment_size)) { // No dynamic section return false; } const void* dynstr_start; size_t dynstr_size; - if (!FindElfSection(elf_base, ".dynstr", SHT_STRTAB, - &dynstr_start, &dynstr_size, &elf_class)) { + if (!FindElfSection(elf_base, ".dynstr", SHT_STRTAB, &dynstr_start, + &dynstr_size)) { // No dynstr section return false; } |