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 <kevin@koconnor.net>
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 @@
          */
         /DISCARD/ : {
                 *(.text*) *(.data*) *(.bss*) *(.rodata*)
-                *(COMMON) *(.discard*) *(.eh_frame)
+                *(COMMON) *(.discard*) *(.eh_frame) *(.note*)
                 }
 }
 """
@@ -556,7 +556,13 @@
             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)