37 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3// RUN: ld.lld %t.o -o %t -M | FileCheck %s --check-prefix=MAP4// RUN: llvm-readobj -S %t | FileCheck %s5 6// MAP: .rodata{{$}}7// MAP-NEXT: <internal>:(.rodata.1)8// MAP-NEXT: <internal>:(.rodata.2)9 10 .section .rodata.1,"aM",@progbits,111 .p2align 212 .byte 0x4213 14// sh_addralign = 4 while sh_entsize = 3.15// sh_entsize is not necessarily a power of 2 and it can be unrelated to sh_addralign.16 .section .rodata.2,"aM",@progbits,317 .p2align 218 .short 0x4219 .byte 020 21// Since the output section has both .rodata.1 and .rodata.2, it22// contains elements of different sizes and we use an entsize of 0.23 24// CHECK: Name: .rodata (25// CHECK-NEXT: Type: SHT_PROGBITS26// CHECK-NEXT: Flags [27// CHECK-NEXT: SHF_ALLOC28// CHECK-NEXT: SHF_MERGE29// CHECK-NEXT: ]30// CHECK-NEXT: Address:31// CHECK-NEXT: Offset:32// CHECK-NEXT: Size:33// CHECK-NEXT: Link:34// CHECK-NEXT: Info:35// CHECK-NEXT: AddressAlignment: 436// CHECK-NEXT: EntrySize: 037