OSDN Git Service

[bpf] Test case for symbol information in object file
authorYonghong Song <yhs@fb.com>
Sat, 22 Sep 2018 17:31:01 +0000 (17:31 +0000)
committerYonghong Song <yhs@fb.com>
Sat, 22 Sep 2018 17:31:01 +0000 (17:31 +0000)
This patch tests the change introduced in r342556.

Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342807 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/BPF/elf-symbol-information.ll [new file with mode: 0644]

diff --git a/test/CodeGen/BPF/elf-symbol-information.ll b/test/CodeGen/BPF/elf-symbol-information.ll
new file mode 100644 (file)
index 0000000..37af7ed
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llc -march=bpfel -filetype=obj -o - %s | llvm-readelf --symbols | FileCheck %s
+
+; CHECK: 0 FILE    LOCAL  DEFAULT  ABS elf-symbol-information.ll
+; CHECK: 8 FUNC    GLOBAL DEFAULT    2 test_func
+define void @test_func() {
+entry:
+  ret void
+}