blob: 31945241a77aa24059c68c6c363261d8b2b989e2 [file] [log] [blame]
James Henderson0018ca82018-01-22 10:58:06 +00001# REQUIRES: x86
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4
5# Sanity check that the link will fail with the undefined error without
6# gc-sections.
7# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
8# CHECK: error: undefined symbol: undefined
9
10# RUN: ld.lld %t.o --gc-sections -o %t
11
12.section .text.unused,"ax",@progbits
13unused:
14 callq undefined
15
16.text
17.global _start
18_start:
19 nop