From edc4b60fca0ee2bc33bb14acf739e8faeca26e45 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 8 Jan 2014 18:50:32 +0000 Subject: Force emit a relocation for @gnu_indirect_function symbols so that the indirect resolution works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198780 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ELF/ifunc-reloc.s | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/MC/ELF/ifunc-reloc.s (limited to 'test/MC') diff --git a/test/MC/ELF/ifunc-reloc.s b/test/MC/ELF/ifunc-reloc.s new file mode 100644 index 0000000000..01954631cc --- /dev/null +++ b/test/MC/ELF/ifunc-reloc.s @@ -0,0 +1,16 @@ +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s + .global sym + .type sym, @gnu_indirect_function +alias: + .global alias + .type alias, @function + .set sym, alias + + + callq sym + +// CHECK: Relocations [ +// CHECK-NEXT: Section (2) .rela.text { +// CHECK-NEXT: 0x1 R_X86_64_PC32 sym 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: } +// CHECK-NEXT: ] -- cgit v1.2.3