From 8065fb761eee95e2131d55e2b9bf3ed73555700a Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Thu, 5 Jun 2014 12:39:12 +0000 Subject: [PATCH] [Mips] Make dynlib-dynsym.test self contained. llvm-svn: 210258 --- lld/test/elf/Mips/Inputs/dynlib-dynsym.o | Bin 892 -> 0 bytes lld/test/elf/Mips/dynlib-dynsym.test | 83 ++++++++++++++++++++++++++++--- 2 files changed, 76 insertions(+), 7 deletions(-) delete mode 100644 lld/test/elf/Mips/Inputs/dynlib-dynsym.o diff --git a/lld/test/elf/Mips/Inputs/dynlib-dynsym.o b/lld/test/elf/Mips/Inputs/dynlib-dynsym.o deleted file mode 100644 index 1d79295ca71e23e8c544a217f7fda50881a62125..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 892 zcmah{!AiqW5S*Br8Y5EBgN5D{6og=^hkDnZJQT!>w**@i)JT$pp7h|=fAKT?EN7Cp zn9_<1o7vgfY<6GX+xf-V^E{Y&Si>&^z9|GfOit>814Pt;!6)#s4|IfkK%dxnSrrNR z7+S+cjEm_*Tuomp#93K_^!EN~mLo3j_+pi2j0|5NYkrefDGPI<#9^Bxi=X&Avr0+( z1+GMU4O}efxL7rziv?#sFmgF*s?$jv)5R&*HgRZR{URn*|6kphHR@-kewx|Lv{NQ5 zmUcy7R@Y;myFRa|h;~iisiWp$J^G|Jo0Ninslb`l9g %t.o +# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t-so %t.o # RUN: llvm-readobj -dyn-symbols %t-so | FileCheck -check-prefix=CHECK-DYN %s # Build shared library (yaml format) # RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \ -# RUN: --output-filetype=yaml -o %t-yaml %S/Inputs/dynlib-dynsym.o +# RUN: --output-filetype=yaml -o %t-yaml %t.o # RUN: FileCheck -check-prefix=CHECK-GOT %s < %t-yaml # CHECK-DYN: Format: ELF32-mips @@ -28,7 +26,7 @@ # CHECK-DYN: } # CHECK-DYN: Symbol { # CHECK-DYN: Name: bar@ (5) -# CHECK-DYN: Value: 0x158 +# CHECK-DYN: Value: 0x138 # CHECK-DYN: Size: 4 # CHECK-DYN: Binding: Global (0x1) # CHECK-DYN: Type: Function (0x2) @@ -37,7 +35,7 @@ # CHECK-DYN: } # CHECK-DYN: Symbol { # CHECK-DYN: Name: foo@ (1) -# CHECK-DYN: Value: 0x140 +# CHECK-DYN: Value: 0x120 # CHECK-DYN: Size: 24 # CHECK-DYN: Binding: Global (0x1) # CHECK-DYN: Type: Function (0x2) @@ -131,3 +129,74 @@ # CHECK-GOT: - kind: LLD_R_MIPS_GLOBAL_GOT # CHECK-GOT: offset: 0 # CHECK-GOT: target: ext2 + +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [ EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, + EF_MIPS_ARCH_32 ] +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x04 + Size: 0x1C + - Name: .rel.text + Type: SHT_REL + Link: .symtab + AddressAlign: 0x04 + Info: .text + Relocations: + - Offset: 0x00 + Symbol: .rodata.str1 + Type: R_MIPS_GOT16 + - Offset: 0x04 + Symbol: .rodata.str1 + Type: R_MIPS_LO16 + - Offset: 0x08 + Symbol: .rodata.str2 + Type: R_MIPS_GOT16 + - Offset: 0x0C + Symbol: .rodata.str2 + Type: R_MIPS_LO16 + - Offset: 0x10 + Symbol: foo + Type: R_MIPS_CALL16 + - Offset: 0x14 + Symbol: ext1 + Type: R_MIPS_CALL16 + - Offset: 0x18 + Symbol: ext2 + Type: R_MIPS_CALL16 + - Name: .rodata.str1 + Type: SHT_PROGBITS + AddressAlign: 0x01 + Size: 0x05 + - Name: .rodata.str2 + Type: SHT_PROGBITS + AddressAlign: 0x01 + Size: 0x05 + +Symbols: + Local: + - Name: .text + Type: STT_SECTION + Section: .text + - Name: .rodata.str1 + Type: STT_SECTION + Section: .rodata.str1 + - Name: .rodata.str2 + Type: STT_SECTION + Section: .rodata.str2 + Global: + - Name: bar + Section: .text + Value: 0x18 + - Name: foo + Section: .text + - Name: ext1 + - Name: ext2 +... -- 2.7.4