2016-03-05 08:09:37 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
; RUN: llvm-as %s -o %t1.o
|
|
|
|
; RUN: llvm-mc -triple=x86_64-pc-linux %p/Inputs/visibility.s -o %t2.o -filetype=obj
|
2018-01-17 01:34:26 +08:00
|
|
|
; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps
|
|
|
|
; RUN: llvm-dis < %t.so.0.2.internalize.bc | FileCheck --check-prefix=IR %s
|
2019-05-01 13:49:01 +08:00
|
|
|
; RUN: llvm-readobj --symbols %t.so | FileCheck %s
|
2016-03-05 08:09:37 +08:00
|
|
|
|
|
|
|
; CHECK: Name: g
|
2019-09-07 16:20:09 +08:00
|
|
|
; CHECK-NEXT: Value:
|
2016-03-05 08:09:37 +08:00
|
|
|
; CHECK-NEXT: Size: 0
|
|
|
|
; CHECK-NEXT: Binding: Local
|
|
|
|
; CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
; CHECK-NEXT: Other [ (0x2)
|
|
|
|
; CHECK-NEXT: STV_HIDDEN
|
|
|
|
; CHECK-NEXT: ]
|
2016-03-05 08:09:37 +08:00
|
|
|
; CHECK-NEXT: Section: .text
|
|
|
|
|
2016-03-08 01:14:36 +08:00
|
|
|
; CHECK: Name: a
|
2019-09-07 16:20:09 +08:00
|
|
|
; CHECK-NEXT: Value:
|
2016-03-08 01:14:36 +08:00
|
|
|
; CHECK-NEXT: Size: 0
|
|
|
|
; CHECK-NEXT: Binding: Local
|
|
|
|
; CHECK-NEXT: Type: None
|
2016-03-25 00:30:20 +08:00
|
|
|
; CHECK-NEXT: Other [ (0x2)
|
|
|
|
; CHECK-NEXT: STV_HIDDEN
|
|
|
|
; CHECK-NEXT: ]
|
2016-03-08 01:14:36 +08:00
|
|
|
; CHECK-NEXT: Section: .data
|
|
|
|
|
2019-08-28 09:08:54 +08:00
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
2016-03-05 08:09:37 +08:00
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
declare hidden void @g()
|
2018-01-18 10:08:32 +08:00
|
|
|
; IR: declare hidden void @g()
|
2018-01-17 01:34:26 +08:00
|
|
|
|
2016-03-05 08:09:37 +08:00
|
|
|
define void @f() {
|
|
|
|
call void @g()
|
|
|
|
ret void
|
|
|
|
}
|
2016-03-08 01:14:36 +08:00
|
|
|
@a = weak hidden global i32 42
|