1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/data-commands.s -o %t.o
3# RUN: ld.lld -o %t %t.o --script %s
4# RUN: llvm-objdump -s %t | FileCheck %s
5
6MEMORY {
7  rom (rwx) : ORIGIN = 0x00, LENGTH = 2K
8}
9
10SECTIONS {
11  .foo : {
12    *(.foo.1)
13    BYTE(0x11)
14    *(.foo.2)
15    SHORT(0x1122)
16    *(.foo.3)
17    LONG(0x11223344)
18    *(.foo.4)
19    QUAD(0x1122334455667788)
20  } > rom
21
22  .bar : {
23    *(.bar.1)
24    BYTE(a + 1)
25    *(.bar.2)
26    SHORT(b)
27    *(.bar.3)
28    LONG(c + 2)
29    *(.bar.4)
30    QUAD(d)
31  } > rom
32}
33
34# CHECK:      Contents of section .foo:
35# CHECK-NEXT:   0000 ff11ff22 11ff4433 2211ff88 77665544
36# CHECK-NEXT:   0010 332211
37
38# CHECK:      Contents of section .bar:
39# CHECK-NEXT:   0013 ff12ff22 11ff4633 2211ff88 77665544
40# CHECK-NEXT:   0023 332211
41