]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Handle hidden symbols in ELF files
authorSimon Glass <sjg@chromium.org>
Sat, 24 Aug 2019 13:22:46 +0000 (07:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 15 Oct 2019 14:40:02 +0000 (08:40 -0600)
Some versions of binutils generate hidden symbols which are currently not
parsed by binman. Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/elf.py

index c7ef74ce7dfb40b6b489f5046a243d2e76b24384..66cfe796a22ac391b28f67bbb36860028eadd89b 100644 (file)
@@ -72,7 +72,7 @@ def GetSymbols(fname, patterns):
         parts = rest[7:].split()
         section, size =  parts[:2]
         if len(parts) > 2:
-            name = parts[2]
+            name = parts[2] if parts[2] != '.hidden' else parts[3]
             syms[name] = Symbol(section, int(value, 16), int(size,16),
                                 flags[1] == 'w')