[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / merge-entsize.s
blobf45b334f63656cf84641220e99c16ffabadad58f
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 -M | FileCheck %s --check-prefix=MAP
4 // RUN: llvm-readobj -S %t | FileCheck %s
6 // MAP: .rodata{{$}}
7 // MAP-NEXT: <internal>:(.rodata.1)
8 // MAP-NEXT: <internal>:(.rodata.2)
10 .section .rodata.1,"aM",@progbits,1
11 .p2align 2
12 .byte 0x42
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,3
17 .p2align 2
18 .short 0x42
19 .byte 0
21 // Since the output section has both .rodata.1 and .rodata.2, it
22 // contains elements of different sizes and we use an entsize of 0.
24 // CHECK: Name: .rodata (
25 // CHECK-NEXT: Type: SHT_PROGBITS
26 // CHECK-NEXT: Flags [
27 // CHECK-NEXT: SHF_ALLOC
28 // CHECK-NEXT: SHF_MERGE
29 // 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: 4
36 // CHECK-NEXT: EntrySize: 0