llvm-project/lld/test/MachO/sectcreate.s
Jez Ng 643ec67a64 [lld-macho] Always include custom syslibroot when running tests
This greatly reduces the amount of boilerplate in our tests.

Reviewed By: #lld-macho, compnerd

Differential Revision: https://reviews.llvm.org/D87960
2020-09-25 11:28:36 -07:00

32 lines
750 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: echo "-sectcreate 1.1" >%t1
# RUN: echo "-sectcreate 1.2" >%t2
# RUN: echo "-sectcreate 2" >%t3
# RUN: %lld \
# RUN: -sectcreate SEG SEC1 %t1 \
# RUN: -sectcreate SEG SEC2 %t3 \
# RUN: -sectcreate SEG SEC1 %t2 \
# RUN: -o %t %t.o
# RUN: llvm-objdump -s %t | FileCheck %s
# CHECK: Contents of section __TEXT,__text:
# CHECK: Contents of section __DATA,__data:
# CHECK: my string!.
# CHECK: Contents of section SEG,SEC1:
# CHECK: -sectcreate 1.1.
# CHECK: -sectcreate 1.2.
# CHECK: Contents of section SEG,SEC2:
# CHECK: -sectcreate 2.
.text
.global _main
_main:
mov $0, %eax
ret
.data
.global my_string
my_string:
.string "my string!"