[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
This commit is contained in:
Fangrui Song
2019-05-17 02:51:54 +00:00
parent cf8f7878eb
commit b33d07cfa1
9 changed files with 64 additions and 10 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ class MCExpr;
/// Extensible enumeration to represent the type of a fixup.
enum MCFixupKind {
FK_Data_1 = 0, ///< A one-byte fixup.
FK_NONE = 0, ///< A no-op fixup.
FK_Data_1, ///< A one-byte fixup.
FK_Data_2, ///< A two-byte fixup.
FK_Data_4, ///< A four-byte fixup.
FK_Data_8, ///< A eight-byte fixup.