Skip to content

Commit

Permalink
BACKPORT: libtraceevent: Fix build with binutils 2.35
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Salvatore Bonaccorso <[email protected]>
Reviewed-by: Steven Rostedt <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
(cherry picked from commit 39efdd9)

Conflicts:
	tools/lib/traceevent/plugins/Makefile

Change-Id: Icec6ced8322a4e0a2aafe4edcb133b0335764032
Signed-off-by: Jeffy Chen <[email protected]>
Signed-off-by: Caesar Wang <[email protected]>
  • Loading branch information
bwhacks authored and Caesar-github committed Nov 10, 2022
1 parent 467fedf commit 7cbc9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/traceevent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ endef

define do_generate_dynamic_list_file
(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
endef
Expand Down

0 comments on commit 7cbc9a7

Please sign in to comment.