# Check handling of R_ARM_THM_JUMP11 relocation. # RUN: yaml2obj -format=elf -docnum 1 %s > %t-o.o # RUN: lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \ # RUN: --noinhibit-exec %t-o.o -o %t # RUN: llvm-objdump -s -t %t | FileCheck %s # CHECK: Contents of section .text: # CHECK: 4001a4 0021c7e7 # CHECK: SYMBOL TABLE: # CHECK: 00400138 g F .text 00000060 __gnu_h2f_internal # CHECK: 004001a4 g F .text 00000004 __gnu_h2f_alternative # RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o # RUN: not lld -flavor old-gnu -target arm -m armelf_linux_eabi -Bstatic \ # RUN: --noinhibit-exec %t-o.o -o %t 2> %t-error # RUN: FileCheck -check-prefix=OVERFLOW %s < %t-error # OVERFLOW: Relocation out of range {{.*}} (R_ARM_THM_JUMP11) # good.o --- 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: 70B4020CC0F3C754FF2CC0F3160302F4004080B241D0002C08BF002B3BD0A4F17F0543F4000315F10E0FA8BF41F6FF7209DA15F1190FA3BFA4F166066FF07F42F2406FF07F4212EA03060CD001325208964208BF03EA42021344B3F1807F24BF5B08A4F17E0501B30F2D26DC15F1180F11DB15F10E0FB5BF4FF6F2710E35CFF6FF71AD02B7BF491BAAB2CB40002202EB5333034398B270BC70470029FBD040EA533370BC43F4FC407047102DDEDD6FEAD0336FEAC33398B2EDE740F4F84398B2E9E700BFC0F3842310B4A3F11F040029B4FA84F400F400424FEA541408BF0024C0F309002146140481B943B14203703302EBC35343EA04005DF8044B704760B1B0FA80F3153B98405B42EFE744EA40305DF8044B40F0FF40704720465DF8044B704700BF01216BE70121FEE7002167E70021FEE7 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 0x0000000000000004 Info: .text Relocations: - Offset: 0x000000000000012A Symbol: __gnu_h2f_internal Type: R_ARM_THM_JUMP11 - Offset: 0x0000000000000132 Symbol: __gnu_h2f_internal Type: R_ARM_THM_JUMP11 - Name: .text.startup Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x0000000000000004 Content: 0020FFF7FEBF00BF - Name: .rel.text.startup Type: SHT_REL Link: .symtab AddressAlign: 0x0000000000000004 Info: .text.startup Relocations: - Offset: 0x0000000000000002 Symbol: __gnu_h2f_alternative Type: R_ARM_THM_JUMP24 - Name: .data Type: SHT_PROGBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Content: '' - Name: .bss Type: SHT_NOBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Symbols: Local: - Name: '$t' Section: .text - Name: __gnu_f2h_internal Type: STT_FUNC Section: .text Value: 0x0000000000000001 Size: 0x00000000000000C2 Global: - Name: __gnu_f2h_alternative Type: STT_FUNC Section: .text Value: 0x000000000000012D Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_alternative Type: STT_FUNC Section: .text Value: 0x0000000000000131 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_ieee Type: STT_FUNC Section: .text Value: 0x0000000000000129 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: main Type: STT_FUNC Section: .text.startup Value: 0x0000000000000001 Size: 0x0000000000000006 - Name: __gnu_f2h_ieee Type: STT_FUNC Section: .text Value: 0x0000000000000125 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_internal Type: STT_FUNC Section: .text Value: 0x00000000000000C5 Size: 0x000000000000005E Visibility: STV_HIDDEN # overflow.o --- 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: 70B4020CC0F3C754FF2CC0F3160302F4004080B241D0002C08BF002B3BD0A4F17F0543F4000315F10E0FA8BF41F6FF7209DA15F1190FA3BFA4F166066FF07F42F2406FF07F4212EA03060CD001325208964208BF03EA42021344B3F1807F24BF5B08A4F17E0501B30F2D26DC15F1180F11DB15F10E0FB5BF4FF6F2710E35CFF6FF71AD02B7BF491BAAB2CB40002202EB5333034398B270BC70470029FBD040EA533370BC43F4FC407047102DDEDD6FEAD0336FEAC33398B2EDE740F4F84398B2E9E700BFC0F3842310B4A3F11F040029B4FA84F400F400424FEA541408BF0024C0F309002146140481B943B14203703302EBC35343EA04005DF8044B704760B1B0FA80F3153B98405B42EFE744EA40305DF8044B40F0FF40704720465DF8044B704700BF01216BE70121FEE7002167E7002100E4 - Name: .rel.text Type: SHT_REL Link: .symtab AddressAlign: 0x0000000000000004 Info: .text Relocations: - Offset: 0x000000000000012A Symbol: __gnu_h2f_internal Type: R_ARM_THM_JUMP11 - Offset: 0x0000000000000132 Symbol: __gnu_h2f_internal Type: R_ARM_THM_JUMP11 - Name: .text.startup Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x0000000000000004 Content: 0020FFF7FEBF00BF - Name: .rel.text.startup Type: SHT_REL Link: .symtab AddressAlign: 0x0000000000000004 Info: .text.startup Relocations: - Offset: 0x0000000000000002 Symbol: __gnu_h2f_alternative Type: R_ARM_THM_JUMP24 - Name: .data Type: SHT_PROGBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Content: '' - Name: .bss Type: SHT_NOBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Symbols: Local: - Name: '$t' Section: .text - Name: __gnu_f2h_internal Type: STT_FUNC Section: .text Value: 0x0000000000000001 Size: 0x00000000000000C2 Global: - Name: __gnu_f2h_alternative Type: STT_FUNC Section: .text Value: 0x000000000000012D Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_alternative Type: STT_FUNC Section: .text Value: 0x0000000000000131 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_ieee Type: STT_FUNC Section: .text Value: 0x0000000000000129 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: main Type: STT_FUNC Section: .text.startup Value: 0x0000000000000001 Size: 0x0000000000000006 - Name: __gnu_f2h_ieee Type: STT_FUNC Section: .text Value: 0x0000000000000125 Size: 0x0000000000000004 Visibility: STV_HIDDEN - Name: __gnu_h2f_internal Type: STT_FUNC Section: .text Value: 0x00000000000000C5 Size: 0x000000000000005E Visibility: STV_HIDDEN ...