diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-16 16:17:21 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-16 16:17:21 +0000 |
commit | 6469540adf63d94a876c2b623cb4ca70479647f7 (patch) | |
tree | e290e5d50889b9072cb60b866717aa1758836731 /test/MC/ELF | |
parent | ac53b0a48a56037b4d3a73d9f8ca73baaf550f9f (diff) | |
download | external_llvm-6469540adf63d94a876c2b623cb4ca70479647f7.zip external_llvm-6469540adf63d94a876c2b623cb4ca70479647f7.tar.gz external_llvm-6469540adf63d94a876c2b623cb4ca70479647f7.tar.bz2 |
sets bit 0 of the function address of thumb function in .symtab
("T is 1 if the target symbol S has type STT_FUNC and the
symbol addresses a Thumb instruction ;it is 0 otherwise."
from "ELF for the ARM Architecture" 4.7.1.2)
Patch by Koan-Sin Tan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF')
-rw-r--r-- | test/MC/ELF/elf-thumbfunc.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/MC/ELF/elf-thumbfunc.s b/test/MC/ELF/elf-thumbfunc.s new file mode 100644 index 0000000..a1b3c31 --- /dev/null +++ b/test/MC/ELF/elf-thumbfunc.s @@ -0,0 +1,20 @@ +@@ test st_value bit 0 of thumb function +@ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \ +@ RUN: elf-dump | FileCheck %s + .syntax unified + .text + .globl foo + .align 2 + .type foo,%function + .code 16 + .thumb_func +foo: + bx lr + +@@ make sure foo is thumb function: bit 0 = 1 (st_value) +@CHECK: Symbol 0x00000004 +@CHECK-NEXT: 'st_name', 0x00000001 +@CHECK-NEXT: 'st_value', 0x00000001 +@CHECK-NEXT: 'st_size', 0x00000000 +@CHECK-NEXT: 'st_bind', 0x00000001 +@CHECK-NEXT: 'st_type', 0x00000002 |