brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 8573974 Raw
40 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3 4## Test that section .foo is not placed in any segment when assigned to segment5## NONE in the linker script and segment NONE is not defined.6# RUN: echo "PHDRS {text PT_LOAD;} \7# RUN:       SECTIONS { \8# RUN:           .text : {*(.text .text*)} :text \9# RUN:           .foo : {*(.foo)} :NONE \10# RUN:       }" > %t.script11# RUN: ld.lld -o %t --script %t.script %t.o12# RUN: llvm-readelf -S -l %t | FileCheck %s13 14## Test that section .foo is placed in segment NONE when assigned to segment15## NONE in the linker script and segment NONE is defined.16# RUN: echo "PHDRS {text PT_LOAD; NONE PT_LOAD;} \17# RUN:       SECTIONS { \18# RUN:           .text : {*(.text .text*)} :text \19# RUN:           .foo : {*(.foo)} :NONE \20# RUN:       }" > %t.script21# RUN: ld.lld -o %t --script %t.script %t.o22# RUN: llvm-readelf -S -l %t | FileCheck --check-prefix=DEFINED %s23 24# CHECK: Section to Segment mapping:25# CHECK-NEXT: Segment Sections...26# CHECK: None {{.*}}.foo27 28# DEFINED: Section to Segment mapping:29# DEFINED-NEXT: Segment Sections...30# DEFINED-NEXT:  00     .text31# DEFINED-NEXT:  01     .foo32 33.global _start34_start:35 nop36 37.section .foo,"a"38foo:39 .long 040