brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · a4e09c0 Raw
41 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %tfile1.o3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/exclude-multiple1.s -o %tfile2.o4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/exclude-multiple2.s -o %tfile3.o5# RUN: echo "SECTIONS { \6# RUN:   .foo : { *(.foo.1 EXCLUDE_FILE (*file1.o) .foo.2 EXCLUDE_FILE (*file2.o) .foo.3) } \7# RUN:  }" > %t1.script8# RUN: ld.lld -script %t1.script %tfile1.o %tfile2.o %tfile3.o -o %t1.o9# RUN: llvm-objdump -s %t1.o | FileCheck %s10 11## Sections from %tfile1 precede sections from %tfile2 and %tfile3.12## In each file, the sections are added in the original order.13# CHECK:      Contents of section .foo:14# CHECK-NEXT:  03000000 00000000 01000000 0000000015# CHECK-NEXT:  04000000 00000000 05000000 0000000016# CHECK-NEXT:  07000000 00000000 08000000 0000000017# CHECK-NEXT:  09000000 0000000018# CHECK-NEXT: Contents of section .foo.2:19# CHECK-NEXT:  02000000 0000000020# CHECK-NEXT: Contents of section .foo.3:21# CHECK-NEXT:  06000000 0000000022 23# RUN: echo "SECTIONS { .foo : { *(EXCLUDE_FILE (*file1.o) EXCLUDE_FILE (*file2.o) .foo.3) } }" > %t2.script24# RUN: not ld.lld -script %t2.script %tfile1.o %tfile2.o %tfile3.o -o /dev/null 2>&1 | \25# RUN:   FileCheck %s --check-prefix=ERR26# ERR: section pattern is expected27 28# RUN: echo "SECTIONS { .foo : { *(EXCLUDE_FILE (*file1.o)) } }" > %t3.script29# RUN: not ld.lld -script %t3.script %tfile1.o %tfile2.o %tfile3.o -o /dev/null 2>&1 | \30# RUN:   FileCheck %s --check-prefix=ERR31 32.section .foo.2,"a"33 .quad 234 35## %tfile1.o(.foo.3) precedes %tfile.o(.foo.1) in the output section.36.section .foo.3,"a"37 .quad 338 39.section .foo.1,"a"40 .quad 141