forked from OSchip/llvm-project
41 lines
1.2 KiB
ArmAsm
41 lines
1.2 KiB
ArmAsm
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
# RUN: echo "{ local: *; };" > %t.script
|
|
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
|
|
# RUN: llvm-readobj -dyn-symbols %t.so | FileCheck %s
|
|
|
|
# This does not match gold's behavior because gold does not create undefined
|
|
# symbols in dynsym without an appropriate (e.g. PLT) relocation in the input.
|
|
|
|
# CHECK: DynamicSymbols [
|
|
# CHECK-NEXT: Symbol {
|
|
# CHECK-NEXT: Name: @ (0)
|
|
# CHECK-NEXT: Value: 0x0
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Local (0x0)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
# CHECK-NEXT: Section: Undefined (0x0)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: Symbol {
|
|
# CHECK-NEXT: Name: bar@ (1)
|
|
# CHECK-NEXT: Value: 0x0
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Weak (0x2)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
# CHECK-NEXT: Section: Undefined (0x0)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: Symbol {
|
|
# CHECK-NEXT: Name: foo@ (5)
|
|
# CHECK-NEXT: Value: 0x0
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Global (0x1)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
# CHECK-NEXT: Section: Undefined (0x0)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: ]
|
|
|
|
.global foo
|
|
.weak bar
|