From d8aa8def5bd7f34e485c7027ff0cc5aa3d8d2819 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Sat, 1 Oct 2022 02:06:08 +0200 Subject: [PATCH] Remove .annobin* symbols from ld.so (#2126477) Rawhide commits: - b400cead416e03ca9c1a2965d6aa0addf658eac9 - 4c6fa526bfbde7e4f5750635d973f329eb57c49c --- glibc.spec | 5 ++++- wrap-find-debuginfo.sh | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 3e5fb9d..a393e5e 100644 --- a/glibc.spec +++ b/glibc.spec @@ -148,7 +148,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 42%{?dist} +Release: 43%{?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 +* Mon Oct 03 2022 Arjun Shankar - 2.34-43 +- Remove .annobin* symbols from ld.so (#2126477) + * Tue Sep 06 2022 Arjun Shankar - 2.34-42 - Co-Authored-By: Benjamin Herrenschmidt - Retain .gnu_debuglink section in libc.so.6 (#2090744) diff --git a/wrap-find-debuginfo.sh b/wrap-find-debuginfo.sh index 6b9a835..d26f8eb 100644 --- a/wrap-find-debuginfo.sh +++ b/wrap-find-debuginfo.sh @@ -135,6 +135,11 @@ while true ; do 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" \ + | grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then + objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path" +fi # Apply single-file DWARF optimization. dwz $ldso_path