This is an archive of the discontinued LLVM Phabricator instance.

llvm-nm: Don't print value or size for undefined or weak symbols
ClosedPublic

Authored by meadori on Nov 21 2016, 2:08 PM.

Details

Summary

Undefined and weak symbols don't have a meaningful size or value.
As such, nothing should be printed for those attributes (this is
already done for the address with 'U') with the BSD format. This
matches what GNU nm does.

Note that for the POSIX.2 format [1] zero values are still
printed for the size and value. This seems in spirit with
the format strings in that specification, but is debatable.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/

Diff Detail

Event Timeline

meadori updated this revision to Diff 78781.Nov 21 2016, 2:08 PM
meadori retitled this revision from to llvm-nm: Don't print value or size for undefined or weak symbols.
meadori updated this object.
This revision was automatically updated to reflect the committed changes.