binman: Drop .note section from ELF
authorSimon Glass <sjg@chromium.org>
Sat, 24 Aug 2019 13:22:45 +0000 (07:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 15 Oct 2019 14:40:02 +0000 (08:40 -0600)
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
tools/binman/elf_test.py

index af40024ceabac4a39c63acff76e5b13bd8faf370..c7ef74ce7dfb40b6b489f5046a243d2e76b24384 100644 (file)
@@ -221,6 +221,9 @@ SECTIONS
     .empty : {
         *(.empty)
     } :empty
+    /DISCARD/ : {
+        *(.note.gnu.property)
+    }
     .note : {
         *(.comment)
     } :note
index 416e43baf0e33620b3f3d8eef3fc70e79468db1d..cc6e9c5128738cd5d9bd72570a5dad681e9b8b98 100644 (file)
@@ -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.