• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
3# RUN: ld.lld --icf=all --print-icf-sections %t -o /dev/null | FileCheck %s -allow-empty
4
5# CHECK-NOT: selected
6
7.macro gen_sections4 z
8        .section .a\z,"ax"
9        .section .b\z,"ax"
10        .section .c\z,"ax"
11        .section .d\z,"ax"
12.endm
13
14.macro gen_sections8 z
15        gen_sections4 a\z
16        gen_sections4 b\z
17.endm
18
19.macro gen_sections16 z
20        gen_sections8 a\z
21        gen_sections8 b\z
22.endm
23
24.macro gen_sections32 x
25        gen_sections16 a\x
26        gen_sections16 b\x
27.endm
28
29.macro gen_sections64 z
30        gen_sections32 a\z
31        gen_sections32 b\z
32.endm
33
34.macro gen_sections128 z
35        gen_sections64 a\z
36        gen_sections64 b\z
37.endm
38
39.macro gen_sections256 z
40        gen_sections128 a\z
41        gen_sections128 b\z
42.endm
43
44.macro gen_sections512 z
45        gen_sections256 a\z
46        gen_sections256 b\z
47.endm
48
49.macro gen_sections1024 z
50        gen_sections512 a\z
51        gen_sections512 b\z
52.endm
53
54.macro gen_sections2048 z
55        gen_sections1024 a\z
56        gen_sections1024 b\z
57.endm
58
59gen_sections2048 a
60
61.global _start
62_start:
63