Files
clang-p2996/lld/test/MachO/invalid/reserved-section-name.s
Shoaib Meenai 7a4b27609d [lld] Add test suite mode for running LLD main twice
LLD_IN_TEST determines how many times each port's `main` function is
run in each LLD process, and setting LLD_IN_TEST=2 (or higher) is useful
for checking if we're cleaning up and resetting global state correctly.
Add a test suite parameter to enable this easily. There's work in
progress to remove global state (e.g. D108850), but this seems useful in
the interim.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D112898
2021-11-01 14:26:54 -07:00

24 lines
562 B
ArmAsm

## We're intentionally testing fatal errors (for malformed input files), and
## fatal errors aren't supported for testing when main is run twice.
# XFAIL: main-run-twice
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: not %lld -o %t %t.o 2>&1 | FileCheck %s -DFILE=%t.o
# CHECK: error: section from [[FILE]] conflicts with synthetic section __DATA_CONST,__got
.globl _main
.section __DATA_CONST,__got
.space 1
.data
_foo:
.space 1
.text
_main:
## make sure the GOT will be needed
pushq _foo@GOTPCREL(%rip)
ret