]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/linkerscript/sections-sort.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / linkerscript / sections-sort.s
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3
4 # RUN: echo "SECTIONS { .text : {*(.text)} foo : {*(foo)}}" > %t.script
5 # RUN: ld.lld --hash-style=sysv -o %t --script %t.script %t.o -shared
6 # RUN: llvm-objdump --section-headers %t | FileCheck  %s
7
8 # Test the section order. This is a case where at least with libstdc++'s
9 # stable_sort we used to get a different result.
10
11 nop
12
13 .section foo, "a"
14 .byte 0
15
16 # CHECK: Idx
17 # CHECK-NEXT: 0
18 # CHECK-NEXT: 1 .text
19 # CHECK-NEXT: 2 .dynsym
20 # CHECK-NEXT: 3 .hash
21 # CHECK-NEXT: 4 .dynstr
22 # CHECK-NEXT: 5 foo
23 # CHECK-NEXT: 6 .dynamic
24 # CHECK-NEXT: 7 .comment
25 # CHECK-NEXT: 8 .symtab
26 # CHECK-NEXT: 9 .shstrtab
27 # CHECK-NEXT: 10 .strtab