From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 18 Dec 2024 16:17:09 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tNvnQ-009g2n-2C for lore@lore.pengutronix.de; Wed, 18 Dec 2024 16:17:09 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tNvnQ-00057k-Tk; Wed, 18 Dec 2024 16:17:08 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNvnB-00057H-LS for ptxdist@pengutronix.de; Wed, 18 Dec 2024 16:16:53 +0100 Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tNvnA-0043PF-2D for ptxdist@pengutronix.de; Wed, 18 Dec 2024 16:16:53 +0100 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 2EF2539191D for ; Wed, 18 Dec 2024 15:16:27 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id C475D39191A; Wed, 18 Dec 2024 15:16:26 +0000 (UTC) Received: from [172.20.34.65] (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id ba46cd2f; Wed, 18 Dec 2024 15:16:26 +0000 (UTC) From: Marc Kleine-Budde Date: Wed, 18 Dec 2024 16:16:19 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241218-fix-ptxd_install_compression_format-v1-1-8b4973b0bb55@pengutronix.de> X-B4-Tracking: v=1; b=H4sIAELnYmcC/x2NUQqDMBAFryL73YDZCNVepZQQzKZd0ESyQQTx7 t32c3jMvBOEKpPAozuh0s7CJSvYWwfzJ+Q3GY7KgD0OFu1oEh9ma0f0nKWFZfFzWbdK8hN9KnU NzaTB4R1d76KbQEu6q/Z/eb6u6wt40el0dQAAAA== X-Change-ID: 20241218-fix-ptxd_install_compression_format-f43272303d39 To: ptxdist@pengutronix.de X-Mailer: b4 0.15-dev-1b0d6 X-Developer-Signature: v=1; a=openpgp-sha256; l=1548; i=mkl@pengutronix.de; h=from:subject:message-id; bh=p9YqIYzXZj27N1lChTUpP4np+argfTSAgbCKAdOtWLo=; b=owEBbQGS/pANAwAKASg4oj56LbxvAcsmYgBnYudHUz8SpPcnpKbXKn2/HbI3u7iMhCCfayLIa sOxHk91WnKJATMEAAEKAB0WIQRQQLqG4LYE3Sm8Pl8oOKI+ei28bwUCZ2LnRwAKCRAoOKI+ei28 b9HmB/sH9iK/SzRKdv3WEsFRq8+vbBqffagIgBxvqqreIxd/DlaUn64yvHk3CZ3z1hg3xxEyX3g supgi2FqyP1OdPyWxoiQfzN8pPnj94JjoKHBEL8Y5lqwNoXya4CeCNYwHhVgP05Pl00QU7Lanpf gpsGjnatjVp2Bb0zhDzuO/rR2SDZh8caASWHmlS3sMdZqarCfLiP2qlxKeskJVy9a1+t9RT7FK2 /BY07DPJjurbcOj/LjinHEXr73kKXbbPqxjnOvUSwjL8UAoPjharkJw911JwuYnENOHDl2KSKyr 2o2f4hLeZiUhu3xYY/6EFYGWCs+8vSea3k1MlNgBHE4FvQLB X-Developer-Key: i=mkl@pengutronix.de; a=openpgp; fpr=C1400BA0B3989E6FBC7D5B5C2B5EE211C58AEA54 Subject: [ptxdist] [PATCH] ptxd_install_compression_format: don't use host readelf to figure out debug compression format X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Marc Kleine-Budde Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false The host readelf might be too old and doesn't understand the compression formats of new toolchain libraries. This leads to the following error: | readelf: Warning: section '.debug_str' has unsupported compress type: 2 Use coss-readelf of toolchain instead. Fixes: baf33e7186cb ("ptxd_install_file_extract_debug: pick the debug compression format from the toolchain") Signed-off-by: Marc Kleine-Budde --- scripts/lib/ptxd_make_xpkg_pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index 08a0ab593febbee2aeac5c1b4caaf44acba7c3fa..6d2d2fcafa65ebb0428a1df5ffed71c0617fc701 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -390,7 +390,7 @@ ptxd_install_compression_format() { libc="$(ptxd_cross_cc -print-file-name=libc.so.6 2> /dev/null)" if [ -n "${libc}" ]; then - comp="=$(readelf -t "${libc}" | sed -n -e '/COMPRESSED/{N;s/.*\(ZLIB\|ZSTD\).*/\1/p;q}' | tr '[:upper:]' '[:lower:]')" + comp="=$($(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)readelf -t "${libc}" | sed -n -e '/COMPRESSED/{N;s/.*\(ZLIB\|ZSTD\).*/\1/p;q}' | tr '[:upper:]' '[:lower:]')" fi export ptxd_install_file_objcopy_args="--only-keep-debug --compress-debug-sections${comp}" } --- base-commit: b922a1e6bf2c7764c3e6032557b259f755464be3 change-id: 20241218-fix-ptxd_install_compression_format-f43272303d39 Best regards, -- Marc Kleine-Budde