2018-06-06 21:56:51 +08:00
|
|
|
# REQUIRES: x86
|
2016-04-24 10:31:04 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
2018-07-03 01:48:23 +08:00
|
|
|
# RUN: not ld.lld %t.o -o /dev/null -shared 2>&1 | FileCheck %s
|
2016-04-24 10:31:04 +08:00
|
|
|
|
2019-03-12 19:10:29 +08:00
|
|
|
# CHECK: error: undefined hidden symbol: hidden
|
2017-03-31 03:13:47 +08:00
|
|
|
# CHECK: >>> referenced by {{.*}}:(.data+0x0)
|
2016-04-24 10:31:04 +08:00
|
|
|
.global hidden
|
|
|
|
.hidden hidden
|
|
|
|
|
2019-03-12 19:10:29 +08:00
|
|
|
# CHECK: error: undefined internal symbol: internal
|
2017-03-31 03:13:47 +08:00
|
|
|
# CHECK: >>> referenced by {{.*}}:(.data+0x8)
|
2016-04-24 10:31:04 +08:00
|
|
|
.global internal
|
|
|
|
.internal internal
|
|
|
|
|
2019-03-12 19:10:29 +08:00
|
|
|
# CHECK: error: undefined protected symbol: protected
|
2017-03-31 03:13:47 +08:00
|
|
|
# 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
|