2 # RUN: llvm-mc -filetype=obj -triple=powerpc %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
6 ## Similar to PPC64, clang/gcc PPC32 may emit a .rela.got2 which references a local symbol
7 ## defined in a discarded .rodata section. Unfortunately, .got2 cannot be placed in a comdat
8 ## because for lwz 3, .LC0-.LTOC(30), we cannot define .LC0 in a different .got2 section.
10 ## Don't error "relocation refers to a discarded section".
12 .section .text.foo,"axG",@progbits,foo,comdat
18 .section .got2,"aw",@progbits
19 .set .LTOC, .got2+32768