]> granicus.if.org Git - llvm/commit
[ARM] Support .reloc *, R_ARM_NONE, *
authorFangrui Song <maskray@google.com>
Fri, 17 May 2019 02:51:54 +0000 (02:51 +0000)
committerFangrui Song <maskray@google.com>
Fri, 17 May 2019 02:51:54 +0000 (02:51 +0000)
commitb33d07cfa1fe69f57797b03712ff3a16c5bc59ea
tree6706ae449e6a912eed66cf981de749e666d298f3
parentcf8f7878ebba0d19aa2c5e7f3b7f1a578996f3d9
[ARM] Support .reloc *, R_ARM_NONE, *

R_ARM_NONE can be used to create references among sections. When
--gc-sections is used, the referenced section will be retained if the
origin section is retained.

Add a generic MCFixupKind FK_NONE as this kind of no-op relocation is
ubiquitous on ELF and COFF, and probably available on many other binary
formats. See D62014.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D61992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360980 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCFixup.h
lib/MC/MCAsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
test/MC/ARM/reloc-directive.s [new file with mode: 0644]