Index: lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp =================================================================== --- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp +++ lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp @@ -29,39 +29,28 @@ using namespace llvm::ELF; namespace { + // .got values -const uint8_t AArch64GotAtomContent[8] = {0}; +static const uint8_t AArch64GotAtomContent[8] = {0}; // .plt value (entry 0) -const uint8_t AArch64Plt0AtomContent[32] = { - 0xf0, 0x7b, 0xbf, - 0xa9, // stp x16, x30, [sp,#-16]! - 0x10, 0x00, 0x00, - 0x90, // adrp x16, Page(eh_frame) - 0x11, 0x02, 0x40, - 0xf9, // ldr x17, [x16,#offset] - 0x10, 0x02, 0x00, - 0x91, // add x16, x16, #offset - 0x20, 0x02, 0x1f, - 0xd6, // br x17 - 0x1f, 0x20, 0x03, - 0xd5, // nop - 0x1f, 0x20, 0x03, - 0xd5, // nop - 0x1f, 0x20, 0x03, - 0xd5 // nop +static const uint8_t AArch64Plt0AtomContent[32] = { + 0xf0, 0x7b, 0xbf, 0xa9, // stp x16, x30, [sp,#-16]! + 0x10, 0x00, 0x00, 0x90, // adrp x16, Page(eh_frame) + 0x11, 0x02, 0x40, 0xf9, // ldr x17, [x16,#offset] + 0x10, 0x02, 0x00, 0x91, // add x16, x16, #offset + 0x20, 0x02, 0x1f, 0xd6, // br x17 + 0x1f, 0x20, 0x03, 0xd5, // nop + 0x1f, 0x20, 0x03, 0xd5, // nop + 0x1f, 0x20, 0x03, 0xd5 // nop }; // .plt values (other entries) -const uint8_t AArch64PltAtomContent[16] = { - 0x10, 0x00, 0x00, - 0x90, // adrp x16, PAGE() - 0x11, 0x02, 0x40, - 0xf9, // ldr x17, [x16,#offset] - 0x10, 0x02, 0x00, - 0x91, // add x16, x16, #offset - 0x20, 0x02, 0x1f, - 0xd6 // br x17 +static const uint8_t AArch64PltAtomContent[16] = { + 0x10, 0x00, 0x00, 0x90, // adrp x16, PAGE() + 0x11, 0x02, 0x40, 0xf9, // ldr x17, [x16,#offset] + 0x10, 0x02, 0x00, 0x91, // add x16, x16, #offset + 0x20, 0x02, 0x1f, 0xd6 // br x17 }; /// \brief Atoms that are used by AArch64 dynamic linking