From patchwork Mon Jun 18 15:23:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 139019 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4091229lji; Mon, 18 Jun 2018 08:32:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLCVwLj/AdTXl0+pRFTe1M8WAsq97b9tb/5fA5MO9fvCcv/XvXUuyYGVFHDkfM07qfrTawE X-Received: by 2002:a50:d490:: with SMTP id s16-v6mr11915234edi.127.1529335978473; Mon, 18 Jun 2018 08:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529335978; cv=none; d=google.com; s=arc-20160816; b=zZHBP08S3LJTeV7cDPj+djnmvrDlgOWohvFv1wTk6SGlZwQJW4KRUd1Oo63/QXm+2Y mCuL7w4R77jZUR4wfORxqQPu4QYh/EIam2Cl59dCXsAZJCUXHLtZ3OyH/TGM1CR2LAF8 vb5FlvwbBMWUgVEfoXgY/amY0EG+PbrkVo537uUef10jF07qxXzWZya7SlwtmNOxq/7D SEnPu1Kja86W7cdL+dCpOkQrsjXqSu4vVobHfbeMqlSRDfJy0duOrKgQBM1E0yqLE9Gn 0w6h9kvzjE6Kzp42n+X0tYeBT02wwN6TsVVkOVfOTWGB+/CsnmR58SlLWC9+5Cv0QwmQ QyIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=L4b5VZnGoywya+omM7gAO3t+n6ryqfv0jNyZPE0qiTU=; b=GX6wbGi4FPhgjK+a2pYHTeMlkjONdioLDM8WvM+w3H7JfPBNqogSVsrcupkx/cCk+p h0ejEieH0r4gPZwMF3ZLcYBRG/l4miRn4F/p3S27bBaAWnSoRKJtxifXYed7PLDccfrI 3vQEi4KTEBfe2wcmfmhx6UR0OndFnrIMLcIa9IKnzpF9OoOCgj4n4VGyRwrpa3/Xy+tc GGXLTKJpievsiT7m3wsIih+dRDYjuPUGUgG1y0yp7yJkkOs0Xu+Rstd+8Xlc0ayqcxMS isCAbeqiZ6xhjzB2w2SU7/nzZkNktAjhSn/KpB2qV4Olbzhl3C8VdWQK2vQXGKCiFpyI 2Riw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id s11-v6si6411418edh.359.2018.06.18.08.32.58; Mon, 18 Jun 2018 08:32:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 0BDFDC21EF2; Mon, 18 Jun 2018 15:28:19 +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 9D65AC21F87; Mon, 18 Jun 2018 15:23:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3E083C21E1D; Mon, 18 Jun 2018 15:23:18 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id F14D7C21E9F for ; Mon, 18 Jun 2018 15:23:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 53680AF7E; Mon, 18 Jun 2018 15:23:17 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Mon, 18 Jun 2018 17:23:11 +0200 Message-Id: <20180618152315.34233-18-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180618152315.34233-1-agraf@suse.de> References: <20180618152315.34233-1-agraf@suse.de> Cc: Heinrich Schuchardt , Andy Shevchenko Subject: [U-Boot] [PATCH v4 17/21] efi_loader: Use common elf.h reloc defines 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that elf.h contains relocation defines for all architectures we care about, let's just include it unconditionally and refer to the defines. Signed-off-by: Alexander Graf --- lib/efi_loader/efi_runtime.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index bc44e43745..dd3ff8ad23 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -33,18 +34,16 @@ static efi_status_t __efi_runtime EFIAPI efi_invalid_parameter(void); * header for each arch (or a generic header) rather than being repeated here. */ #if defined(__aarch64__) -#define R_RELATIVE 1027 +#define R_RELATIVE R_AARCH64_RELATIVE #define R_MASK 0xffffffffULL #define IS_RELA 1 #elif defined(__arm__) -#define R_RELATIVE 23 +#define R_RELATIVE R_ARM_RELATIVE #define R_MASK 0xffULL #elif defined(__x86_64__) || defined(__i386__) -#include #define R_RELATIVE R_386_RELATIVE #define R_MASK 0xffULL #elif defined(__riscv) -#include #define R_RELATIVE R_RISCV_RELATIVE #define R_MASK 0xffULL #define IS_RELA 1