Files
clang-p2996/lld/test/elf/Mips/pc23-range.test
Rui Ueyama 2c64aef35f Remove YAML/Native round-trip passes.
The round-trip passes were introduced in r193300. The intention of
the change was to make sure that LLD is capable of reading end
writing such file formats.

But that turned out to be yet another over-designed stuff that had
been slowing down everyday development.

The passes ran after the core linker and before the writer. If you
had an additional piece of information that needs to be passed from
front-end to the writer, you had to invent a way to save the data to
YAML/Native. These passes forced us to do that even if that data
was not needed to be represented neither in an object file nor in
an executable/DSO. It doesn't make sense. We don't need these passes.

http://reviews.llvm.org/D7480

llvm-svn: 230069
2015-02-20 22:10:28 +00:00

57 lines
1.3 KiB
Plaintext

# Check that LLD shows an error if ADDIUPC immediate is out of range.
# RUN: yaml2obj -format=elf %s > %t-obj
# RUN: lld -flavor gnu -target mipsel -o %t-exe %t-obj 2>&1 | FileCheck %s
# CHECK: The addiupc instruction immediate 0x02000008 is out of range
!ELF
FileHeader: !FileHeader
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_MIPS
Flags: [ EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2,
EF_MIPS_MICROMIPS ]
Sections:
- Name: .text
Type: SHT_PROGBITS
Content: "0000000080780100"
# ^ PC23: 1 << 2 = 4 => T0 + 4 - 4 = T0
AddressAlign: 16
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
AddressAlign: 0x04
Size: 0x4000000
- Name: .rel.text
Type: SHT_REL
Info: .text
AddressAlign: 4
Relocations:
- Offset: 4
Symbol: T0
Type: R_MICROMIPS_PC23_S2
Symbols:
Global:
- Name: __start
Section: .text
Type: STT_FUNC
Size: 8
Other: [ STO_MIPS_MICROMIPS ]
- Name: TZ
Section: .data
Type: STT_FUNC
Value: 0
Size: 0x2000000
- Name: T0
Section: .data
Type: STT_FUNC
Value: 0x2000000
Size: 4