forked from OSchip/llvm-project
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
# Check that R_MIPS_JALR relocation does not affect code in case of cross jump.
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
# RUN: lld -flavor gnu -target mipsel -o %t.exe %t.o
|
|
# RUN: llvm-objdump -s %t.exe | FileCheck %s
|
|
|
|
# CHECK: Contents of section .text:
|
|
# CHECK-NEXT: {{[0-9a-f]+}} 08002003 00000000
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
|
|
EF_MIPS_MICROMIPS, EF_MIPS_ARCH_32R2]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
AddressAlign: 16
|
|
Content: "0800200300000000"
|
|
|
|
- Name: .rel.text
|
|
Type: SHT_REL
|
|
Link: .symtab
|
|
AddressAlign: 4
|
|
Info: .text
|
|
Relocations:
|
|
- Offset: 0
|
|
Symbol: M1
|
|
Type: R_MIPS_JALR
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: __start
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 0
|
|
Size: 4
|
|
- Name: M1
|
|
Type: STT_FUNC
|
|
Section: .text
|
|
Value: 4
|
|
Size: 4
|
|
Other: [ STO_MIPS_MICROMIPS ]
|