Implement .reloc (constant offset only) with support for R_MIPS_NONE and R_MIPS_32.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Nov 2015 13:33:00 +0000 (13:33 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 12 Nov 2015 13:33:00 +0000 (13:33 +0000)
commit7056b689702bdd6c5bb8508be8fbff707cf250e5
tree4ce49ffa0ee46c999389f03a8ee77311596fa945
parent567a66317d5bd73fff6e02e3fbd4ae7395bca31a
Implement .reloc (constant offset only) with support for R_MIPS_NONE and R_MIPS_32.

Summary:
Support for R_MIPS_NONE allows us to parse MIPS16's usage of .reloc.
R_MIPS_32 was included to be able to better test the directive.

Targets can add their relocations by overriding MCAsmBackend::getFixupKind().

Subscribers: grosbach, rafael, majnemer, dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D13659

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252888 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/MC/MCAsmBackend.h
include/llvm/MC/MCObjectStreamer.h
include/llvm/MC/MCStreamer.h
lib/MC/MCAsmBackend.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCObjectStreamer.cpp
lib/MC/MCParser/AsmParser.cpp
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
test/MC/Mips/reloc-directive-bad.s [new file with mode: 0644]
test/MC/Mips/reloc-directive.s [new file with mode: 0644]