summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/obj-symbol-value.s
blob: 17c072a7567dd9e8e4639fd48f9ca1cfcabaaf89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { foo = bar; .bar : { *(.bar*) } }" > %t.script
# RUN: ld.lld %t.o --script %t.script -o %t.so -shared
# RUN: llvm-readobj --symbols %t.so | FileCheck %s

# CHECK:     Symbol {
# CHECK:      Name: bar
# CHECK-NEXT: Value: 0x[[VAL:.*]]
# CHECK:      Name: foo
# CHECK-NEXT: Value: 0x[[VAL]]

.section .bar.1, "a"
.quad 0

.section .bar.2, "a"
.quad 0
.global bar
bar:
OpenPOWER on IntegriCloud