[PATCH] [PATCH 07/13] ELF/Aarch64: Internal variable cleanup
Adhemerval Zanella
adhemerval.zanella at linaro.org
Tue Mar 31 10:53:29 PDT 2015
This patch makes the AArch64GotAtomContent, AArch64Plt0AtomContent, and
AArch64PltAtomContent static and also cleanup their formatting.
http://reviews.llvm.org/D8732
Files:
lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
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(<GLOBAL_OFFSET_TABLE>)
- 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(<GLOBAL_OFFSET_TABLE>)
+ 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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8732.22978.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150331/c90cbb54/attachment.bin>
More information about the llvm-commits
mailing list