diff mbox series

[U-Boot,06/34] binman: Handle hidden symbols in ELF files

Message ID 20190824132315.53130-7-sjg@chromium.org
State Accepted
Commit 39c8e47d2ee38975b9377ee0049d2f88efc3edba
Delegated to: Simon Glass
Headers show
Series binman: Various improvements and tidy-ups | expand

Commit Message

Simon Glass Aug. 24, 2019, 1:22 p.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Sept. 27, 2019, 12:39 a.m. UTC | #1
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index c7ef74ce7d..66cfe796a2 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -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')