From patchwork Tue Feb 4 01:58:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 316415 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF4702C0082 for ; Tue, 4 Feb 2014 12:59:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F6DA4B7A5; Tue, 4 Feb 2014 02:59:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sFfh+3kSvNTh; Tue, 4 Feb 2014 02:59:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 973164B794; Tue, 4 Feb 2014 02:58:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF6484B794 for ; Tue, 4 Feb 2014 02:58:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3VsKJsuWJ5A1 for ; Tue, 4 Feb 2014 02:58:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 9E6744B791 for ; Tue, 4 Feb 2014 02:58:38 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s141wY2m022718; Tue, 4 Feb 2014 10:58:34 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id s141wXM13921; Tue, 4 Feb 2014 10:58:33 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi17) id s141wX6J028005; Tue, 4 Feb 2014 10:58:33 +0900 Received: from poodle by lomi17.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s141wXt0027959; Tue, 4 Feb 2014 10:58:33 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 569F12740043; Tue, 4 Feb 2014 10:58:33 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 4 Feb 2014 10:58:31 +0900 Message-Id: <1391479111-31498-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 Cc: Scott Wood Subject: [U-Boot] [PATCH] relocate-rela: replace a magic number with sizeof(Elf64_Rela) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Masahiro Yamada Cc: Scott Wood Cc: David Feng Acked-by: Scott Wood --- tools/relocate-rela.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c index 93b4c39..670b9fd 100644 --- a/tools/relocate-rela.c +++ b/tools/relocate-rela.c @@ -120,7 +120,7 @@ int main(int argc, char **argv) } if (rela_start > rela_end || rela_start < text_base || - (rela_end - rela_start) % 24) { + (rela_end - rela_start) % sizeof(Elf64_Rela)) { fprintf(stderr, "%s: bad rela bounds\n", argv[0]); return 3; }