2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: x86
|
2016-02-04 05:02:48 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2018-10-31 04:54:54 +08:00
|
|
|
// RUN: ld.lld --strip-all %t.o -o %t
|
|
|
|
// RUN: llvm-readobj -r %t | FileCheck %s
|
|
|
|
// RUN: ld.lld %t.o -o %t
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj -r --symbols %t | FileCheck %s --check-prefixes=CHECK,SYM
|
2016-02-04 05:02:48 +08:00
|
|
|
|
|
|
|
.type foo STT_GNU_IFUNC
|
|
|
|
.globl foo
|
|
|
|
foo:
|
|
|
|
ret
|
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
call foo
|
|
|
|
|
2019-08-03 10:26:52 +08:00
|
|
|
// CHECK: Section ({{.*}}) .rela.dyn {
|
2016-02-04 05:02:48 +08:00
|
|
|
// CHECK-NEXT: R_X86_64_IRELATIVE - 0x[[ADDR:.*]]
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
|
2018-10-31 04:54:54 +08:00
|
|
|
// SYM: Name: foo
|
|
|
|
// SYM-NEXT: Value: 0x[[ADDR]]
|
|
|
|
// SYM-NEXT: Size: 0
|
|
|
|
// SYM-NEXT: Binding: Global
|
|
|
|
// SYM-NEXT: Type: GNU_IFunc
|