summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Chunks.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-09-18 07:22:01 +0000
committerMartin Storsjo <martin@martin.st>2018-09-18 07:22:01 +0000
commit32d21d6a2df0b9ee804ae80cadb1af4f61135024 (patch)
tree0fbdca4d7e8ce2640c24257b55cf6fad80a9edc3 /lld/COFF/Chunks.cpp
parentcb9570eb22a431bd6ab84f62699acb89a9cb4fcf (diff)
downloadbcm5719-llvm-32d21d6a2df0b9ee804ae80cadb1af4f61135024.tar.gz
bcm5719-llvm-32d21d6a2df0b9ee804ae80cadb1af4f61135024.zip
[COFF] Add support for delay loading DLLs for ARM64
Differential Revision: https://reviews.llvm.org/D52190 llvm-svn: 342447
Diffstat (limited to 'lld/COFF/Chunks.cpp')
-rw-r--r--lld/COFF/Chunks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index 5e8ab58ebf0..da5120817bf 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -191,7 +191,7 @@ void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, OutputSection *OS,
// Interpret the existing immediate value as a byte offset to the
// target symbol, then update the instruction with the immediate as
// the page offset from the current instruction to the target.
-static void applyArm64Addr(uint8_t *Off, uint64_t S, uint64_t P, int Shift) {
+void applyArm64Addr(uint8_t *Off, uint64_t S, uint64_t P, int Shift) {
uint32_t Orig = read32le(Off);
uint64_t Imm = ((Orig >> 29) & 0x3) | ((Orig >> 3) & 0x1FFFFC);
S += Imm;
@@ -205,7 +205,7 @@ static void applyArm64Addr(uint8_t *Off, uint64_t S, uint64_t P, int Shift) {
// Update the immediate field in a AARCH64 ldr, str, and add instruction.
// Optionally limit the range of the written immediate by one or more bits
// (RangeLimit).
-static void applyArm64Imm(uint8_t *Off, uint64_t Imm, uint32_t RangeLimit) {
+void applyArm64Imm(uint8_t *Off, uint64_t Imm, uint32_t RangeLimit) {
uint32_t Orig = read32le(Off);
Imm += (Orig >> 10) & 0xFFF;
Orig &= ~(0xFFF << 10);
@@ -257,7 +257,7 @@ static void applySecRelLdr(const SectionChunk *Sec, uint8_t *Off,
applyArm64Ldr(Off, (S - OS->getRVA()) & 0xfff);
}
-static void applyArm64Branch26(uint8_t *Off, int64_t V) {
+void applyArm64Branch26(uint8_t *Off, int64_t V) {
if (!isInt<28>(V))
error("relocation out of range");
or32(Off, (V & 0x0FFFFFFC) >> 2);
OpenPOWER on IntegriCloud