[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / synthetic-relsec-layout.s
blobefaa946cbaa94a5568b08877ed545c97348c0550
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "SECTIONS { .foo : { *(.rela.dyn) } }" > %t.script
4 # RUN: ld.lld -T %t.script %t.o -o %t.so -shared
5 # RUN: llvm-readobj -r %t.so | FileCheck %s
7 # Check we are able to do custom layout for synthetic sections.
8 # (here we check we can place synthetic .rela.dyn into .foo).
10 # CHECK: Relocations [
11 # CHECK: Section ({{.*}}) .foo {
12 # CHECK: R_X86_64_64 .foo 0x0
13 # CHECK: }
15 .data
16 .quad .foo