brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 0f3c7b8 Raw
37 lines · plain
1# REQUIRES: x862## Test that input SHT_REL[A] retained by --emit-relocs are not matched by input section descriptions.3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o5# RUN: echo "SECTIONS { .rela.dyn : { *(.rela.data) } }" > %t.script6# RUN: ld.lld --hash-style=sysv -T %t.script --emit-relocs %t.o -o %t.so -shared7# RUN: llvm-readobj -r %t.so | FileCheck %s8 9## .rela.data is not listed, but don't error.10# RUN: echo 'SECTIONS { \11# RUN:   .dynsym : { *(.dynsym) } \12# RUN:   .gnu.hash : { *(.gnu.hash) } \13# RUN:   .hash : { *(.hash) } \14# RUN:   .dynstr : { *(.dynstr) } \15# RUN:   .dynamic : { *(.dynamic) } \16# RUN:   .rela.dyn : { *(.rela.dyn) } \17# RUN:   .text : { *(.text) } \18# RUN:   .data : { *(.data) } \19# RUN:   .comment : { *(.comment) } \20# RUN:   .symtab : { *(.symtab) } \21# RUN:   .shstrtab : { *(.shstrtab) } \22# RUN:   .strtab : { *(.strtab) } \23# RUN:  }' > %t1.script24# RUN: ld.lld -T %t1.script -shared --emit-relocs %t.o --orphan-handling=error -o /dev/null25 26.data27.quad .foo28 29# CHECK:      Relocations [30# CHECK-NEXT:   Section ({{.*}}) .rela.dyn {31# CHECK-NEXT:     0xF8 R_X86_64_64 .foo 0x032# CHECK-NEXT:   }33# CHECK-NEXT:   Section ({{.*}}) .rela.data {34# CHECK-NEXT:     0xF8 R_X86_64_64 .foo 0x035# CHECK-NEXT:   }36# CHECK-NEXT: ]37