[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / eh-frame-pcrel-overflow.s
blob78e804768dad63e6cf3a849009e66556073035b5
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/eh-frame-pcrel-overflow.s -o %t1.o
5 # RUN: ld.lld --eh-frame-hdr -Ttext=0x90000000 %t.o -o /dev/null
6 # RUN: not ld.lld --eh-frame-hdr %t.o %t1.o -o /dev/null 2>&1 | FileCheck %s
7 # CHECK: error: {{.*}}.o:(.eh_frame): PC offset is too large: 0x90001054
9 .text
10 .global _start
11 _start:
12 ret
14 .section .eh_frame,"a",@unwind
15 .long 12 # Size
16 .long 0x00 # ID
17 .byte 0x01 # Version.
19 .byte 0x52 # Augmentation string: 'R','\0'
20 .byte 0x00
22 .byte 0x01
24 .byte 0x01 # LEB128
25 .byte 0x01 # LEB128
27 .byte 0x00 # DW_EH_PE_absptr
29 .byte 0xFF
31 .long 12 # Size
32 .long 0x14 # ID
33 .quad _start + 0x70000000