From 7da439ec183a0d68d9ae7f29259d8dbf49ed5884 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 14 Sep 2022 13:58:30 +0200 Subject: [PATCH] Remove .annobin* symbols from ld.so (#2126477) --- glibc.spec | 5 ++++- wrap-find-debuginfo.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/glibc.spec b/glibc.spec index 99ccd0b..211a1e5 100644 --- a/glibc.spec +++ b/glibc.spec @@ -152,7 +152,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 17%{?dist} +Release: 18%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -2171,6 +2171,9 @@ update_gconv_modules_cache () %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Fri Sep 23 2022 Florian Weimer - 2.35-18 +- Remove .annobin* symbols from ld.so (#2126477) + * Tue Sep 06 2022 Arjun Shankar - 2.35-17 - 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..42b3609 100644 --- a/wrap-find-debuginfo.sh +++ b/wrap-find-debuginfo.sh @@ -135,6 +135,10 @@ 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). +nm --format=just-symbols "$ldso_path" \ + | grep '^\.annobin' > "$ldso_tmp.annobin-symbols" +objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path" # Apply single-file DWARF optimization. dwz $ldso_path