46 lines · plain
1# REQUIRES: x86,mips2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/data-commands.s -o %t.o3# RUN: ld.lld -o %t %t.o --script %s4# RUN: llvm-objdump -s %t | FileCheck %s5 6SECTIONS {7 .foo : {8 *(.foo.1)9 BYTE(0x11)10 *(.foo.2)11 SHORT(0x1122)12 *(.foo.3)13 LONG(0x11223344)14 *(.foo.4)15 QUAD(0x1122334455667788)16 }17 .bar : {18 *(.bar.1)19 BYTE(a + 1)20 *(.bar.2)21 SHORT(b)22 *(.bar.3)23 LONG(c + 2)24 *(.bar.4)25 QUAD(d)26 }27}28 29# CHECK: Contents of section .foo:30# CHECK-NEXT: ff11ff22 11ff4433 2211ff88 7766554431# CHECK-NEXT: 33221132 33# CHECK: Contents of section .bar:34# CHECK-NEXT: ff12ff22 11ff4633 2211ff88 7766554435# CHECK-NEXT: 33221136 37# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %p/Inputs/data-commands.s -o %t2.o38# RUN: ld.lld --script %s %t2.o -o %t239# RUN: llvm-objdump -s %t2 | FileCheck --check-prefix=BIGENDIAN %s40# BIGENDIAN: Contents of section .foo:41# BIGENDIAN-NEXT: ff11ff11 22ff1122 3344ff11 2233445542# BIGENDIAN-NEXT: 66778843# BIGENDIAN-NEXT: Contents of section .bar:44# BIGENDIAN-NEXT: ff12ff11 22ff1122 3346ff11 2233445545# BIGENDIAN-NEXT: 66778846