blob: 3f6a2497d00637ebbdf014101465e2367fc7679c [file] [log] [blame]
George Rimar86ce2672016-08-25 09:05:47 +00001# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3
4# RUN: ld.lld -o %t.out %t --oformat binary
Rui Ueyamab397ab52016-09-02 20:20:04 +00005# RUN: od -t x1 -v %t.out | FileCheck %s
6# CHECK: 000000 90 11 22 00 00 00 00 00
George Rimar86ce2672016-08-25 09:05:47 +00007# CHECK-NOT: 00000010
8
9## Check case when linkerscript is used.
10# RUN: echo "SECTIONS { . = 0x1000; }" > %t.script
11# RUN: ld.lld -o %t2.out --script %t.script %t --oformat binary
Rui Ueyamab397ab52016-09-02 20:20:04 +000012# RUN: od -t x1 -v %t2.out | FileCheck %s
George Rimar86ce2672016-08-25 09:05:47 +000013
14# RUN: not ld.lld -o %t3.out %t --oformat foo 2>&1 \
15# RUN: | FileCheck %s --check-prefix ERR
16# ERR: unknown --oformat value: foo
17
18.text
19.align 4
20.globl _start
21_start:
22 nop
23
24.section .mysec.1,"ax"
25.byte 0x11
26
27.section .mysec.2,"ax"
28.byte 0x22