diff options
Diffstat (limited to 'test/Object')
-rw-r--r-- | test/Object/Inputs/shared-object-test.elf-i386 | bin | 1792 -> 1848 bytes | |||
-rw-r--r-- | test/Object/Inputs/shared-object-test.elf-x86-64 | bin | 2680 -> 2760 bytes | |||
-rw-r--r-- | test/Object/Inputs/shared.ll | 6 | ||||
-rw-r--r-- | test/Object/readobj-shared-object.test | 44 |
4 files changed, 48 insertions, 2 deletions
diff --git a/test/Object/Inputs/shared-object-test.elf-i386 b/test/Object/Inputs/shared-object-test.elf-i386 Binary files differindex 5129cc40bf..fb639155d7 100644 --- a/test/Object/Inputs/shared-object-test.elf-i386 +++ 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 differindex 71081ebfd1..92667f58d6 100644 --- a/test/Object/Inputs/shared-object-test.elf-x86-64 +++ b/test/Object/Inputs/shared-object-test.elf-x86-64 diff --git a/test/Object/Inputs/shared.ll b/test/Object/Inputs/shared.ll index 3db0f82d9c..1a62d560b9 100644 --- a/test/Object/Inputs/shared.ll +++ b/test/Object/Inputs/shared.ll @@ -1,12 +1,14 @@ ; 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 --unresolved-symbols=ignore-all +; 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 --unresolved-symbols=ignore-all +; ld -melf_x86_64 -shared tmp64.o -o shared-object-test.elf-x86-64 $LDARGS @defined_sym = global i32 1, align 4 diff --git a/test/Object/readobj-shared-object.test b/test/Object/readobj-shared-object.test new file mode 100644 index 0000000000..be71907c23 --- /dev/null +++ b/test/Object/readobj-shared-object.test @@ -0,0 +1,44 @@ +RUN: llvm-readobj %p/Inputs/shared-object-test.elf-i386 \ +RUN: | FileCheck %s -check-prefix ELF +RUN: llvm-readobj %p/Inputs/shared-object-test.elf-x86-64 \ +RUN: | FileCheck %s -check-prefix ELF + +ELF:Symbols: +ELF: .dynsym DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .dynstr DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .text DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .eh_frame DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .tdata DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .dynamic DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .got.plt DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .data DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: .bss DBG {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} formatspecific +ELF: shared.ll FILE {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} absolute,formatspecific +ELF: local_func FUNC {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} +ELF: _GLOBAL_OFFSET_TABLE_ DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} absolute +ELF: _DYNAMIC DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} absolute +ELF: common_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: tls_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,threadlocal +ELF: defined_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: __bss_start ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: _end ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: global_func FUNC {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: _edata ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: Total: 21 + +ELF:Dynamic Symbols: +ELF: common_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: tls_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,threadlocal +ELF: defined_sym DATA {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: __bss_start ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: _end ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: global_func FUNC {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global +ELF: _edata ? {{[0-9a-f]+}} {{[0-9a-f]+}} {{[0-9a-f]+}} global,absolute +ELF: Total: {{[0-9a-f]+}} + +ELF:Libraries needed: +ELF: libc.so.6 +ELF: libm.so.6 +ELF: Total: 2 + + |