1# 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 /dev/null 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 20