From 6a3c03d64b479259f0fcac14845d68b424c7d3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 21 Feb 2022 11:08:04 +0100 Subject: [PATCH] build: Don't change debug file .text section flags. This breaks perf ELF symbol tracking somehow. --- make/rules-common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/rules-common.mk b/make/rules-common.mk index 0e38bb8e..9f246e69 100644 --- a/make/rules-common.mk +++ b/make/rules-common.mk @@ -60,7 +60,7 @@ $$(OBJ)/.$(1)-dist$(3): cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR$(3))/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \ -printf '--only-keep-debug\0%p\0$$(DST_LIBDIR$(3))/%p.debug\0' | \ - xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code + xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy --file-alignment=4096 cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' ')' \ -printf '--add-gnu-debuglink=$$(DST_LIBDIR$(3))/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR$(3))/%p\0' | \ xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code