brintos

brintos / llvm-project-archived public Read only

0
0
Text · 694 B · a6c627f Raw
18 lines · plain
1# REQUIRES: x862## PR48357: If .rela.dyn appears as an output section description, its type may3## be SHT_RELA (due to the empty synthetic .rela.plt) while there is no input4## section. The empty .rela.dyn may be retained due to a reference. Don't crash.5 6# RUN: llvm-mc -filetype=obj -triple=x86_64 /dev/null -o %t.o7# RUN: ld.lld -shared --emit-relocs -T %s %t.o -o %t8# RUN: llvm-readelf -S %t | FileCheck %s9 10## Note, sh_link of such an empty .rela.dyn is 0.11# CHECK: Name      Type Address          Off    Size   ES Flg Lk Inf Al12# CHECK: .rela.dyn RELA 0000000000000000 001000 000000 18   A  0   0  813 14SECTIONS {15  .rela.dyn : { *(.rela*) }16  __rela_offset = ABSOLUTE(ADDR(.rela.dyn));17}18