[PATCH] D73169: [llvm-readobj] - Add a test for --dyn-symbols when there is no dynamic symbols.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 03:13:44 PST 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
It removes the Object/readobj-absent.test test and creates a one more case in
dyn-symbols.test we have.
https://reviews.llvm.org/D73169
Files:
llvm/test/Object/readobj-absent.test
llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
Index: llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
===================================================================
--- llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
+++ llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
@@ -282,3 +282,20 @@
- Name: foo
- Name: bar
- Name: zed
+
+## Case 8: Check what we do when file does not have any dynamic symbols.
+# RUN: yaml2obj %s --docnum=7 -o %t7
+# RUN: llvm-readobj --dyn-symbols %t7 | FileCheck %s --check-prefix=NO-DYNSYM-LLVM
+# RUN: llvm-readelf --dyn-symbols %t7 | FileCheck %s --allow-empty --check-prefix=NO-DYNSYM-GNU
+
+# NO-DYNSYM-LLVM: DynamicSymbols [
+# NO-DYNSYM-LLVM-NEXT: ]
+
+# NO-DYNSYM-GNU-NOT: {{.}}
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_386
Index: llvm/test/Object/readobj-absent.test
===================================================================
--- llvm/test/Object/readobj-absent.test
+++ /dev/null
@@ -1,10 +0,0 @@
-## Don't crash if required information is absent
-# RUN: yaml2obj %s -o %t
-# RUN: llvm-readobj --dyn-syms %t
-
---- !ELF
-FileHeader:
- Class: ELFCLASS32
- Data: ELFDATA2LSB
- Type: ET_REL
- Machine: EM_386
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73169.239529.patch
Type: text/x-patch
Size: 1208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200122/9863e91d/attachment.bin>
More information about the llvm-commits
mailing list