[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / comdat-discarded-ppc32.s
blob9b727846db5d4522bee242c8fae79e00d36a752b
1 # REQUIRES: ppc
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
13 .globl foo
14 foo:
15 lwz 3, .LC0-.LTOC(30)
16 .L0:
18 .section .got2,"aw",@progbits
19 .set .LTOC, .got2+32768
20 .LC0:
21 .long .L0