1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-error.s -o %tabs
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
4
5// We have some code in error reporting to check that
6// section belongs to the output section. Without that
7// check, the linker would crash, so it is useful to test it.
8// And the easy way to do that is to trigger GC. That way .text.dumb
9// be collected and mentioned check will execute.
10
11// RUN: not ld.lld -gc-sections -shared %tabs %t -o /dev/null
12
13.section .text.dumb,"ax"
14 nop
15
16.section .text,"ax"
17.globl _start
18_start:
19  movl $big, %edx
20