brintos

brintos / llvm-project-archived public Read only

0
0
Text · 901 B · 8148b15 Raw
31 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3# RUN: echo "PHDRS {" > %t.script4# RUN: echo " ph_text PT_LOAD FLAGS (0x1 | 0x4);" >> %t.script5# RUN: echo " ph_data PT_LOAD FLAGS (0x2 | 0x4);" >> %t.script6# RUN: echo "}" >> %t.script7# RUN: echo "SECTIONS {" >> %t.script8# RUN: echo " .text : { *(.text*) } : ph_text" >> %t.script9# RUN: echo " . = ALIGN(0x4000);" >> %t.script10# RUN: echo " .got.plt : { BYTE(42); *(.got); } : ph_data" >> %t.script11# RUN: echo "}" >> %t.script12# RUN: ld.lld -T %t.script %t.o -o %t.elf13# RUN: llvm-readelf -l %t.elf | FileCheck %s14 15# CHECK: Section to Segment mapping:16# CHECK-NEXT: Segment Sections...17# CHECK-NEXT: 00 .text executable18# CHECK-NEXT: 01 .got.plt19 20.text21.globl _start22.type _start,@function23_start:24    callq custom_func25    ret26 27.section executable,"ax",@progbits28.type custom_func,@function29custom_func:30    ret31