Message ID | 20210517163840.839097-19-mr.nuke.me@gmail.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uVA2Ttl5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FkQ0l0RXMz9sCD for <incoming@patchwork.ozlabs.org>; Tue, 18 May 2021 02:42:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F96D82E3A; Mon, 17 May 2021 18:41:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uVA2Ttl5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B43C282B91; Mon, 17 May 2021 18:39:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA87B82CE9 for <u-boot@lists.denx.de>; Mon, 17 May 2021 18:38:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-ot1-x336.google.com with SMTP id q7-20020a9d57870000b02902a5c2bd8c17so6085329oth.5 for <u-boot@lists.denx.de>; Mon, 17 May 2021 09:38:57 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jxhHLuxdIQCOstzhxfjOZ6zW0e1HF5i1V/mazhkg5xw=; b=uVA2Ttl5ibIkat7Vkl+wr70j8xEm41YWq0LZR3tuL7ejxsHUr1PXPTJ+vPrOulXqNP XHq8gQkZQp6QN9MzMHnGc1O0Gw0dCzDDSeYWnPkQTPgP83md+uQo2IGrpYYhvYNnaq79 B4mntKHcWQdzUq/ZNlYyBX+Z7PBtIIjLLr0OaXwiy99tgx/APRqHpvDDudc3eVJGb9lT b4yd0a4/Hv8F9UxWr16SmODI97e2BbgpJnhPprENtabJ1w6Jk6dvnumzJKWFI/ryDtrx UpaHnykDhaU+4otJwW9rFRelS/bKipLmi4QdDViFNRJUQ5Nlf3JWFAEKcua58iWkT7P6 WOcQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jxhHLuxdIQCOstzhxfjOZ6zW0e1HF5i1V/mazhkg5xw=; b=nXokSZaS60XR5Fcz+TEjCg8mNEmWbXG8iaJsNZi/Wx1mxu+9cF7FENHQ7JcA0N3H32 psVsZPUvRXf62xj3IUaTcZ1KArMPfgfy4E7hUQdlsVr8zoJnVa4Wo6j+T/4We3SAs0cY LITyWbHqXT2LoldwN9Reg/yRyeQKEA03Qp8KGQFw1TD1WMKlSyf3iIRlyYMY6o39QVgU oPiw5/RMAEdhbg2JcpEXpss8gadRUrQxYcGnhd7t5B5mFNQZ62Zp9RZrBAesofVC5WGf ekBqJrP9RvqreQfKt9ubiaoafoc01tcHncEVPBq9hwxZMij4e0vjp2nH+34ig2bEoogT 58fA== X-Gm-Message-State: AOAM533LILBxbili4M2scda/DcveEMpp0eojBQAcGOpxp+bZ/DXiH2Bl Gbw33bUkEcNL/WelxI6s5JvEUcT/ZYXJfw== X-Google-Smtp-Source: ABdhPJzO5bj5mjG8XE0tzcmpBbuaKbix2KQ9kO9N/EV+OXm0WOv/YhaVH738rR36aGIMUnhoBGU+NQ== X-Received: by 2002:a9d:6548:: with SMTP id q8mr342755otl.311.1621269536420; Mon, 17 May 2021 09:38:56 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id 64sm3103152oob.12.2021.05.17.09.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:38:56 -0700 (PDT) From: Alexandru Gagniuc <mr.nuke.me@gmail.com> To: u-boot@lists.denx.de, sjg@chromium.org Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>, trini@konsulko.com Subject: [PATCH 18/18] [UNTESTED] image: Add support for relocating crypto_algos in linker lists Date: Mon, 17 May 2021 11:38:40 -0500 Message-Id: <20210517163840.839097-19-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517163840.839097-1-mr.nuke.me@gmail.com> References: <20210517163840.839097-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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: <https://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> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean |
Series |
image: Reduce #ifdef abuse in image code
|
expand
|
diff --git a/common/image-sig.c b/common/image-sig.c index 498cd78af4..5c7ddd984d 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -98,6 +98,19 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name) int i; const char *name; +#if defined(CONFIG_NEEDS_MANUAL_RELOC) + static bool done; + + if (!done) { + crypto = ll_entry_start(struct crypto_algo, cryptos); + end = ll_entry_end(struct crypto_algo, cryptos); + for (; crypto < end; crypto++) { + crypto->name += gd->reloc_off; + crypto->verify += gd->reloc_off; + } + } +#endif + /* Move name to after the comma */ name = strchr(full_name, ','); if (!name)