2015-10-21 06:08:49 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2015-11-18 14:11:01 +08:00
|
|
|
// RUN: ld.lld %t.o -o %t.so -shared
|
2020-08-25 22:54:34 +08:00
|
|
|
// RUN: llvm-readelf --symbols -S %t.so | FileCheck %s
|
2015-10-21 06:08:49 +08:00
|
|
|
|
|
|
|
.section .rodata.cst4,"aM",@progbits,4
|
|
|
|
.short 0
|
|
|
|
foo:
|
|
|
|
.short 42
|
|
|
|
|
2020-08-25 22:54:34 +08:00
|
|
|
.short 0
|
|
|
|
bar:
|
|
|
|
.short 42
|
2015-10-21 06:08:49 +08:00
|
|
|
|
2020-08-25 22:54:34 +08:00
|
|
|
// CHECK: Name Type Address {{.*}} ES Flg
|
|
|
|
// CHECK: .rodata PROGBITS [[#%x, ADDR:]] {{.*}} 04 AM{{ }}
|
2015-10-21 06:08:49 +08:00
|
|
|
|
2020-08-25 22:54:34 +08:00
|
|
|
// CHECK: Symbol table '.symtab' contains {{.*}} entries:
|
|
|
|
// CHECK-NEXT: Num: Value {{.*}} Name
|
|
|
|
// CHECK-DAG: {{.*}}: {{0*}}[[#ADDR+2]] {{.*}} foo
|
|
|
|
// CHECK-DAG: {{.*}}: {{0*}}[[#ADDR+2]] {{.*}} bar
|