brintos

brintos / llvm-project-archived public Read only

0
0
Text · 796 B · dc2c823 Raw
37 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: echo "PHDRS { \4# RUN:   exec PT_LOAD FLAGS(0x4 | 0x1); \5# RUN: } \6# RUN: SECTIONS { \7# RUN:  .text : { *(.text) } :exec \8# RUN:  .foo : { *(.foo) } \9# RUN:  .bar : { *(.bar) } \10# RUN:  /DISCARD/ : { *(.discard) } :NONE \11# RUN: }" > %t.script12# RUN: ld.lld -o %t --script %t.script %t.o13# RUN: llvm-readelf -S -l %t | FileCheck --implicit-check-not=/DISCARD/ %s14 15## Check that /DISCARD/ does not interfere with the assignment of segments to16## sections.17 18# CHECK: Section Headers19# CHECK: .text20# CHECK-NEXT: .foo21# CHECK-NEXT: .bar22 23# CHECK: Segment Sections24# CHECK-NEXT: .text .foo .bar25 26.section .text,"ax"27 ret28 29.section .foo,"a"30 .byte 031 32.section .bar,"ax"33 ret34 35.section .discard36 .byte 037