From patchwork Mon Jun 24 09:29:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 807020 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp1865940wrt; Mon, 24 Jun 2024 05:53:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVezx2CBHhPjgGv9cV0oqCnfSEz2WvIoJiIOL8Kua6IYc3TM9wyDGsMyD938S0Ad9HluTWXilWuCXHSzv/dzxAK X-Google-Smtp-Source: AGHT+IEH7SGIRIN9THvI4bIAepMOFRCkbjABBZhvGGaO3cd0cvxFT1eY1tHsg1R1Qin4SPaYcJ3t X-Received: by 2002:a17:906:e5b:b0:a72:52f0:900a with SMTP id a640c23a62f3a-a7252f090c7mr176352466b.19.1719233607321; Mon, 24 Jun 2024 05:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719233607; cv=none; d=google.com; s=arc-20160816; b=ZMuClUfRClLGNEzqO6fQW7jtxRnB5Y6sZrFm78h/Mokf5nnfl7r80NTKvAFpm6f1Wd /xig8IoYalNJ5XWSdHom+ewnlNjmYAKZpV6JNUxsVS5dJ5kN3GmaK722ePgOVGs4qd7C fTYTNandXHhvmFzrBWGxFykE9+fKTo5flV0+7N2IVJueECMNtEPR7RYn2OlHMXqTQCuI F8mUPf6B7VuGeuumBPdy7qQTo/gcvewgLkX6pKLPp/VZl00RmdDRPSr2PnK6GIIUhFad +cu7LK5Jw1DeQC8c2ze+1eI12NspqiNlxflcX6jrNJwD8riBI5m5yApckKvuLhjbqH52 /r+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=f/5jDULfPeKj+IdDgbZSR3O11+712DcHA7Hnqt/o6xo=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=xacb/6ImnexNAFCRHCPcYOzUHYrkASQm3QrQexBtLJECBg0uRnvuVF7Qi0u7/HrA+x O5/2aGHbo+s9+uNmlOrVV4ugqsuQy37HQbWLcRFPCywASjMHj9eUixUH4/HjzhQiUEdl brpdnaylSv0qZ+/GFVwh7FM9Feu7D28tRlFBAN6Eq9JJvus+e838rB8a0JeGWKbPQsSh S43nn1YpeZ92X1P8i91oXEj2UO7xx1yVygIVn1bhIy6EDolfGkQNjN5WOaE+yEJ8RGat tfH5cCyx/wle8j/DtXkjqUTehDVUIgfoF4kamzYMJykmrysGz34jd2kgXoVR20mr5O67 fi+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sBZHNW2C; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6fe4a637b3si258234266b.482.2024.06.24.05.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 05:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sBZHNW2C; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8071F88481; Mon, 24 Jun 2024 14:52:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="sBZHNW2C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26B1087FFB; Mon, 24 Jun 2024 11:29:41 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 D0B108752A for ; Mon, 24 Jun 2024 11:29:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andrew.goodbody@linaro.org Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-354b722fe81so2675391f8f.3 for ; Mon, 24 Jun 2024 02:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719221378; x=1719826178; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f/5jDULfPeKj+IdDgbZSR3O11+712DcHA7Hnqt/o6xo=; b=sBZHNW2CxPGDwrNC5Vri+L3HRlXd1ZBV6A4TjdWiPtLYzlFQZo77QGhcSh4aD21gZc Vo3PQEPccBnyJtDUOix+Ymq6GhEO3pOG9kAgYyNtteWKXBj2hzE0YQu+gJI2KsO1JJ3K bNhOTaOJPVG3JIe7ISD0uAoYczqBXxWMvcQifrZCxOKP25dyxK/PR5gNaKokS/3iCuka h7v+h3L3MSIQSCH6Xx3Ijd7+OoU16IP2cGwQAgv4a9hQFLUcn3myyG8BV+/6vwyXnsGO mxae3N4HAs8sPAuqrhkObTzEF2gE/eEkKXoiP8CAHW1gOV/N+M0OXDV79LpWT2HrcyPb NvEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719221378; x=1719826178; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f/5jDULfPeKj+IdDgbZSR3O11+712DcHA7Hnqt/o6xo=; b=sspSFH/QiohHJengt7AQ7ncNtverUvX2QfrcKPK7hUJuzsdgTQV51VgexFlLHzzxhw 4N89zhs1skzQPC9/o6EG4YvPA6IBlEv965YE2SneYvb3DP8OSK8NmbOCaIFoDenl6UHa GPzFpAkO8bZo39uPmROFvlgIZ33ac/eLihojC3vZaA6evUaOgOIwWVvLRyenfXbyt0HT 1J2A1haMiYBp0Kopr9nYAb+e9MfqNzP1th0H3I4HBIEcKyvY/lMsfv0XgZvBUqckwp3u XUI8t0AjQmaf89xD97UeRVAdLj9230mju04VI+PdFk/xD8o8WquLcoRJNfTFvR4ZvQhp lH5A== X-Gm-Message-State: AOJu0YywB/r1KBKQuny+HV1RomLsl1AtILLZiE7BeSjzEAxs0fPTB+77 1AJN8NeREQM91J0L9BwRP7iWg4KDBGZ/kC1yxnw8nup55Z0xNmsrnNbJxjFiQ/1W9oFTA9O7kXq 5UEU= X-Received: by 2002:adf:ebcb:0:b0:360:9a3f:aa7d with SMTP id ffacd0b85a97d-366e4ecc6a5mr3335071f8f.1.1719221377921; Mon, 24 Jun 2024 02:29:37 -0700 (PDT) Received: from artemis2.broadband ([2a0a:ef40:ea8:cd01:8d98:dfde:453c:c55f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3663a8c8f50sm9449972f8f.109.2024.06.24.02.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 02:29:37 -0700 (PDT) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH] sandbox: Fix LTO to work with STACKPROTECTOR Date: Mon, 24 Jun 2024 10:29:00 +0100 Message-Id: <20240624092900.2108175-1-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 24 Jun 2024 14:52:21 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Add the STACKPROTECTOR symbols to the script that generates the symbols that should not be removed by the use of LTO when linking a shared object. This prevents a fail to build due to link errors. https://source.denx.de/u-boot/u-boot/-/issues/35 Signed-off-by: Andrew Goodbody --- scripts/gen_ll_addressable_symbols.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/gen_ll_addressable_symbols.sh b/scripts/gen_ll_addressable_symbols.sh index d0864804aa..ebf89b04bf 100755 --- a/scripts/gen_ll_addressable_symbols.sh +++ b/scripts/gen_ll_addressable_symbols.sh @@ -13,3 +13,5 @@ set -e echo '#include ' $@ 2>/dev/null | grep -oe '_u_boot_list_2_[a-zA-Z0-9_]*_2_[a-zA-Z0-9_]*' | \ sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/' +$@ 2>/dev/null | grep -oe '__stack_chk_.*' | \ + sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/'