diff options
Diffstat (limited to 'test/ELF/Inputs')
28 files changed, 169 insertions, 64 deletions
diff --git a/test/ELF/Inputs/corrupt-version-reference.so b/test/ELF/Inputs/corrupt-version-reference.so Binary files differnew file mode 100644 index 000000000..ef6adc6a0 --- /dev/null +++ b/test/ELF/Inputs/corrupt-version-reference.so diff --git a/test/ELF/Inputs/ctors_dtors_priority1.s b/test/ELF/Inputs/ctors_dtors_priority1.s index 2eb19d7ed..2102dba27 100644 --- a/test/ELF/Inputs/ctors_dtors_priority1.s +++ b/test/ELF/Inputs/ctors_dtors_priority1.s @@ -1,5 +1,5 @@ .section .ctors, "aw", @progbits - .byte 0xA1 + .quad 0xA1 .section .dtors, "aw", @progbits - .byte 0xA2 + .quad 0xA2 diff --git a/test/ELF/Inputs/ctors_dtors_priority2.s b/test/ELF/Inputs/ctors_dtors_priority2.s index fb85ce87c..e94b15e2b 100644 --- a/test/ELF/Inputs/ctors_dtors_priority2.s +++ b/test/ELF/Inputs/ctors_dtors_priority2.s @@ -1,5 +1,5 @@ .section .ctors, "aw", @progbits - .byte 0xB1 + .quad 0xB1 .section .dtors, "aw", @progbits - .byte 0xB2 + .quad 0xB2 diff --git a/test/ELF/Inputs/ctors_dtors_priority3.s b/test/ELF/Inputs/ctors_dtors_priority3.s index 96418d351..7bba90cc7 100644 --- a/test/ELF/Inputs/ctors_dtors_priority3.s +++ b/test/ELF/Inputs/ctors_dtors_priority3.s @@ -1,5 +1,5 @@ .section .ctors, "aw", @progbits - .byte 0xC1 + .quad 0xC1 .section .dtors, "aw", @progbits - .byte 0xC2 + .quad 0xC2 diff --git a/test/ELF/Inputs/dso-undef-size.s b/test/ELF/Inputs/dso-undef-size.s new file mode 100644 index 000000000..424f56f82 --- /dev/null +++ b/test/ELF/Inputs/dso-undef-size.s @@ -0,0 +1,4 @@ +.text +.global foo +.size foo, 4 +foo: diff --git a/test/ELF/Inputs/dynamic-list-weak-archive.s b/test/ELF/Inputs/dynamic-list-weak-archive.s new file mode 100644 index 000000000..dd28fcbd5 --- /dev/null +++ b/test/ELF/Inputs/dynamic-list-weak-archive.s @@ -0,0 +1,2 @@ +.globl foo +foo: diff --git a/test/ELF/Inputs/eh-frame.s b/test/ELF/Inputs/eh-frame.s new file mode 100644 index 000000000..0aa4008b7 --- /dev/null +++ b/test/ELF/Inputs/eh-frame.s @@ -0,0 +1,3 @@ +.cfi_startproc +.cfi_def_cfa_offset 32 +.cfi_endproc diff --git a/test/ELF/Inputs/exclude-libs.s b/test/ELF/Inputs/exclude-libs.s new file mode 100644 index 000000000..6d05c5e3a --- /dev/null +++ b/test/ELF/Inputs/exclude-libs.s @@ -0,0 +1,3 @@ +.globl fn +fn: + nop diff --git a/test/ELF/Inputs/gdb-index-a.elf b/test/ELF/Inputs/gdb-index-a.elf Binary files differdeleted file mode 100644 index 9b90b0dc2..000000000 --- a/test/ELF/Inputs/gdb-index-a.elf +++ /dev/null diff --git a/test/ELF/Inputs/gdb-index-b.elf b/test/ELF/Inputs/gdb-index-b.elf Binary files differdeleted file mode 100644 index b3356d8c7..000000000 --- a/test/ELF/Inputs/gdb-index-b.elf +++ /dev/null diff --git a/test/ELF/Inputs/gdb-index.s b/test/ELF/Inputs/gdb-index.s new file mode 100644 index 000000000..907a66d35 --- /dev/null +++ b/test/ELF/Inputs/gdb-index.s @@ -0,0 +1,73 @@ +.text +.Ltext0: +.globl main2 +.type main2, @function +main2: + nop + nop +.Letext0: + +.section .debug_info,"",@progbits +.long 0x30 +.value 0x4 +.long 0 +.byte 0x8 +.uleb128 0x1 +.quad .Ltext0 +.quad .Letext0-.Ltext0 +.long 0 +.long 0 +.long 0 +.long 0 +.byte 0x63 +.byte 0x88 +.byte 0xb4 +.byte 0x61 +.byte 0xaa +.byte 0xb6 +.byte 0xb0 +.byte 0x67 + +.section .debug_abbrev,"",@progbits +.uleb128 0x1 +.uleb128 0x11 +.byte 0 +.uleb128 0x11 +.uleb128 0x1 +.uleb128 0x12 +.uleb128 0x7 +.uleb128 0x10 +.uleb128 0x17 +.uleb128 0x2130 +.uleb128 0xe +.uleb128 0x1b +.uleb128 0xe +.uleb128 0x2134 +.uleb128 0x19 +.uleb128 0x2133 +.uleb128 0x17 +.uleb128 0x2131 +.uleb128 0x7 +.byte 0 +.byte 0 +.byte 0 + +.section .debug_gnu_pubnames,"",@progbits +.long 0x18 +.value 0x2 +.long 0 +.long 0x33 +.long 0x18 +.byte 0x30 +.string "main2" +.long 0 + +.section .debug_gnu_pubtypes,"",@progbits +.long 0x17 +.value 0x2 +.long 0 +.long 0x33 +.long 0x2b +.byte 0x90 +.string "int" +.long 0 diff --git a/test/ELF/Inputs/gnu-ifunc-dso.s b/test/ELF/Inputs/gnu-ifunc-dso.s new file mode 100644 index 000000000..bd8271871 --- /dev/null +++ b/test/ELF/Inputs/gnu-ifunc-dso.s @@ -0,0 +1,3 @@ +.type foo STT_GNU_IFUNC +.globl foo +foo: diff --git a/test/ELF/Inputs/mips-micro.s b/test/ELF/Inputs/mips-micro.s new file mode 100644 index 000000000..0d0b11f6f --- /dev/null +++ b/test/ELF/Inputs/mips-micro.s @@ -0,0 +1,12 @@ + .text + .set micromips + .global foo + .type foo,@function +foo: + nop + + .set nomicromips + .global bar + .type bar,@function +bar: + nop diff --git a/test/ELF/Inputs/symver-archive1.s b/test/ELF/Inputs/symver-archive1.s new file mode 100644 index 000000000..be7c64494 --- /dev/null +++ b/test/ELF/Inputs/symver-archive1.s @@ -0,0 +1,6 @@ +.text +.globl x +.type x, @function +x: + +.symver x, xx@@VER diff --git a/test/ELF/Inputs/symver-archive2.s b/test/ELF/Inputs/symver-archive2.s new file mode 100644 index 000000000..a9b9d0b0a --- /dev/null +++ b/test/ELF/Inputs/symver-archive2.s @@ -0,0 +1 @@ +call xx@PLT diff --git a/test/ELF/Inputs/undefined-error.s b/test/ELF/Inputs/undefined-error.s new file mode 100644 index 000000000..84ac4f121 --- /dev/null +++ b/test/ELF/Inputs/undefined-error.s @@ -0,0 +1 @@ +callq fmod@PLT diff --git a/test/ELF/Inputs/verdef-defaultver.s b/test/ELF/Inputs/verdef-defaultver.s index 6664d62c9..d9e7f3829 100644 --- a/test/ELF/Inputs/verdef-defaultver.s +++ b/test/ELF/Inputs/verdef-defaultver.s @@ -1,4 +1,7 @@ +.global b@V1 b@V1 = b_1 + +.global b@@V2 b@@V2 = b_2 .globl a diff --git a/test/ELF/Inputs/verneed.so.sh b/test/ELF/Inputs/verneed.so.sh deleted file mode 100755 index 3423f678e..000000000 --- a/test/ELF/Inputs/verneed.so.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -eu - -# This script was used to produce the verneed{1,2}.so files. - -tmp=$(mktemp -d) - -echo "v1 {}; v2 {}; v3 {}; { local: *; };" > $tmp/verneed.script - -cat > $tmp/verneed1.s <<eof -.globl f1_v1 -f1_v1: -ret - -.globl f1_v2 -f1_v2: -ret - -.globl f1_v3 -f1_v3: -ret - -.symver f1_v1, f1@v1 -.symver f1_v2, f1@v2 -.symver f1_v3, f1@@v3 - -.globl f2_v1 -f2_v1: -ret - -.globl f2_v2 -f2_v2: -ret - -.symver f2_v1, f2@v1 -.symver f2_v2, f2@@v2 - -.globl f3_v1 -f3_v1: -ret - -.symver f3_v1, f3@v1 -eof - -as -o $tmp/verneed1.o $tmp/verneed1.s -ld.gold -shared -o verneed1.so $tmp/verneed1.o --version-script $tmp/verneed.script -soname verneed1.so.0 - -cat > $tmp/verneed2.s <<eof -.globl g1_v1 -g1_v1: -ret - -.symver g1_v1, g1@@v1 -eof - -as -o $tmp/verneed2.o $tmp/verneed2.s -ld.gold -shared -o verneed2.so $tmp/verneed2.o --version-script $tmp/verneed.script -soname verneed2.so.0 - -rm -rf $tmp diff --git a/test/ELF/Inputs/verneed1.s b/test/ELF/Inputs/verneed1.s new file mode 100644 index 000000000..a342d7dd7 --- /dev/null +++ b/test/ELF/Inputs/verneed1.s @@ -0,0 +1,32 @@ +.globl f1_v1 +f1_v1: +ret + +.globl f1_v2 +f1_v2: +ret + +.globl f1_v3 +f1_v3: +ret + +.symver f1_v1, f1@v1 +.symver f1_v2, f1@v2 +.symver f1_v3, f1@@v3 + +.globl f2_v1 +f2_v1: +ret + +.globl f2_v2 +f2_v2: +ret + +.symver f2_v1, f2@v1 +.symver f2_v2, f2@@v2 + +.globl f3_v1 +f3_v1: +ret + +.symver f3_v1, f3@v1 diff --git a/test/ELF/Inputs/verneed1.so b/test/ELF/Inputs/verneed1.so Binary files differdeleted file mode 100755 index 744852b96..000000000 --- a/test/ELF/Inputs/verneed1.so +++ /dev/null diff --git a/test/ELF/Inputs/verneed2.s b/test/ELF/Inputs/verneed2.s new file mode 100644 index 000000000..1b46de688 --- /dev/null +++ b/test/ELF/Inputs/verneed2.s @@ -0,0 +1,5 @@ +.globl g1_v1 +g1_v1: +ret + +.symver g1_v1, g1@@v1 diff --git a/test/ELF/Inputs/verneed2.so b/test/ELF/Inputs/verneed2.so Binary files differdeleted file mode 100755 index ba6c05ee6..000000000 --- a/test/ELF/Inputs/verneed2.so +++ /dev/null diff --git a/test/ELF/Inputs/version-script-no-warn2.s b/test/ELF/Inputs/version-script-no-warn2.s new file mode 100644 index 000000000..59de9d470 --- /dev/null +++ b/test/ELF/Inputs/version-script-no-warn2.s @@ -0,0 +1 @@ +call foo@plt diff --git a/test/ELF/Inputs/version-script-weak.s b/test/ELF/Inputs/version-script-weak.s new file mode 100644 index 000000000..09f5cf09d --- /dev/null +++ b/test/ELF/Inputs/version-script-weak.s @@ -0,0 +1,4 @@ +.text +.globl foo +.type foo,@function +foo: diff --git a/test/ELF/Inputs/weak-undef-lazy.s b/test/ELF/Inputs/weak-undef-lazy.s new file mode 100644 index 000000000..c77477315 --- /dev/null +++ b/test/ELF/Inputs/weak-undef-lazy.s @@ -0,0 +1,3 @@ +.global foobar +foobar: + nop diff --git a/test/ELF/Inputs/wrap-dynamic-undef.s b/test/ELF/Inputs/wrap-dynamic-undef.s new file mode 100644 index 000000000..ade79556d --- /dev/null +++ b/test/ELF/Inputs/wrap-dynamic-undef.s @@ -0,0 +1,2 @@ +.global foo +foo: diff --git a/test/ELF/Inputs/wrap-no-real.s b/test/ELF/Inputs/wrap-no-real.s new file mode 100644 index 000000000..2fd1bcc6b --- /dev/null +++ b/test/ELF/Inputs/wrap-no-real.s @@ -0,0 +1,3 @@ +.globl foo, __wrap_foo +foo = 0x11000 +__wrap_foo = 0x11010 diff --git a/test/ELF/Inputs/wrap-no-real2.s b/test/ELF/Inputs/wrap-no-real2.s new file mode 100644 index 000000000..dbcb0889b --- /dev/null +++ b/test/ELF/Inputs/wrap-no-real2.s @@ -0,0 +1,2 @@ +.globl __real_foo +__real_foo = 0x11020 |