Message ID | 20180717192552.198496-2-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 46d61a2f2aeefcd622c9678716429e68a3a98811 |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41VVdh2Rv4z9s0w for <incoming@patchwork.ozlabs.org>; Wed, 18 Jul 2018 05:26:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 09190C21E7D; Tue, 17 Jul 2018 19:26:42 +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 604B1C21EA1; Tue, 17 Jul 2018 19:26:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 804BEC21DF8; Tue, 17 Jul 2018 19:26:07 +0000 (UTC) Received: from mail-io0-f201.google.com (mail-io0-f201.google.com [209.85.223.201]) by lists.denx.de (Postfix) with ESMTPS id 655F1C21E2B for <u-boot@lists.denx.de>; Tue, 17 Jul 2018 19:26:01 +0000 (UTC) Received: by mail-io0-f201.google.com with SMTP id w23-v6so1583935iob.18 for <u-boot@lists.denx.de>; Tue, 17 Jul 2018 12:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id :references:subject:from:to:cc; bh=f/GDjYXcUH0kcVOB43pE20Q5+2G76yftYVoh33bJWGU=; b=FWv0o+oR90YkooC0mMPMdlC6XsslVa2/jNSub3u9zCOhbX49Llx590J5TX3A8LJJMx 9ETF73jfvZvC2BGpv7ZjXgL62kd7T8+SWz2lQhSjSUO1IWV1Xa+8EmKXBW18gpKyuUFm boQHsSInxalAIf+t+00G9gmSBLaKjofYlmOZ3ymhAFt711ffU7EITxQZAKwEpYKIwLC4 rGU41rpmJH4PksbvafdafN5wSXZIG6E04cD4i2DDYWWluwGmlWQ3BSaGIJtVnbIKfQQ8 DNqEW+Xy/VpA3uvIOGeXjJOt6CHi3pVW2M+yVEk0B5JNq0qQorf/UPtUhnTH/wMzUkvT NbWg== X-Gm-Message-State: AOUpUlEJB7GMTxuY7+jGjsboE32eytCqyS6cLHptOkOHUkq/texEwN59 HNJPqgGmtehAlMYnJbA/aGwOiTk= X-Google-Smtp-Source: AAOMgpcloESRNXYOywgGN0FDj6WHmgJC8HEN0TTqg3/8ikreOlGQOC1HxaLhyP5oEfQj6NhzvanGNp8= MIME-Version: 1.0 X-Received: by 2002:a24:b045:: with SMTP id b5-v6mr1319006itj.35.1531855560039; Tue, 17 Jul 2018 12:26:00 -0700 (PDT) Date: Tue, 17 Jul 2018 13:25:24 -0600 In-Reply-To: <20180717192552.198496-1-sjg@chromium.org> Message-Id: <20180717192552.198496-2-sjg@chromium.org> References: <20180717192552.198496-1-sjg@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com> Subject: [U-Boot] [PATCH 01/29] binman: Don't depend on dict order in ELF testOutsideFile() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
binman: Expand feature set and documentation
|
expand
|
diff --git a/tools/binman/elf.py b/tools/binman/elf.py index 0ae3b611ba..8c23040d8c 100644 --- a/tools/binman/elf.py +++ b/tools/binman/elf.py @@ -57,7 +57,9 @@ def GetSymbols(fname, patterns): name = parts[2] syms[name] = Symbol(section, int(value, 16), int(size,16), flags[1] == 'w') - return syms + + # Sort dict by address + return OrderedDict(sorted(syms.iteritems(), key=lambda x: x[1].address)) def GetSymbolAddress(fname, sym_name): """Get a value of a symbol from an ELF file
At present this test assumes that the symbols are returned in address order. However, objdump can list symbols in any order and dictionaries do not guarantee any particular order when iterating through item. Update elf.GetSymbols() to return an OrderedDict, sorted by address, to avoid any problems. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/binman/elf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)