2023-10-11 17:13:46 +02:00
|
|
|
--- scripts/brp-strip-comment-note.orig 2023-09-19 10:10:10.000000000 +0000
|
|
|
|
+++ scripts/brp-strip-comment-note 2023-10-09 12:22:27.504732553 +0000
|
2022-12-02 15:17:05 +01:00
|
|
|
@@ -15,7 +15,7 @@ esac
|
|
|
|
|
|
|
|
# Strip .comment and .note sections (the latter only if it is not allocated)
|
2006-12-19 00:17:44 +01:00
|
|
|
# for already stripped elf files in the build root
|
2022-12-02 15:17:05 +01:00
|
|
|
-for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do
|
|
|
|
+for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | grep -v ' shared object,' | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do
|
2006-12-19 00:17:44 +01:00
|
|
|
note="-R .note"
|
2011-05-16 18:07:44 +02:00
|
|
|
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
|
2022-12-02 15:17:05 +01:00
|
|
|
grep ALLOC >/dev/null; then
|
2023-10-11 17:13:46 +02:00
|
|
|
--- scripts/brp-strip.orig 2023-09-19 10:10:10.000000000 +0000
|
|
|
|
+++ scripts/brp-strip 2023-10-09 12:24:36.920521652 +0000
|
|
|
|
@@ -35,6 +35,7 @@ strip_elf_binaries()
|
|
|
|
! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \
|
|
|
|
! -name "*.go" -links "${nlinks}" -print0 | \
|
|
|
|
xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \
|
|
|
|
+ grep -v ' shared object,' | grep -v '/lib/modules/ | \
|
|
|
|
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | \
|
|
|
|
grep -v 'no machine' | \
|
|
|
|
xargs -I\{\} $STRIP -g \{\}" ARG0
|