Message ID | 20191105162102.22910-1-swarren@wwwdotorg.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Series | [U-Boot] Revert "binman: Correct symbol calculation with non-zero image base" | expand |
On Tue, 5 Nov 2019 at 09:21, Stephen Warren <swarren@wwwdotorg.org> wrote: > > From: Stephen Warren <swarren@nvidia.com> > > This reverts commit 15c981cc8adc26501e3a19ca7fb35705870ef597. > "binman: Correct symbol calculation with non-zero image base". This > was previously reported to break initial boot on Jetson TK1, and Simon > dropped the patch from his branch. However, it seems to have shown up > again in a pull request somehow. Revert it until the problem is fixed. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > tools/binman/elf.py | 4 +++- > tools/binman/test/u_boot_binman_syms.lds | 2 +- > 2 files changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
On 11/5/19 9:21 AM, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > This reverts commit 15c981cc8adc26501e3a19ca7fb35705870ef597. > "binman: Correct symbol calculation with non-zero image base". This > was previously reported to break initial boot on Jetson TK1, and Simon > dropped the patch from his branch. However, it seems to have shown up > again in a pull request somehow. Revert it until the problem is fixed. We can drop this and replace it with Simon's "[PATCH] binman: tegra: Adjust symbol calculation depending on end-at-4gb". That patch fixes the same bug, but without reverting the change.
diff --git a/tools/binman/elf.py b/tools/binman/elf.py index 0c1a5b44b669..7bc7cf61b5d8 100644 --- a/tools/binman/elf.py +++ b/tools/binman/elf.py @@ -135,7 +135,9 @@ def LookupAndWriteSymbols(elf_fname, entry, section): # Look up the symbol in our entry tables. value = section.LookupSymbol(name, sym.weak, msg) - if value is None: + if value is not None: + value += base.address + else: value = -1 pack_string = pack_string.lower() value_bytes = struct.pack(pack_string, value) diff --git a/tools/binman/test/u_boot_binman_syms.lds b/tools/binman/test/u_boot_binman_syms.lds index 825fc3f649f7..926df873cb70 100644 --- a/tools/binman/test/u_boot_binman_syms.lds +++ b/tools/binman/test/u_boot_binman_syms.lds @@ -9,7 +9,7 @@ ENTRY(_start) SECTIONS { - . = 0x00000010; + . = 0x00000000; _start = .; . = ALIGN(4);