2016-04-08 04:41:41 +08:00
|
|
|
// REQUIRES: x86
|
2015-10-03 05:57:52 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
2016-04-08 04:41:41 +08:00
|
|
|
//
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t -shared -o %tout.so
|
2016-04-08 04:41:41 +08:00
|
|
|
// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck -check-prefix=GNU %s
|
2018-02-03 05:44:06 +08:00
|
|
|
// RUN: ld.lld %t -shared -o %tout.so --gnu-unique
|
|
|
|
// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck -check-prefix=GNU %s
|
2016-04-08 04:41:41 +08:00
|
|
|
//
|
|
|
|
// RUN: ld.lld %t -shared -o %tout.so --no-gnu-unique
|
|
|
|
// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck -check-prefix=NO %s
|
2015-10-03 05:57:52 +08:00
|
|
|
|
|
|
|
// Check that STB_GNU_UNIQUE is treated as a global and ends up in the dynamic
|
|
|
|
// symbol table as STB_GNU_UNIQUE.
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
.text
|
|
|
|
_start:
|
|
|
|
|
|
|
|
.data
|
|
|
|
.type symb, @gnu_unique_object
|
|
|
|
symb:
|
|
|
|
|
2016-04-08 04:41:41 +08:00
|
|
|
# GNU: Name: symb@
|
|
|
|
# GNU-NEXT: Value:
|
|
|
|
# GNU-NEXT: Size: 0
|
|
|
|
# GNU-NEXT: Binding: Unique
|
|
|
|
# GNU-NEXT: Type: Object
|
|
|
|
# GNU-NEXT: Other: 0
|
|
|
|
# GNU-NEXT: Section: .data
|
|
|
|
# GNU-NEXT: }
|
|
|
|
|
|
|
|
# NO: Name: symb@
|
|
|
|
# NO-NEXT: Value:
|
|
|
|
# NO-NEXT: Size: 0
|
|
|
|
# NO-NEXT: Binding: Global
|
|
|
|
# NO-NEXT: Type: Object
|
|
|
|
# NO-NEXT: Other: 0
|
|
|
|
# NO-NEXT: Section: .data
|
|
|
|
# NO-NEXT: }
|