forked from OSchip/llvm-project
34 lines
844 B
Plaintext
34 lines
844 B
Plaintext
# REQUIRES: x86
|
|
## Show that a symbol referenced from an object and defined in bitcode is
|
|
## not internalized and is emitted in the output.
|
|
|
|
# RUN: rm -rf %t.dir
|
|
# RUN: split-file %s %t.dir
|
|
# RUN: llvm-mc %t.dir/obj.s -o %t.o -filetype=obj -triple=x86_64-pc-linux
|
|
# RUN: llvm-as %t.dir/bc.ll -o %t2.o
|
|
# RUN: ld.lld %t2.o %t.o -o %t.so -shared
|
|
# RUN: llvm-readobj --symbols %t.so | FileCheck %s
|
|
|
|
# CHECK: Name: foo
|
|
# CHECK-NEXT: Value:
|
|
# CHECK-NEXT: Size:
|
|
# CHECK-NEXT: Binding: Local
|
|
# CHECK-NEXT: Type: Function
|
|
# CHECK-NEXT: Other [
|
|
# CHECK-NEXT: STV_HIDDEN
|
|
# CHECK-NEXT: ]
|
|
# CHECK-NEXT: Section: .text
|
|
|
|
#--- obj.s
|
|
.globl bar
|
|
bar:
|
|
call foo
|
|
|
|
#--- bc.ll
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define hidden void @foo() {
|
|
ret void
|
|
}
|