Modify tools/layoutrom.py to use classes instead of tuples.
[seabios.git] / tools / checkrom.py
index 039010d21a3264967cf1f087922d66863b0a79f9..42cf2df67f025eb08d4bce5a462e175ad85bff20 100755 (executable)
@@ -14,10 +14,7 @@ def main():
 
     # Read in symbols
     objinfofile = open(objinfo, 'rb')
-    symbols = layoutrom.parseObjDump(objinfofile)[1]
-    syms = {}
-    for name, (addr, section) in symbols.items():
-        syms[name] = addr
+    symbols = layoutrom.parseObjDump(objinfofile, 'in')[1]
 
     # Read in raw file
     f = open(rawfile, 'rb')
@@ -29,8 +26,8 @@ def main():
         finalsize = 128*1024
 
     # Sanity checks
-    start = syms['code32flat_start']
-    end = syms['code32flat_end']
+    start = symbols['code32flat_start'].offset
+    end = symbols['code32flat_end'].offset
     expend = layoutrom.BUILD_BIOS_ADDR + layoutrom.BUILD_BIOS_SIZE
     if end != expend:
         print "Error!  Code does not end at 0x%x (got 0x%x)" % (