From 6147bda06140f2a9771045a6d2538654da728465 Mon Sep 17 00:00:00 2001 From: Jason W Kim Date: Thu, 16 Dec 2010 00:15:10 +0000 Subject: Fix elf-dump --dump-section-data for .bss section git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121927 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Scripts/elf-dump | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/Scripts/elf-dump b/test/Scripts/elf-dump index 784533c57b..2d470c8c8f 100755 --- a/test/Scripts/elf-dump +++ b/test/Scripts/elf-dump @@ -97,8 +97,11 @@ class Section: print " ])" elif dumpdata: f.seek(self.sh_offset) - data = f.read(self.sh_size) - print " ('_section_data', '%s')" % common_dump.dataToHex(data) + if self.sh_type != 8: # != SHT_NOBITS + data = f.read(self.sh_size) + print " ('_section_data', '%s')" % common_dump.dataToHex(data) + else: + print " ('_section_data', '')" print " )," def dumpSymtab(f, section, strtab): -- cgit v1.2.3