xref: /llvm-project/lld/test/MachO/invalid/reserved-section-name.s (revision 7a4b27609d450d70fb072306446b1c0414066b74)
1## We're intentionally testing fatal errors (for malformed input files), and
2## fatal errors aren't supported for testing when main is run twice.
3# XFAIL: main-run-twice
4
5# REQUIRES: x86
6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
7# RUN: not %lld -o %t %t.o 2>&1 | FileCheck %s -DFILE=%t.o
8# CHECK: error: section from [[FILE]] conflicts with synthetic section __DATA_CONST,__got
9
10.globl _main
11
12.section __DATA_CONST,__got
13.space 1
14
15.data
16_foo:
17.space 1
18
19.text
20_main:
21## make sure the GOT will be needed
22  pushq _foo@GOTPCREL(%rip)
23  ret
24