Fix bug causing layoutrom.py to break if no rodata sections.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 19 Aug 2009 02:26:02 +0000 (22:26 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 19 Aug 2009 02:26:02 +0000 (22:26 -0400)
Handle case where there are no rodata sections.

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,))