• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4# RUN: ld.lld %t.o -o %t --icf=all --ignore-data-address-equality --print-icf-sections | FileCheck -allow-empty --check-prefix=NOICF %s
5# RUN: llvm-readobj -S --section-data %t | FileCheck %s
6
7# Check that merge synthetic sections are not merged by ICF.
8
9# NOICF-NOT: selected section <internal>:(.rodata)
10
11# CHECK:      Name: .rodata
12# CHECK-NEXT: Type: SHT_PROGBITS
13# CHECK-NEXT: Flags [
14# CHECK-NEXT:   SHF_ALLOC
15# CHECK-NEXT:   SHF_MERGE
16# CHECK-NEXT: ]
17# CHECK-NEXT: Address:
18# CHECK-NEXT: Offset:
19# CHECK-NEXT: Size: 16
20# CHECK-NEXT: Link:
21# CHECK-NEXT: Info:
22# CHECK-NEXT: AddressAlignment: 1
23# CHECK-NEXT: EntrySize: 0
24# CHECK-NEXT: SectionData (
25# CHECK-NEXT:   0000: 67452301 10325476 67452301 10325476
26
27.section .rodata.cst4,"aM",@progbits,4
28rodata4:
29  .long 0x01234567
30  .long 0x76543210
31  .long 0x01234567
32  .long 0x76543210
33
34.section .rodata.cst8,"aM",@progbits,8
35rodata8:
36  .long 0x01234567
37  .long 0x76543210
38