[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25708] nm -D doesn't display symbol version for dynamic sy

From: matz at suse dot de
Subject: [Bug binutils/25708] nm -D doesn't display symbol version for dynamic symbols
Date: Fri, 07 Aug 2020 15:27:24 +0000


--- Comment #10 from Michael Matz <matz at suse dot de> ---
(In reply to H.J. Lu from comment #9)
> > 
> > Is it really a good idea to change the output format of basic tools that
> > might be
> > used in machine processing context?  (And I note there doesn't seem to be an
> > cmdline option to get the old behaviour back, so fixing the problem now
> > entails
> > further massaging of nm output to cut off /@.*/ )
> Is this PR 26302?  A patch is at

No.  perf does the moral equivalent of:

% ( echo "{"; nm -D input.so | awk '{print $1";"}'; echo "}" ) > thelist
% ld ... --dynamic-list=thelist

Of course 'thelist' now contains @ characters, because nm -D shows symversions,
and that's what ld is complaining about:

thelist:2: ignoring invalid character `@' in script
thelist:2: syntax error in dynamic list
collect2: error: ld returned 1 exit status

The build system of simply isn't prepared to deal with these symversions.
So one of several things need to happen:
a) nm -D doesn't print symversions, unless explicitely requested
b) nm -D continues to print them, but with an option to disable them
c) perf Makefile is changed to filter out any /@.*/ in the nm output

I'm not sure how widespread such usage of nm is, and hence how often fix (c)
would have to be applied in the wild.  Fixing such packages would at least
be easier if nm had an option to disable printing them (i.e. (b)).  But maybe
it's best to not change traditional behaviour of nm at all, i.e. change (a),
and revert to not printing symversions by default.

I don't know what's best.

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]