From patchwork Wed Mar 3 04:12:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1446476 X-Patchwork-Delegate: trini@ti.com Return-Path: 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.a=rsa-sha256 header.s=default header.b=cYe3nBpq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4Dr0wt21cJz9sCD for ; Wed, 3 Mar 2021 15:13:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A1F6828EE; Wed, 3 Mar 2021 05:12:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="cYe3nBpq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C3E6828E2; Wed, 3 Mar 2021 05:12:47 +0100 (CET) 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,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E9C36828B1 for ; Wed, 3 Mar 2021 05:12:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTPSA id 88A5E140A6D; Wed, 3 Mar 2021 05:12:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1614744757; bh=GuEr2KI2QmOozwOk9CwnfCPNZnpP0BJ2phHeEEvdD40=; h=From:To:Date; b=cYe3nBpqsoOcsVEmohNJK783j6z3C/Z2LbTnlLAmaaNiG3Iq1rzmPG6MsJaGXfHxO VqsHNI9JIfxUxYTzNEN4jaVs3DUrHP6n1fs/ZOTEIFyzjOXChkJ/MOTvmaVe0Kf43u mQfy2z1uhhFLpZ4BT6Q1jUzalK7rQVkV7fL3uPPk= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de, Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Miquel Raynal , Tom Rini , =?utf-8?q?Pali_Roh=C3=A1r?= , Stefan Roese , Heinrich Schuchardt , Alexander Graf , Marek Vasut , Neil Armstrong , Ryder Lee Cc: =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [RFC PATCH u-boot 05/12] binman: declare symbols externally visible Date: Wed, 3 Mar 2021 05:12:04 +0100 Message-Id: <20210303041211.26945-6-marek.behun@nic.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210303041211.26945-1-marek.behun@nic.cz> References: <20210303041211.26945-1-marek.behun@nic.cz> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Use the `__visible` macro to declare binman symbols externally visible, so that when building with LTO the compiler does not optimize this data away. Signed-off-by: Marek BehĂșn --- include/binman.h | 1 + include/binman_sym.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/binman.h b/include/binman.h index 5958dfb448..e72e85d4b7 100644 --- a/include/binman.h +++ b/include/binman.h @@ -9,6 +9,7 @@ #ifndef _BINMAN_H_ #define _BINMAN_H_ +#include #include /** diff --git a/include/binman_sym.h b/include/binman_sym.h index 72e6765fe5..55421f5893 100644 --- a/include/binman_sym.h +++ b/include/binman_sym.h @@ -33,7 +33,7 @@ * @_prop_name: Property value to get from that entry (e.g. 'pos') */ #define binman_sym_declare(_type, _entry_name, _prop_name) \ - _type binman_symname(_entry_name, _prop_name) \ + _type binman_symname(_entry_name, _prop_name) __visible \ __attribute__((aligned(4), unused, section(".binman_sym"))) /** @@ -58,7 +58,7 @@ * @_prop_name: Property value to get from that entry (e.g. 'pos') */ #define binman_sym_declare_optional(_type, _entry_name, _prop_name) \ - _type binman_symname(_entry_name, _prop_name) \ + _type binman_symname(_entry_name, _prop_name) __visible \ __attribute__((aligned(4), weak, unused, \ section(".binman_sym")))