brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 811c000 Raw
35 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t3# RUN: echo "SECTIONS { \4# RUN:  .text : { *(.text) } \5# RUN:  . = 0x1000; .aaa : ONLY_IF_RO { *(.aaa.*) } \6# RUN:  . = 0x2000; .aaa : ONLY_IF_RW { *(.aaa.*) } } " > %t.script7# RUN: ld.lld -o %t1 --script %t.script %t8# RUN: llvm-objdump --section-headers %t1 | FileCheck %s9 10# CHECK:      Sections:11# CHECK-NEXT: Idx Name          Size      VMA          Type12# CHECK: .aaa          00000010 0000000000002000 DATA13 14 15# RUN: echo "SECTIONS { \16# RUN:  .text : { *(.text) } \17# RUN:  . = 0x1000; .aaa : ONLY_IF_RW { *(.aaa.*) } \18# RUN:  . = 0x2000; .aaa : ONLY_IF_RO { *(.aaa.*) } } " > %t2.script19# RUN: ld.lld -o %t2 --script %t2.script %t20# RUN: llvm-objdump --section-headers %t2 | FileCheck %s --check-prefix=REV21 22# REV:      Sections:23# REV-NEXT: Idx Name          Size       VMA          Type24# REV:  .aaa          00000010 0000000000001000 DATA25 26.global _start27_start:28 nop29 30.section .aaa.1, "aw"31.quad 132 33.section .aaa.2, "aw"34.quad 135