[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / basic-freebsd.s
bloba34f568bbcf81a326c6dc300e11966d3222963bb
1 # REQUIRES: x86
2 # Verify that OSABI is set to the correct value.
4 # RUN: rm -rf %t && split-file %s %t && cd %t
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 empty.s -o empty.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd a.s -o a.o
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-linux gnu.s -o gnu.o
8 # RUN: ld.lld a.o -o out
9 # RUN: llvm-readobj --file-headers out | FileCheck %s
10 # RUN: ld.lld empty.o a.o gnu.o empty.o -o out2
11 # RUN: llvm-readobj --file-headers out2 | FileCheck %s
13 #--- empty.s
14 #--- a.s
15 .globl _start
16 _start:
17 mov $1, %rax
18 mov $42, %rdi
19 syscall
20 #--- gnu.s
21 .section retain,"aR"
23 # CHECK: ElfHeader {
24 # CHECK-NEXT: Ident {
25 # CHECK-NEXT: Magic: (7F 45 4C 46)
26 # CHECK-NEXT: Class: 64-bit (0x2)
27 # CHECK-NEXT: DataEncoding: LittleEndian (0x1)
28 # CHECK-NEXT: FileVersion: 1
29 # CHECK-NEXT: OS/ABI: FreeBSD (0x9)
30 # CHECK-NEXT: ABIVersion: 0
31 # CHECK-NEXT: Unused: (00 00 00 00 00 00 00)
32 # CHECK-NEXT: }
33 # CHECK-NEXT: Type: Executable (0x2)
34 # CHECK-NEXT: Machine: EM_X86_64 (0x3E)