[llvm] r352324 - [COFF] Add new relocation types.
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 27 11:53:36 PST 2019
Author: mstorsjo
Date: Sun Jan 27 11:53:36 2019
New Revision: 352324
URL: http://llvm.org/viewvc/llvm-project?rev=352324&view=rev
Log:
[COFF] Add new relocation types.
Differential Revision: https://reviews.llvm.org/D57291
Modified:
llvm/trunk/include/llvm/BinaryFormat/COFF.h
llvm/trunk/lib/Object/COFFObjectFile.cpp
llvm/trunk/lib/ObjectYAML/COFFYAML.cpp
Modified: llvm/trunk/include/llvm/BinaryFormat/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/COFF.h?rev=352324&r1=352323&r2=352324&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/COFF.h (original)
+++ llvm/trunk/include/llvm/BinaryFormat/COFF.h Sun Jan 27 11:53:36 2019
@@ -370,13 +370,15 @@ enum RelocationTypesARM : unsigned {
IMAGE_REL_ARM_TOKEN = 0x0005,
IMAGE_REL_ARM_BLX24 = 0x0008,
IMAGE_REL_ARM_BLX11 = 0x0009,
+ IMAGE_REL_ARM_REL32 = 0x000A,
IMAGE_REL_ARM_SECTION = 0x000E,
IMAGE_REL_ARM_SECREL = 0x000F,
IMAGE_REL_ARM_MOV32A = 0x0010,
IMAGE_REL_ARM_MOV32T = 0x0011,
IMAGE_REL_ARM_BRANCH20T = 0x0012,
IMAGE_REL_ARM_BRANCH24T = 0x0014,
- IMAGE_REL_ARM_BLX23T = 0x0015
+ IMAGE_REL_ARM_BLX23T = 0x0015,
+ IMAGE_REL_ARM_PAIR = 0x0016,
};
enum RelocationTypesARM64 : unsigned {
@@ -397,6 +399,7 @@ enum RelocationTypesARM64 : unsigned {
IMAGE_REL_ARM64_ADDR64 = 0x000E,
IMAGE_REL_ARM64_BRANCH19 = 0x000F,
IMAGE_REL_ARM64_BRANCH14 = 0x0010,
+ IMAGE_REL_ARM64_REL32 = 0x0011,
};
enum COMDATType : unsigned {
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=352324&r1=352323&r2=352324&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Sun Jan 27 11:53:36 2019
@@ -1236,6 +1236,7 @@ StringRef COFFObjectFile::getRelocationT
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_TOKEN);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_BLX24);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_BLX11);
+ LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_REL32);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_SECTION);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_SECREL);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_MOV32A);
@@ -1243,6 +1244,7 @@ StringRef COFFObjectFile::getRelocationT
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_BRANCH20T);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_BRANCH24T);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_BLX23T);
+ LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM_PAIR);
default:
return "Unknown";
}
@@ -1266,6 +1268,7 @@ StringRef COFFObjectFile::getRelocationT
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM64_ADDR64);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM64_BRANCH19);
LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM64_BRANCH14);
+ LLVM_COFF_SWITCH_RELOC_TYPE_NAME(IMAGE_REL_ARM64_REL32);
default:
return "Unknown";
}
Modified: llvm/trunk/lib/ObjectYAML/COFFYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/COFFYAML.cpp?rev=352324&r1=352323&r2=352324&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/COFFYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/COFFYAML.cpp Sun Jan 27 11:53:36 2019
@@ -187,6 +187,7 @@ void ScalarEnumerationTraits<COFF::Reloc
ECase(IMAGE_REL_ARM_TOKEN);
ECase(IMAGE_REL_ARM_BLX24);
ECase(IMAGE_REL_ARM_BLX11);
+ ECase(IMAGE_REL_ARM_REL32);
ECase(IMAGE_REL_ARM_SECTION);
ECase(IMAGE_REL_ARM_SECREL);
ECase(IMAGE_REL_ARM_MOV32A);
@@ -194,6 +195,7 @@ void ScalarEnumerationTraits<COFF::Reloc
ECase(IMAGE_REL_ARM_BRANCH20T);
ECase(IMAGE_REL_ARM_BRANCH24T);
ECase(IMAGE_REL_ARM_BLX23T);
+ ECase(IMAGE_REL_ARM_PAIR);
}
void ScalarEnumerationTraits<COFF::RelocationTypesARM64>::enumeration(
@@ -215,6 +217,7 @@ void ScalarEnumerationTraits<COFF::Reloc
ECase(IMAGE_REL_ARM64_ADDR64);
ECase(IMAGE_REL_ARM64_BRANCH19);
ECase(IMAGE_REL_ARM64_BRANCH14);
+ ECase(IMAGE_REL_ARM64_REL32);
}
void ScalarEnumerationTraits<COFF::WindowsSubsystem>::enumeration(
More information about the llvm-commits
mailing list