[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / icf10.s
blobff926d0e16b103d5d0e37c61cad9085e18f88117
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=i686 %s -o %t.o
4 # RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %s -o %t.o
6 # RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
8 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o --crel
9 # RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
11 # Checks that ICF does not merge 2 sections the offset of
12 # the relocations of which differ.
14 # CHECK-NOT: selected
16 .section .text.orig,"ax"
17 .quad -1
19 .section .text.foo,"ax"
20 .quad -1
21 .reloc 0, BFD_RELOC_NONE, 0
23 .section .text.bar,"ax"
24 .quad -1
25 .reloc 1, BFD_RELOC_NONE, 0