From: Kevin O'Connor Date: Fri, 22 Jun 2012 00:54:53 +0000 (-0400) Subject: Minor - ensure build can handle some gcc/linker section declarations. X-Git-Tag: rel-1.7.1~23 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=90ebed4d33ea5465f41e5ca25b8873083d32de3d;p=seabios.git Minor - ensure build can handle some gcc/linker section declarations. Make sure the build is not confused with some linker output common when using -flto. Signed-off-by: Kevin O'Connor --- diff --git a/tools/layoutrom.py b/tools/layoutrom.py index 7a7d08c..816ff9b 100755 --- a/tools/layoutrom.py +++ b/tools/layoutrom.py @@ -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)