Message ID | 20210328224530.618042-1-raj.khem@gmail.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3172898jai; Sun, 28 Mar 2021 15:45:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmygWjW3IFTjP8HNClbRocx1s6Goo1jere4RFYffczy1oU6pnDSNtdv5+AUwHUHiJCRqdf X-Received: by 2002:a92:b00d:: with SMTP id x13mr18581112ilh.128.1616971559033; Sun, 28 Mar 2021 15:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616971559; cv=none; d=google.com; s=arc-20160816; b=MHffyTw85VJwOGoaqaGbx8RCuuDsqYQquOIO54g8OdQKBsyMpi0w+tyhkA2eG9j+mg Xlh3KCS2B2UJm28s7lF/QeBF1ONibEumM0HOc8rrgPxuoNSCCuJYkXPllJ5La572PzN3 l3svataseCf1RG4jqcHsgo8KptgAVYw7ZqJlpe/FxINY5qq1sUx5qP59MxZhrhNOM6+s vqC2xXKUygot72BO6Rwbbuzi8QD/TE5LDNdwn3TbbTz2NK9EY8ao+tdnl1Tytr6jyWGv vN8c5sTqLjvEsIB/7XuS1YL9jWYyxfG7zc9NJzVANal/YoAWCz2LrarTzRhstbhTOvz6 +/tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=jC2L72TTCLCGHDXBYmZ8VzrVLp0RXBz03oQtCSYYuV4=; b=cIyFovd7DOfKjTHfY9VZ6Acz/wgq5j2SCxTrgtx2j5bcilKIO8sMZ9/hbCcWMhhaGh Sh5s9kxtvMFELf4WfEhoSAxeTDjVYmis1GkFl7BPsuk7i8qK1bbmRo+3eZm9ZXslmvxB R4R7ebezhtHQTOB/+B+Xvq8+XkDTTxU5tvBsNzgvrrsaYOtGT309UouQfNKOa0KdPLup KKwOwugT+m4hCxLE+nxPpsXbIQac4MxPe6wHBfcvMcZWh1LGhjWJGzLNY6eE3xOJ3wec 8R9Y8dEkKoyEw0TMEKP8n5LgjCcfCQqotw9aoe1FSWpzfJg06w/M0IGhpoIwUenxFpbH Y7Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=sBOmzMSF; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: <grub-devel-bounces+patch=linaro.org@gnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r19si11333629ilj.18.2021.03.28.15.45.58 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Mar 2021 15:45:59 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=sBOmzMSF; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1]:41152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <grub-devel-bounces+patch=linaro.org@gnu.org>) id 1lQeAQ-0000NN-Er for patch@linaro.org; Sun, 28 Mar 2021 18:45:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <raj.khem@gmail.com>) id 1lQeA8-0000M9-VQ for grub-devel@gnu.org; Sun, 28 Mar 2021 18:45:42 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:44718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <raj.khem@gmail.com>) id 1lQeA5-0000DO-J6 for grub-devel@gnu.org; Sun, 28 Mar 2021 18:45:40 -0400 Received: by mail-pl1-x629.google.com with SMTP id d8so3499372plh.11 for <grub-devel@gnu.org>; Sun, 28 Mar 2021 15:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dmSX2JL4o2uDne+MKfOh9s62JOXhVquGiCb3gpxIPOI=; b=sBOmzMSFKymS4eATPQna9kxKgpEBUVjXRe0WZieGFNcjYno0gduDSdSFPRPPknfk8x BtKUR9gtTkC7O5ObsHuhImLzLXh1wURSguMPUrpXG9beSIt3SwKffGkzI0QekItdSxZz YgR+Th6o80NQqR5H+Xcp5IpHP1b7R8uE1moqsPq/f3ZzpOOX0rlXQX2vMUn2O84D3yce CMopWHi0RyHBJUctJRNhvHeTCJsmVUjvPL9pBc8l3vW4NXOk8/tMbr9Rgc9dFhF+eV7z rQmkQAgpFHyDGbxxwKlpUhpqF6znkomxCXSq11nGuqy5dA6DaCFr3Ap4/9nYQodXbWZH JVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dmSX2JL4o2uDne+MKfOh9s62JOXhVquGiCb3gpxIPOI=; b=skG2BxATT7AZDizDF2mvHvEGatj1R66CLKTfXSwhX37NXYYiOheXDgtLQMyunonitP oLZGI0+8Y9ismaVgjOH1JdLuSPJkfBDjtYzkakAb27w5O40nTDDTpYnKfCmQ9+7BweP/ 2Pf+K1il66DXWwb5SWdZaVSRI9ckHiqmc4DRBPfFk2PcwYrDYtFF8/G5l2q2c7lmSUQD x1KFlZQBxhRyyLRffAF/afsvmSyXhwEIeom49340zm53IJC09d0Ja3W//fftbEslgsk5 0R4xsL/IJAfpaJCy9zGHaG6VsPF9aMWAoTZ04Ud9GbRq8HouQvSGaAqDM4qy9SbWEVb9 uK5g== X-Gm-Message-State: AOAM5303GAzfzZeGbPeovXD5IqrWgXaJGp0WCDz93O6EYpw23QvY/+ih 8kCtnDqGdkfbqOeMD5Hy2FAKnc31P7JYgA== X-Received: by 2002:a17:90b:410d:: with SMTP id io13mr22328144pjb.112.1616971533712; Sun, 28 Mar 2021 15:45:33 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::ae20]) by smtp.gmail.com with ESMTPSA id 132sm15546355pfu.158.2021.03.28.15.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 15:45:33 -0700 (PDT) From: Khem Raj <raj.khem@gmail.com> To: grub-devel@gnu.org Cc: Khem Raj <raj.khem@gmail.com>, Andreas Schwab <schwab@suse.de>, Daniel Kiper <daniel.kiper@oracle.com>, Chester Lin <clin@suse.com>, Alistair Francis <alistair.francis@wdc.com> Subject: [PATCH] RISC-V: Restore the typcast to 64bit type Date: Sun, 28 Mar 2021 15:45:30 -0700 Message-Id: <20210328224530.618042-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=raj.khem@gmail.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB <grub-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/grub-devel>, <mailto:grub-devel-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/grub-devel> List-Post: <mailto:grub-devel@gnu.org> List-Help: <mailto:grub-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grub-devel>, <mailto:grub-devel-request@gnu.org?subject=subscribe> Reply-To: The development of GNU GRUB <grub-devel@gnu.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" <grub-devel-bounces+patch=linaro.org@gnu.org> |
Series |
RISC-V: Restore the typcast to 64bit type
|
expand
|
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index 00f49ccaa..ac677d03d 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -1242,7 +1242,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd, */ sym_addr += addend; - off = sym_addr - target_section_addr - offset - image_target->vaddr_offset; + off = (grub_int64_t)sym_addr - target_section_addr - offset - image_target->vaddr_offset; switch (ELF_R_TYPE (info)) {
this makes the type promotions clear and explicit It was already typecasted to long but was accidentally dropped in [1] which stated to cause failures on riscv32 as reported in [2] [1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2bf40e9e5be9808b17852e688eead87acff14420 [2] https://savannah.gnu.org/bugs/index.php?60283 Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andreas Schwab <schwab@suse.de> Cc: Daniel Kiper <daniel.kiper@oracle.com> Cc: Chester Lin <clin@suse.com> Cc: Alistair Francis <alistair.francis@wdc.com> --- util/grub-mkimagexx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)