From patchwork Tue Nov 5 16:21:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 1189778 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wwwdotorg.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 476vzz5z0Kz9s4Y for ; Wed, 6 Nov 2019 03:21:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6D29CC21E47; Tue, 5 Nov 2019 16:21:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0578FC21DA2; Tue, 5 Nov 2019 16:21:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 55445C21DA2; Tue, 5 Nov 2019 16:21:08 +0000 (UTC) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [104.237.132.123]) by lists.denx.de (Postfix) with ESMTPS id 042D2C21D8A for ; Tue, 5 Nov 2019 16:21:07 +0000 (UTC) Received: from swarren-lx1.nvidia.com (unknown [216.228.112.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPSA id 335F31C0111; Tue, 5 Nov 2019 09:21:05 -0700 (MST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.3 at avon.wwwdotorg.org From: Stephen Warren To: Tom Rini Date: Tue, 5 Nov 2019 09:21:02 -0700 Message-Id: <20191105162102.22910-1-swarren@wwwdotorg.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-NVConfidentiality: public Cc: u-boot@lists.denx.de, Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH] Revert "binman: Correct symbol calculation with non-zero image base" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Stephen Warren 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 Reviewed-by: Simon Glass --- tools/binman/elf.py | 4 +++- tools/binman/test/u_boot_binman_syms.lds | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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);