From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Thu, 20 May 2021 13:24:13 +0200 Subject: [PATCH u-boot v4 24/36] ARM: fix LTO for apf27 In-Reply-To: <20210520112425.25166-1-marek.behun@nic.cz> References: <20210520112425.25166-1-marek.behun@nic.cz> Message-ID: <20210520112425.25166-25-marek.behun@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When apf27_defconfig is built with LTO, linking complains about undefined reference to `nand_boot`. This is because it is referenced from inline assembly. Make it visible. Signed-off-by: Marek Beh?n --- drivers/mtd/nand/raw/mxc_nand_spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c index e1e542519d..2f054b60ed 100644 --- a/drivers/mtd/nand/raw/mxc_nand_spl.c +++ b/drivers/mtd/nand/raw/mxc_nand_spl.c @@ -326,7 +326,7 @@ int nand_spl_load_image(uint32_t from, unsigned int size, void *buf) * configured and available since this code loads the main U-Boot image * from NAND into SDRAM and starts it from there. */ -void nand_boot(void) +__used void nand_boot(void) { __attribute__((noreturn)) void (*uboot)(void); -- 2.26.3