diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-23 07:20:12 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-23 07:20:12 +0000 |
commit | d93ceeb125c11a96eb85618bb9a8a7d664a1d8f4 (patch) | |
tree | e885a7ce2efd23908938e51b8198b158a3e14af6 /test | |
parent | 2974b6ffbcffcd7fb02958c7382edf45e4a30f14 (diff) |
Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/ELF/call-abs.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/ELF/call-abs.ll b/test/MC/ELF/call-abs.ll new file mode 100644 index 0000000000..6ebd17f30c --- /dev/null +++ b/test/MC/ELF/call-abs.ll @@ -0,0 +1,16 @@ +; RUN: llc -filetype=obj -mtriple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s + +define i32 @f() nounwind optsize ssp { +entry: + %call = tail call i32 inttoptr (i64 42 to i32 ()*)() nounwind optsize + %add = add nsw i32 %call, 1 + ret i32 %add +} + +; CHECK: ('_relocations', [ +; CHECK-NEXT: # Relocation 0x00000000 +; CHECK-NEXT: (('r_offset', 0x00000004) +; CHECK-NEXT: ('r_sym', 0x00000000) +; CHECK-NEXT: ('r_type', 0x00000002) +; CHECK-NEXT: ), +; CHECK-NEXT: ]) |