diff --git a/lld/test/ELF/eh-frame-value-format1.s b/lld/test/ELF/eh-frame-value-format1.s new file mode 100644 index 000000000000..1190244afbae --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format1.s @@ -0,0 +1,35 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x14 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x04 # DW_EH_PE_udata8 + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + + .byte 0xFF diff --git a/lld/test/ELF/eh-frame-value-format2.s b/lld/test/ELF/eh-frame-value-format2.s new file mode 100644 index 000000000000..988d5088116e --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format2.s @@ -0,0 +1,35 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x14 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x04 # DW_EH_PE_sdata8 + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + + .byte 0xFF diff --git a/lld/test/ELF/eh-frame-value-format3.s b/lld/test/ELF/eh-frame-value-format3.s new file mode 100644 index 000000000000..dd0d853aa5b5 --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format3.s @@ -0,0 +1,28 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x0E + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x0A # DW_EH_PE_sdata2 + .byte 0xFF + .byte 0xFF + .byte 0xFF diff --git a/lld/test/ELF/eh-frame-value-format4.s b/lld/test/ELF/eh-frame-value-format4.s new file mode 100644 index 000000000000..404a86050248 --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format4.s @@ -0,0 +1,28 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x0E + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x02 # DW_EH_PE_udata2 + .byte 0xFF + .byte 0xFF + .byte 0xFF diff --git a/lld/test/ELF/eh-frame-value-format5.s b/lld/test/ELF/eh-frame-value-format5.s new file mode 100644 index 000000000000..ef48087c3ec3 --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format5.s @@ -0,0 +1,35 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x14 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x08 # DW_EH_PE_signed + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + + .byte 0xFF diff --git a/lld/test/ELF/eh-frame-value-format6.s b/lld/test/ELF/eh-frame-value-format6.s new file mode 100644 index 000000000000..ef48087c3ec3 --- /dev/null +++ b/lld/test/ELF/eh-frame-value-format6.s @@ -0,0 +1,35 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t +# RUN: ld.lld --eh-frame-hdr %t -o %t2 + +.section .eh_frame + .byte 0x14 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x08 # DW_EH_PE_signed + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + .byte 0xFF + + .byte 0xFF