[U-Boot,05/34] binman: Drop .note section from ELF
diff mbox series

Message ID 20190824132315.53130-6-sjg@chromium.org
State New
Delegated to: Simon Glass
Headers show
Series
  • binman: Various improvements and tidy-ups
Related show

Commit Message

Simon Glass Aug. 24, 2019, 1:22 p.m. UTC
Recent versions of binutils add a '.note.gnu.property' into the ELF file.
This is not required and interferes with the expected output. Drop it.

Also fix testMakeElf() to use a different file for input and output.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/elf.py      | 3 +++
 tools/binman/elf_test.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index af40024cea..c7ef74ce7d 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -221,6 +221,9 @@  SECTIONS
     .empty : {
         *(.empty)
     } :empty
+    /DISCARD/ : {
+        *(.note.gnu.property)
+    }
     .note : {
         *(.comment)
     } :note
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py
index 416e43baf0..cc6e9c5128 100644
--- a/tools/binman/elf_test.py
+++ b/tools/binman/elf_test.py
@@ -148,7 +148,7 @@  class TestElf(unittest.TestCase):
         expected_text = b'1234'
         expected_data = b'wxyz'
         elf_fname = os.path.join(outdir, 'elf')
-        bin_fname = os.path.join(outdir, 'elf')
+        bin_fname = os.path.join(outdir, 'bin')
 
         # Make an Elf file and then convert it to a fkat binary file. This
         # should produce the original data.