From fbfd41af5fc63e0baa8f2ffbf87ded6d74f98233 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 24 May 2017 16:25:09 -0700 Subject: 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 --- src/client/linux/minidump_writer/linux_dumper.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/client') 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; } -- cgit v1.2.1