[PATCH] [07/10] ELF/Aarch64: Internal variable cleanup
Rui Ueyama
ruiu at google.com
Tue Apr 7 09:31:51 PDT 2015
LGTM. It is recommended by the LLVM's coding style to keep the length of
anonymous namespaces as small as possible. So please move these now-file
scope variables outside the anonymous namespace.
On Tue, Apr 7, 2015 at 7:31 AM, Adhemerval Zanella <
adhemerval.zanella at linaro.org> wrote:
> Hi ruiu, shankar.easwaran,
>
> Hi ruiu, shankarke,
>
> This is re-post of a previous attempt. This patch makes the
> AArch64GotAtomContent, AArch64Plt0AtomContent, and
> AArch64PltAtomContent static and also cleanup their formatting.
>
> http://reviews.llvm.org/D8866
>
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150407/f6435342/attachment.html>
More information about the llvm-commits
mailing list