1// REQUIRES: x86 2// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux 3// RUN: ld.lld %t.o -o %t.so -shared -O3 --gc-sections 4// RUN: llvm-readobj -S --section-data --symbols %t.so | FileCheck %s 5 6// CHECK: Name: .rodata 7// CHECK-NEXT: Type: SHT_PROGBITS 8// CHECK-NEXT: Flags [ 9// CHECK-NEXT: SHF_ALLOC 10// CHECK-NEXT: SHF_MERGE 11// CHECK-NEXT: SHF_STRINGS 12// CHECK-NEXT: ] 13// CHECK-NEXT: Address: 0x235 14// CHECK-NEXT: Offset: 15// CHECK-NEXT: Size: 4 16// CHECK-NEXT: Link: 0 17// CHECK-NEXT: Info: 0 18// CHECK-NEXT: AddressAlignment: 1 19// CHECK-NEXT: EntrySize: 1 20// CHECK-NEXT: SectionData ( 21// CHECK-NEXT: 0000: 61626300 |abc.| 22// CHECK-NEXT: ) 23 24// CHECK: Symbols [ 25// CHECK: Symbol { 26// CHECK-NOT: Name: bar 27 28 .global foo 29foo: 30 leaq .L.str(%rip), %rsi 31 .section .rodata.str1.1,"aMS",@progbits,1 32.L.str: 33 .asciz "abc" 34bar: 35 .asciz "def" 36