Fix bug causing layoutrom.py to break if no rodata sections.
[seabios.git] / tools / layoutrom.py
index 7b2841f6688da749d6064272d0cb56977635edf8..8d557bc1c74e9420adc6aa07dd5a003561122c72 100755 (executable)
@@ -134,7 +134,7 @@ def doLayout16(sections, outname):
     # Write regular sections
     for section in restsections:
         name = section[2]
-        if name == rodatasections[0][2]:
+        if rodatasections and name == rodatasections[0][2]:
             output.write("code16_rodata = . ;\n")
         output.write("*(%s)\n" % (name,))