forked from OSchip/llvm-project
123 lines
3.6 KiB
Plaintext
123 lines
3.6 KiB
Plaintext
# Check that mapping symbols have zero size, local binding and none type.
|
|
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-a.o
|
|
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-t.o
|
|
# RUN: lld -flavor gnu -target arm-linux-gnu \
|
|
# RUN: -Bstatic --noinhibit-exec %t-a.o %t-t.o -o %t
|
|
# RUN: llvm-readobj -symbols %t | FileCheck %s
|
|
|
|
# CHECK: Name: $a (1)
|
|
# CHECK-NEXT: Value: 0x{{[0-9a-f]+}}
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Local (0x0)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
#
|
|
# CHECK: Name: $t (9)
|
|
# CHECK-NEXT: Value: 0x{{[0-9a-f]+}}
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Local (0x0)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
#
|
|
# CHECK: Name: $d (24)
|
|
# CHECK-NEXT: Value: 0x{{[0-9a-f]+}}
|
|
# CHECK-NEXT: Size: 0
|
|
# CHECK-NEXT: Binding: Local (0x0)
|
|
# CHECK-NEXT: Type: None (0x0)
|
|
# CHECK-NEXT: Other: 0
|
|
|
|
# arm.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: 00482DE904B08DE2FEFFFFEB0030A0E10300A0E10088BDE8
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Link: .symtab
|
|
AddressAlign: 0x0000000000000004
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x0000000000000008
|
|
Symbol: _Z1fv
|
|
Type: R_ARM_CALL
|
|
- 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: '$a'
|
|
Section: .text
|
|
Global:
|
|
- Name: main
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
- Name: _Z1fv
|
|
|
|
# thm.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: 80B400AF40F20003C0F200031B681846BD465DF8047B7047
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Link: .symtab
|
|
AddressAlign: 0x0000000000000004
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0x0000000000000004
|
|
Symbol: _ZL1i
|
|
Type: R_ARM_THM_MOVW_ABS_NC
|
|
- Offset: 0x0000000000000008
|
|
Symbol: _ZL1i
|
|
Type: R_ARM_THM_MOVT_ABS
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000001
|
|
Content: ''
|
|
- Name: .bss
|
|
Type: SHT_NOBITS
|
|
Flags: [ SHF_WRITE, SHF_ALLOC ]
|
|
AddressAlign: 0x0000000000000004
|
|
Size: 4
|
|
Symbols:
|
|
Local:
|
|
- Name: _ZL1i
|
|
Type: STT_OBJECT
|
|
Section: .bss
|
|
Size: 0x0000000000000004
|
|
- Name: '$d'
|
|
Section: .bss
|
|
- Name: '$t'
|
|
Section: .text
|
|
Global:
|
|
- Name: _Z1fv
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 0x0000000000000001
|
|
...
|