1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 3// RUN: ld.lld %t.o -o %t.so -shared 4// RUN: llvm-readobj -S --section-data %t.so | FileCheck %s 5 6 .section .rodata.foo,"aMS",@progbits,1 7 .align 16 8 .asciz "foo" 9 10 .section .rodata.foo2,"aMS",@progbits,1 11 .align 16 12 .asciz "foo" 13 14 .section .rodata.bar,"aMS",@progbits,1 15 .align 16 16 .asciz "bar" 17 18// CHECK: Name: .rodata 19// CHECK-NEXT: Type: SHT_PROGBITS 20// CHECK-NEXT: Flags [ 21// CHECK-NEXT: SHF_ALLOC 22// CHECK-NEXT: SHF_MERGE 23// CHECK-NEXT: SHF_STRINGS 24// CHECK-NEXT: ] 25// CHECK-NEXT: Address: 26// CHECK-NEXT: Offset: 27// CHECK-NEXT: Size: 20 28// CHECK-NEXT: Link: 0 29// CHECK-NEXT: Info: 0 30// CHECK-NEXT: AddressAlignment: 16 31// CHECK-NEXT: EntrySize: 32// CHECK-NEXT: SectionData ( 33// CHECK-NEXT: 0000: 666F6F00 00000000 00000000 00000000 |foo.............| 34// CHECK-NEXT: 0010: 62617200 |bar.| 35// CHECK-NEXT: ) 36 37 .section .rodata2,"aMS",@progbits,1 38 .asciz "foo" 39 40// CHECK: Name: .rodata2 41// CHECK-NEXT: Type: SHT_PROGBITS 42// CHECK-NEXT: Flags [ 43// CHECK-NEXT: SHF_ALLOC 44// CHECK-NEXT: SHF_MERGE 45// CHECK-NEXT: SHF_STRINGS 46// CHECK-NEXT: ] 47// CHECK-NEXT: Address: 48// CHECK-NEXT: Offset: 49// CHECK-NEXT: Size: 4 50// CHECK-NEXT: Link: 0 51// CHECK-NEXT: Info: 0 52// CHECK-NEXT: AddressAlignment: 1 53// CHECK-NEXT: EntrySize: 54// CHECK-NEXT: SectionData ( 55// CHECK-NEXT: 0000: 666F6F00 |foo.| 56// CHECK-NEXT: ) 57