forked from OSchip/llvm-project
74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
# Check handling of R_MIPS_GOT16 relocation against local
|
|
# symbols when addresses of local data cross 64 KBytes border.
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t-obj
|
|
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t-exe %t-obj
|
|
# RUN: llvm-objdump -s %t-exe | FileCheck %s
|
|
|
|
# CHECK: Contents of section .got:
|
|
# CHECK-NEXT: 40a000 00000000 00000080 00004000 00004100 ..........@...A.
|
|
# lazy module 0x400000 0x410000
|
|
# resolver pointer for L1 for L2
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [ EF_MIPS_NOREORDER, 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
|
|
Content: '00000000000000000000000000000000'
|
|
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Link: .symtab
|
|
Info: .text
|
|
AddressAlign: 0x04
|
|
Address: 0x1000
|
|
Relocations:
|
|
- Offset: 0
|
|
Symbol: L1
|
|
Type: R_MIPS_GOT16
|
|
- Offset: 4
|
|
Symbol: L1
|
|
Type: R_MIPS_LO16
|
|
- Offset: 8
|
|
Symbol: L2
|
|
Type: R_MIPS_GOT16
|
|
- Offset: 12
|
|
Symbol: L2
|
|
Type: R_MIPS_LO16
|
|
|
|
- Name: .data
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC ]
|
|
AddressAlign: 0x04
|
|
Size: 0x9000
|
|
|
|
Symbols:
|
|
Local:
|
|
- Name: .text
|
|
Type: STT_SECTION
|
|
Section: .text
|
|
- Name: L1
|
|
Type: STT_OBJECT
|
|
Section: .data
|
|
Value: 0x00
|
|
Size: 0x8000
|
|
- Name: L2
|
|
Type: STT_OBJECT
|
|
Section: .data
|
|
Value: 0x8000
|
|
Size: 0x04
|
|
|
|
Global:
|
|
- Name: T0
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Size: 0x04
|