2016-04-24 10:31:04 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
2016-04-24 10:42:34 +08:00
|
|
|
# RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
|
2016-04-24 10:31:04 +08:00
|
|
|
|
2017-03-31 03:13:47 +08:00
|
|
|
# CHECK: error: undefined symbol: hidden
|
|
|
|
# CHECK: >>> referenced by {{.*}}:(.data+0x0)
|
2016-04-24 10:31:04 +08:00
|
|
|
.global hidden
|
|
|
|
.hidden hidden
|
|
|
|
|
2017-03-31 03:13:47 +08:00
|
|
|
# CHECK: error: undefined symbol: internal
|
|
|
|
# CHECK: >>> referenced by {{.*}}:(.data+0x8)
|
2016-04-24 10:31:04 +08:00
|
|
|
.global internal
|
|
|
|
.internal internal
|
|
|
|
|
2017-03-31 03:13:47 +08:00
|
|
|
# CHECK: error: undefined symbol: protected
|
|
|
|
# CHECK: >>> referenced by {{.*}}:(.data+0x10)
|
2016-04-24 10:31:04 +08:00
|
|
|
.global protected
|
|
|
|
.protected protected
|
2016-10-06 17:45:04 +08:00
|
|
|
|
|
|
|
.section .data, "a"
|
|
|
|
.quad hidden
|
|
|
|
.quad internal
|
|
|
|
.quad protected
|