Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1152)

Unified Diff: courgette/disassembler_elf_32.cc

Issue 664803002: Fix courgette ELF x86 dissembler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: rogue extra line Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | courgette/disassembler_elf_32_x86.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_elf_32.cc
diff --git a/courgette/disassembler_elf_32.cc b/courgette/disassembler_elf_32.cc
index ff2b9e03b611cc42717aa96a2e7525023696a242..d313ca08ce8c2f84caf2198d1e2fa1e46ab87b58 100644
--- a/courgette/disassembler_elf_32.cc
+++ b/courgette/disassembler_elf_32.cc
@@ -262,6 +262,9 @@ CheckBool DisassemblerElf32::ParseFile(AssemblyProgram* program) {
const Elf32_Shdr *section_header = SectionHeader(section_id);
+ if (section_header->sh_type == SHT_NOBITS)
dgarrett 2014/10/20 18:15:44 This seems like the right thing to do... I'm surpr
Will Harris 2014/10/20 19:01:44 NOBITS are in almost every ELF file as the .bss is
+ continue;
+
if (!ParseSimpleRegion(file_offset,
section_header->sh_offset,
program))
@@ -282,8 +285,6 @@ CheckBool DisassemblerElf32::ParseFile(AssemblyProgram* program) {
return false;
file_offset = section_header->sh_offset + section_header->sh_size;
break;
- case SHT_NOBITS:
- // Fall through
case SHT_INIT_ARRAY:
// Fall through
case SHT_FINI_ARRAY:
« no previous file with comments | « no previous file | courgette/disassembler_elf_32_x86.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698