diff options
Diffstat (limited to 'test/old-elf/ARM/rel-ifunc.test')
-rw-r--r-- | test/old-elf/ARM/rel-ifunc.test | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/test/old-elf/ARM/rel-ifunc.test b/test/old-elf/ARM/rel-ifunc.test new file mode 100644 index 000000000000..7044534af1e3 --- /dev/null +++ b/test/old-elf/ARM/rel-ifunc.test @@ -0,0 +1,101 @@ +# Check handling of IFUNC (gnu_indirect_function). +# RUN: yaml2obj -format=elf %s > %t-o.o +# RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \ +# RUN: %t-o.o -o %t +# RUN: llvm-objdump -s -t %t | FileCheck %s + +# CHECK: Contents of section .rel.plt: +# CHECK: 400074 00104000 +# CHECK: Contents of section .plt: +# CHECK: 40007c 00c68fe2 00ca8ce2 7cffbce5 +# CHECK: Contents of section .text: +# CHECK: 4001a8 00482de9 04b08de2 d4ffffeb b0ffffeb +# ^ bl #-320 (to address 0x400080=__plt_ifunc_myfunc) +# CHECK: Contents of section .got.plt: +# CHECK: 401000 c0004000 +# CHECK: SYMBOL TABLE: +# CHECK: 004000c0 g .text 00000020 myfunc +# CHECK: 00400074 g *ABS* 00000000 __rel_iplt_start +# CHECK: 0040007c g *ABS* 00000000 __rel_iplt_end + +--- +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_ARM + Flags: [ EF_ARM_EABI_VER5 ] +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x0000000000000004 + Content: 04B02DE500B08DE20130A0E30300A0E100D04BE204B09DE41EFF2FE104B02DE500B08DE20230A0E30300A0E100D04BE204B09DE41EFF2FE104B02DE500B08DE2003000E3003040E30300A0E100D04BE204B09DE41EFF2FE100482DE904B08DE208D04DE208000BE508301BE533FF2FE10030A0E10300A0E104D04BE20088BDE800482DE904B08DE210D04DE2003000E3003040E308300BE5190000EA08301BE50C300BE50C301BE5003093E510300BE50C301BE5043093E57330EFE614300BE514301BE5A00053E30130A0030030A0137330EFE6000053E30600000A10301BE5003093E50300A0E1DAFFFFEB0020A0E110301BE5002083E508301BE5083083E208300BE508201BE5003000E3003040E3030052E1E0FFFF3A04D04BE20088BDE800482DE904B08DE2D4FFFFEBFEFFFFEB0030A0E30300A0E10088BDE8 + - Name: .rel.text + Type: SHT_REL + Link: .symtab + AddressAlign: 0x0000000000000004 + Info: .text + Relocations: + - Offset: 0x0000000000000040 + Symbol: myfunc1 + Type: R_ARM_MOVW_ABS_NC + - Offset: 0x0000000000000044 + Symbol: myfunc1 + Type: R_ARM_MOVT_ABS + - Offset: 0x000000000000008C + Symbol: __rel_iplt_start + Type: R_ARM_MOVW_ABS_NC + - Offset: 0x0000000000000090 + Symbol: __rel_iplt_start + Type: R_ARM_MOVT_ABS + - Offset: 0x0000000000000108 + Symbol: __rel_iplt_end + Type: R_ARM_MOVW_ABS_NC + - Offset: 0x000000000000010C + Symbol: __rel_iplt_end + Type: R_ARM_MOVT_ABS + - Offset: 0x000000000000012C + Symbol: myfunc + Type: R_ARM_CALL +Symbols: + Local: + - Name: .text + Type: STT_SECTION + Section: .text + - Name: '$a' + Section: .text + - Name: elf_ifunc_invoke + Type: STT_FUNC + Section: .text + Value: 0x0000000000000058 + Size: 0x0000000000000028 + - Name: apply_irel + Type: STT_FUNC + Section: .text + Value: 0x0000000000000080 + Size: 0x00000000000000A0 + Global: + - Name: myfunc1 + Type: STT_FUNC + Section: .text + Size: 0x000000000000001C + - Name: myfunc2 + Type: STT_FUNC + Section: .text + Value: 0x000000000000001C + Size: 0x000000000000001C + - Name: myfunc + Type: STT_GNU_IFUNC + Section: .text + Value: 0x0000000000000038 + Size: 0x0000000000000020 + - Name: _start + Type: STT_FUNC + Section: .text + Value: 0x0000000000000120 + Size: 0x000000000000001C + Weak: + - Name: __rel_iplt_start + - Name: __rel_iplt_end +... |