]> xenbits.xensource.com Git - seabios.git/commitdiff
Minor - ensure build can handle some gcc/linker section declarations.
authorKevin O'Connor <kevin@koconnor.net>
Fri, 22 Jun 2012 00:54:53 +0000 (20:54 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 22 Jun 2012 01:00:22 +0000 (21:00 -0400)
Make sure the build is not confused with some linker output common
when using -flto.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
tools/layoutrom.py

index 7a7d08c20a2087a47c2b62e61b9f48e9572b9351..816ff9b0c6343bffe131f3753d25237b75dcd48f 100755 (executable)
@@ -23,7 +23,7 @@ COMMONTRAILER = """
          */
         /DISCARD/ : {
                 *(.text*) *(.data*) *(.bss*) *(.rodata*)
-                *(COMMON) *(.discard*) *(.eh_frame)
+                *(COMMON) *(.discard*) *(.eh_frame) *(.note*)
                 }
 }
 """
@@ -556,7 +556,13 @@ def parseObjDump(file, fileid):
             continue
         if state == 'symbol':
             try:
-                sectionname, size, name = line[17:].split()
+                parts = line[17:].split()
+                if len(parts) == 3:
+                    sectionname, size, name = parts
+                elif len(parts) == 4 and parts[2] == '.hidden':
+                    sectionname, size, hidden, name = parts
+                else:
+                    continue
                 symbol = Symbol()
                 symbol.size = int(size, 16)
                 symbol.offset = int(line[:8], 16)