wrap-find-debuginfo.sh: Use `nm --format=posix' (#2126477)

Older versions of nm do not support `nm --format=just-symbols'.
Therefore use `--format=posix' instead and process the output with
`cut'.
This commit is contained in:
Arjun Shankar 2022-10-06 15:44:27 +02:00
parent d8aa8def5b
commit b7a16ad21d
2 changed files with 5 additions and 2 deletions

View File

@ -148,7 +148,7 @@ end \
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
Release: 43%{?dist}
Release: 44%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries.
@ -2641,6 +2641,9 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog
* Thu Oct 06 2022 Arjun Shankar <arjun@redhat.com> - 2.34-44
- wrap-find-debuginfo.sh: Use nm --format=posix instead of --format=just-symbols
* Mon Oct 03 2022 Arjun Shankar <arjun@redhat.com> - 2.34-43
- Remove .annobin* symbols from ld.so (#2126477)

View File

@ -136,7 +136,7 @@ done
debug_base_name=${last_arg:-$RPM_BUILD_ROOT}
$debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path
# Remove the .annobin* symbols (and only them).
if nm --format=just-symbols "$ldso_path" \
if nm --format=posix "$ldso_path" | cut -d' ' -f1 \
| grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then
objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path"
fi