brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 77670d9 Raw
36 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3 4## SHF_MERGE sections within the same output section can be freely merged.5# RUN: echo 'SECTIONS { .rodata : { *(.rodata.*) }}' > %t.script6# RUN: ld.lld %t.o -T %t.script -o %t7# RUN: llvm-readelf -x .rodata %t | FileCheck --check-prefix=SAME %s --implicit-check-not=section8 9# SAME:      section '.rodata':10# SAME-NEXT: 0x00000000 03000100 020011 12## SHF_MERGE sections with different output sections cannot be merged.13# RUN: echo 'SECTIONS { \14# RUN:   .rodata.foo : { *(.rodata.foo) } \15# RUN:   .rodata.bar : { *(.rodata.bar) } \16# RUN: }' > %t2.script17# RUN: ld.lld %t.o -T %t2.script -o %t218# RUN: llvm-readelf -x .rodata.foo -x .rodata.bar %t2 | FileCheck --check-prefix=DIFF %s --implicit-check-not=section19 20# DIFF:      section '.rodata.foo':21# DIFF-NEXT: 0x00000000 03000100 020022# DIFF:      section '.rodata.bar':23# DIFF-NEXT: 0x00000006 010024 25.section .rodata.foo,"aM",@progbits,2,unique,026.short 127.short 228.section .rodata.foo,"aM",@progbits,2,unique,129.short 130.short 331 32.section .rodata.bar,"aM",@progbits,2,unique,033.short 134.section .rodata.bar,"aM",@progbits,2,unique,135.short 136