summaryrefslogtreecommitdiff
path: root/test/Object
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2016-11-23 20:17:15 +0000
committerMeador Inge <meadori@codesourcery.com>2016-11-23 20:17:15 +0000
commit54801d6fa52a184ec0be19a5a2bd3b33238c5ed4 (patch)
tree6174f6884b6868b50f01838c89b2b1390a9cb63c /test/Object
parent82fd34805ff4b4865b171d699c55be62df709f35 (diff)
llvm-nm: Don't print value or size for undefined or weak symbols
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/ Differential Revision: https://reviews.llvm.org/D26936 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/nm-trivial-object.test5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Object/nm-trivial-object.test b/test/Object/nm-trivial-object.test
index def6549d656..c1f4d9e1f96 100644
--- a/test/Object/nm-trivial-object.test
+++ b/test/Object/nm-trivial-object.test
@@ -79,10 +79,9 @@ ELF: U SomeOtherFunction
ELF: 00000000 T main
ELF: U puts
-FIXME: we should not print the size of undefined symbols.
-ELF-SIZE: 00000000 U SomeOtherFunction
+ELF-SIZE: U SomeOtherFunction
ELF-SIZE-NEXT: 00000000 00000024 T main
-ELF-SIZE-NEXT: 00000000 U puts
+ELF-SIZE-NEXT: U puts
ELF-o: {{.*}}/trivial-object-test.elf-i386: U SomeOtherFunction
ELF-o: {{.*}}/trivial-object-test.elf-i386: 00000000 T main