diff options
Diffstat (limited to 'test/Object/Inputs')
-rw-r--r-- | test/Object/Inputs/archive-test.a-coff-i386 | bin | 0 -> 658 bytes | |||
-rwxr-xr-x | test/Object/Inputs/elf-versioning-test.i386 | bin | 0 -> 4832 bytes | |||
-rwxr-xr-x | test/Object/Inputs/elf-versioning-test.x86_64 | bin | 0 -> 5200 bytes | |||
-rw-r--r-- | test/Object/Inputs/elfver.S | 31 | ||||
-rw-r--r-- | test/Object/Inputs/elfver.script | 10 | ||||
-rw-r--r-- | test/Object/Inputs/shared-object-test.elf-i386 | bin | 0 -> 1848 bytes | |||
-rw-r--r-- | test/Object/Inputs/shared-object-test.elf-x86-64 | bin | 0 -> 2760 bytes | |||
-rw-r--r-- | test/Object/Inputs/shared.ll | 33 | ||||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.coff-i386 | bin | 0 -> 346 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.coff-x86-64 | bin | 0 -> 347 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.elf-i386 | bin | 0 -> 716 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.elf-x86-64 | bin | 0 -> 1024 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.macho-i386 | bin | 0 -> 552 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial-object-test.macho-x86-64 | bin | 0 -> 552 bytes | |||
-rw-r--r-- | test/Object/Inputs/trivial.ll | 12 |
15 files changed, 86 insertions, 0 deletions
diff --git a/test/Object/Inputs/archive-test.a-coff-i386 b/test/Object/Inputs/archive-test.a-coff-i386 Binary files differnew file mode 100644 index 0000000..846cd63 --- /dev/null +++ b/test/Object/Inputs/archive-test.a-coff-i386 diff --git a/test/Object/Inputs/elf-versioning-test.i386 b/test/Object/Inputs/elf-versioning-test.i386 Binary files differnew file mode 100755 index 0000000..c7c1eac --- /dev/null +++ b/test/Object/Inputs/elf-versioning-test.i386 diff --git a/test/Object/Inputs/elf-versioning-test.x86_64 b/test/Object/Inputs/elf-versioning-test.x86_64 Binary files differnew file mode 100755 index 0000000..cba79ba --- /dev/null +++ b/test/Object/Inputs/elf-versioning-test.x86_64 diff --git a/test/Object/Inputs/elfver.S b/test/Object/Inputs/elfver.S new file mode 100644 index 0000000..ba63279 --- /dev/null +++ b/test/Object/Inputs/elfver.S @@ -0,0 +1,31 @@ +# Compile with: +# ARGS="-shared -nostdlib -Wl,--version-script=elfver.script" +# clang $ARGS -m32 elfver.S -lc -o elf-versioning-test.i386 +# clang $ARGS -m64 elfver.S -lc -o elf-versioning-test.x86_64 + +# Also, strip off non-dynamic symbols: +# strip elf-versioning-test.i386 +# strip elf-versioning-test.x86_64 + +#ifdef __i386__ +.symver _puts, puts@GLIBC_2.0 +#else +.symver _puts, puts@GLIBC_2.2.5 +#endif +call _puts@PLT + +.symver foo1, foo@VER1 +.globl foo1 +.type foo1, @function +foo1: + ret + +.symver foo2, foo@@VER2 +.globl foo2 +.type foo2, @function +foo2: + ret + +.globl unversioned_define +.type unversioned_define, @function +unversioned_define: diff --git a/test/Object/Inputs/elfver.script b/test/Object/Inputs/elfver.script new file mode 100644 index 0000000..1316fcb --- /dev/null +++ b/test/Object/Inputs/elfver.script @@ -0,0 +1,10 @@ +VER1 { + global: + foo; +}; + +VER2 { + global: + foo; +} VER1; + diff --git a/test/Object/Inputs/shared-object-test.elf-i386 b/test/Object/Inputs/shared-object-test.elf-i386 Binary files differnew file mode 100644 index 0000000..fb63915 --- /dev/null +++ b/test/Object/Inputs/shared-object-test.elf-i386 diff --git a/test/Object/Inputs/shared-object-test.elf-x86-64 b/test/Object/Inputs/shared-object-test.elf-x86-64 Binary files differnew file mode 100644 index 0000000..92667f5 --- /dev/null +++ b/test/Object/Inputs/shared-object-test.elf-x86-64 diff --git a/test/Object/Inputs/shared.ll b/test/Object/Inputs/shared.ll new file mode 100644 index 0000000..1a62d56 --- /dev/null +++ b/test/Object/Inputs/shared.ll @@ -0,0 +1,33 @@ +; How to make the shared objects from this file: +; +; LDARGS="--unresolved-symbols=ignore-all -soname=libfoo.so --no-as-needed -lc -lm" +; +; X86-32 ELF: +; llc -mtriple=i386-linux-gnu shared.ll -filetype=obj -o tmp32.o -relocation-model=pic +; ld -melf_i386 -shared tmp32.o -o shared-object-test.elf-i386 $LDARGS +; +; X86-64 ELF: +; llc -mtriple=x86_64-linux-gnu shared.ll -filetype=obj -o tmp64.o -relocation-model=pic +; ld -melf_x86_64 -shared tmp64.o -o shared-object-test.elf-x86-64 $LDARGS + +@defined_sym = global i32 1, align 4 + +@tls_sym = thread_local global i32 2, align 4 + +@undef_sym = external global i32 + +@undef_tls_sym = external thread_local global i32 + +@common_sym = common global i32 0, align 4 + +define i32 @global_func() nounwind uwtable { +entry: + ret i32 0 +} + +declare i32 @undef_func(...) + +define internal i32 @local_func() nounwind uwtable { +entry: + ret i32 0 +} diff --git a/test/Object/Inputs/trivial-object-test.coff-i386 b/test/Object/Inputs/trivial-object-test.coff-i386 Binary files differnew file mode 100644 index 0000000..8cfd994 --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.coff-i386 diff --git a/test/Object/Inputs/trivial-object-test.coff-x86-64 b/test/Object/Inputs/trivial-object-test.coff-x86-64 Binary files differnew file mode 100644 index 0000000..0775914 --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.coff-x86-64 diff --git a/test/Object/Inputs/trivial-object-test.elf-i386 b/test/Object/Inputs/trivial-object-test.elf-i386 Binary files differnew file mode 100644 index 0000000..1a0ea40 --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.elf-i386 diff --git a/test/Object/Inputs/trivial-object-test.elf-x86-64 b/test/Object/Inputs/trivial-object-test.elf-x86-64 Binary files differnew file mode 100644 index 0000000..889f5d9 --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.elf-x86-64 diff --git a/test/Object/Inputs/trivial-object-test.macho-i386 b/test/Object/Inputs/trivial-object-test.macho-i386 Binary files differnew file mode 100644 index 0000000..099bd1e --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.macho-i386 diff --git a/test/Object/Inputs/trivial-object-test.macho-x86-64 b/test/Object/Inputs/trivial-object-test.macho-x86-64 Binary files differnew file mode 100644 index 0000000..93eeb5d --- /dev/null +++ b/test/Object/Inputs/trivial-object-test.macho-x86-64 diff --git a/test/Object/Inputs/trivial.ll b/test/Object/Inputs/trivial.ll new file mode 100644 index 0000000..25ece76 --- /dev/null +++ b/test/Object/Inputs/trivial.ll @@ -0,0 +1,12 @@ +@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 + +define i32 @main() nounwind { +entry: + %call = tail call i32 @puts(i8* getelementptr inbounds ([13 x i8]* @.str, i32 0, i32 0)) nounwind + tail call void bitcast (void (...)* @SomeOtherFunction to void ()*)() nounwind + ret i32 0 +} + +declare i32 @puts(i8* nocapture) nounwind + +declare void @SomeOtherFunction(...) |