mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_install_compression_format: don't use host readelf to figure out debug compression format
@ 2024-12-18 15:16 Marc Kleine-Budde
  0 siblings, 0 replies; only message in thread
From: Marc Kleine-Budde @ 2024-12-18 15:16 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

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 <mkl@pengutronix.de>
---
 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 <mkl@pengutronix.de>





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-18 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-18 15:16 [ptxdist] [PATCH] ptxd_install_compression_format: don't use host readelf to figure out debug compression format Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox