XFAIL vg_leak the new test as the rest.
[oota-llvm.git] / test / Scripts / elf-dump
index 31bcae764046042b627d05ba8a2de5592a96c932..76cdbf91c73fb67ee7932ab3780334d5727d44a5 100755 (executable)
@@ -6,8 +6,6 @@ import StringIO
 
 import common_dump
 
-FormatOutput=hex
-
 class Reader:
     def __init__(self, path):
         if path == "-":
@@ -99,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):
@@ -120,8 +121,8 @@ def dumpSymtab(f, section, strtab):
         print "     ('st_other', %s)" % common_dump.HexDump(f.read8())
         print "     ('st_shndx', %s)" % common_dump.HexDump(f.read16())
         if f.is64Bit:
-            print "     ('st_value', %s)" % common_dump.HexDump(f.read64())
-            print "     ('st_size', %s)" % common_dump.HexDump(f.read64())
+            print "     ('st_value', %s)" % common_dump.HexDump(f.read64(), 64)
+            print "     ('st_size', %s)" % common_dump.HexDump(f.read64(), 64)
         print "    ),"
 
 def dumpRel(f, section, dumprela = False):