1# REQUIRES: ppc 2# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o 3# RUN: ld.lld %t.o %t.o -o /dev/null 4# RUN: ld.lld -r --fatal-warnings %t.o %t.o -o /dev/null 5 6## clang/gcc PPC64 may emit a .rela.toc which references a switch table in a 7## discarded .rodata/.text section. The .toc and the .rela.toc are incorrectly 8## not placed in the comdat. 9## Don't error "relocation refers to a discarded section". 10 11.section .text.foo,"axG",@progbits,foo,comdat 12.globl foo 13foo: 14.L0: 15 16.section .toc,"aw" 17.quad .L0 18