brintos

brintos / llvm-project-archived public Read only

0
0
Text · 663 B · 9b72784 Raw
22 lines · plain
1# REQUIRES: ppc2# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o3# RUN: ld.lld %t.o %t.o -o /dev/null4# RUN: ld.lld -r --fatal-warnings %t.o %t.o -o /dev/null5 6## Similar to PPC64, clang/gcc PPC32 may emit a .rela.got2 which references a local symbol7## defined in a discarded .rodata section. Unfortunately, .got2 cannot be placed in a comdat8## because for lwz 3, .LC0-.LTOC(30), we cannot define .LC0 in a different .got2 section.9 10## Don't error "relocation refers to a discarded section".11 12.section .text.foo,"axG",@progbits,foo,comdat13.globl foo14foo:15 lwz 3, .LC0-.LTOC(30)16.L0:17 18.section .got2,"aw",@progbits19.set .LTOC, .got2+3276820.LC0:21.long .L022