diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-24 07:22:56 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-10-15 08:40:02 -0600 |
commit | 1542c8b5fce0f81ace585ac87218bfd79eb077f3 (patch) | |
tree | d901b0c64e8792f0892575df5edb8a2e4889e669 /tools/binman/ftest.py | |
parent | bccd91da9bdac8bf947a299ab9a7b821d2702696 (diff) |
binman: Use the Makefile for u_boot_binman_syms
Remove this file from git and instead build it using the Makefile.
With this change a few things need to be adjusted:
1. The 'notes' section no-longer appears at the start of the ELF file
(before the code), so update testSymbols to adjust the offsets.
2. The dynamic linker is disabled to avoid errors like:
"Not enough room for program headers, try linking with -N"
3. The interpreter note is moved to the end of the image, so that the
binman symbols appear first.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 30a8b0b14c..507c481881 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -489,7 +489,8 @@ class TestFunctional(unittest.TestCase): Filename of ELF file to use as SPL """ # TODO(sjg@chromium.org): Drop this when all Elf files use ElfTestFile() - if src_fname in ['bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr']: + if src_fname in ['bss_data', 'u_boot_ucode_ptr', 'u_boot_no_ucode_ptr', + 'u_boot_binman_syms']: fname = cls.ElfTestFile(src_fname) else: fname = cls.TestFile(src_fname) @@ -1223,14 +1224,14 @@ class TestFunctional(unittest.TestCase): def testSymbols(self): """Test binman can assign symbols embedded in U-Boot""" - elf_fname = self.TestFile('u_boot_binman_syms') + elf_fname = self.ElfTestFile('u_boot_binman_syms') syms = elf.GetSymbols(elf_fname, ['binman', 'image']) addr = elf.GetSymbolAddress(elf_fname, '__image_copy_start') self.assertEqual(syms['_binman_u_boot_spl_prop_offset'].address, addr) self._SetupSplElf('u_boot_binman_syms') data = self._DoReadFile('053_symbols.dts') - sym_values = struct.pack('<LQL', 0x24 + 0, 0x24 + 24, 0x24 + 20) + sym_values = struct.pack('<LQL', 0, 24, 20) expected = (sym_values + U_BOOT_SPL_DATA[16:] + tools.GetBytes(0xff, 1) + U_BOOT_DATA + sym_values + U_BOOT_SPL_DATA[16:]) |