From: Ben Hutchings Date: Fri, 24 Jul 2020 21:42:51 +0000 (+0100) Subject: libtraceevent: Fix build with binutils 2.35 X-Git-Tag: archive/raspbian/5.7.10-1+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=84129c279a4fca5c93cb970e344bb73dbe0c3a94;p=linux.git libtraceevent: Fix build with binutils 2.35 Forwarded: https://lore.kernel.org/linux-trace-devel/20200725010623.GA194964@decadent.org.uk/T/#u In binutils 2.35, 'nm -D' changed to show symbol versions along with symbol names, with the usual @@ separator. When generating libtraceevent-dynamic-list we need just the names, so strip off the version suffix if present. Signed-off-by: Ben Hutchings Cc: stable@vger.kernel.org Gbp-Pq: Topic bugfix/all Gbp-Pq: Name libtraceevent-fix-build-with-binutils-2.35.patch --- diff --git a/tools/lib/traceevent/plugins/Makefile b/tools/lib/traceevent/plugins/Makefile index 349bb81482a..680d883efe0 100644 --- a/tools/lib/traceevent/plugins/Makefile +++ b/tools/lib/traceevent/plugins/Makefile @@ -197,7 +197,7 @@ define do_generate_dynamic_list_file xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\ if [ "$$symbol_type" = "U W" ];then \ (echo '{'; \ - $(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\ + $(NM) -u -D $1 | awk 'NF>1 {sub("@.*", "", $$2); print "\t"$$2";"}' | sort -u;\ echo '};'; \ ) > $2; \ else \