54 lines · plain
1# REQUIRES: x862## Sections in an INSERT command are in a unit. Their order is preserved.3 4# RUN: split-file %s %t5# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o6# RUN: ld.lld -T %t/a.lds %t/a.o -o %t17# RUN: llvm-readelf -S -l %t1 | FileCheck %s8 9# CHECK: Name10# CHECK-NEXT: NULL11# CHECK-NEXT: text.312# CHECK-NEXT: text.413# CHECK-NEXT: text.514# CHECK-NEXT: .text15# CHECK-NEXT: .data16# CHECK-NEXT: text.617# CHECK-NEXT: text.718# CHECK-NEXT: text.819# CHECK-NEXT: text.020# CHECK-NEXT: text.121# CHECK-NEXT: text.222 23#--- a.lds24SECTIONS {25 text.0 : {}26 text.1 : {}27 text.2 : {}28} INSERT AFTER .data;29 30SECTIONS {31 text.3 : {}32 text.4 : {}33 text.5 : {}34} INSERT BEFORE .text;35 36SECTIONS {37 text.6 : {}38 text.7 : {}39 text.8 : {}40} INSERT AFTER .data;41 42#--- a.s43.text; nop44.section text.0,"ax"; nop45.section text.1,"ax"; nop46.section text.2,"ax"; nop47.section text.3,"ax"; nop48.section text.4,"ax"; nop49.section text.5,"ax"; nop50.section text.6,"ax"; nop51.section text.7,"ax"; nop52.section text.8,"ax"; nop53.data; .byte 054