<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 7:31 AM, Adhemerval Zanella <span dir="ltr"><<a href="mailto:adhemerval.zanella@linaro.org" target="_blank">adhemerval.zanella@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ruiu, shankar.easwaran,<br>
<br>
Hi ruiu, shankarke,<br>
<br>
This is re-post of a previous attempt. This patch makes the AArch64GotAtomContent, AArch64Plt0AtomContent, and<br>
AArch64PltAtomContent static and also cleanup their formatting.<br>
<br>
<a href="http://reviews.llvm.org/D8866" target="_blank">http://reviews.llvm.org/D8866</a><br>
<br>
Files:<br>
lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp<br>
<br>
Index: lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp<br>
===================================================================<br>
--- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp<br>
+++ lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp<br>
@@ -29,39 +29,28 @@<br>
using namespace llvm::ELF;<br>
<br>
namespace {<br>
+<br>
// .got values<br>
-const uint8_t AArch64GotAtomContent[8] = {0};<br>
+static const uint8_t AArch64GotAtomContent[8] = {0};<br>
<br>
// .plt value (entry 0)<br>
-const uint8_t AArch64Plt0AtomContent[32] = {<br>
- 0xf0, 0x7b, 0xbf,<br>
- 0xa9, // stp x16, x30, [sp,#-16]!<br>
- 0x10, 0x00, 0x00,<br>
- 0x90, // adrp x16, Page(eh_frame)<br>
- 0x11, 0x02, 0x40,<br>
- 0xf9, // ldr x17, [x16,#offset]<br>
- 0x10, 0x02, 0x00,<br>
- 0x91, // add x16, x16, #offset<br>
- 0x20, 0x02, 0x1f,<br>
- 0xd6, // br x17<br>
- 0x1f, 0x20, 0x03,<br>
- 0xd5, // nop<br>
- 0x1f, 0x20, 0x03,<br>
- 0xd5, // nop<br>
- 0x1f, 0x20, 0x03,<br>
- 0xd5 // nop<br>
+static const uint8_t AArch64Plt0AtomContent[32] = {<br>
+ 0xf0, 0x7b, 0xbf, 0xa9, // stp x16, x30, [sp,#-16]!<br>
+ 0x10, 0x00, 0x00, 0x90, // adrp x16, Page(eh_frame)<br>
+ 0x11, 0x02, 0x40, 0xf9, // ldr x17, [x16,#offset]<br>
+ 0x10, 0x02, 0x00, 0x91, // add x16, x16, #offset<br>
+ 0x20, 0x02, 0x1f, 0xd6, // br x17<br>
+ 0x1f, 0x20, 0x03, 0xd5, // nop<br>
+ 0x1f, 0x20, 0x03, 0xd5, // nop<br>
+ 0x1f, 0x20, 0x03, 0xd5 // nop<br>
};<br>
<br>
// .plt values (other entries)<br>
-const uint8_t AArch64PltAtomContent[16] = {<br>
- 0x10, 0x00, 0x00,<br>
- 0x90, // adrp x16, PAGE(<GLOBAL_OFFSET_TABLE>)<br>
- 0x11, 0x02, 0x40,<br>
- 0xf9, // ldr x17, [x16,#offset]<br>
- 0x10, 0x02, 0x00,<br>
- 0x91, // add x16, x16, #offset<br>
- 0x20, 0x02, 0x1f,<br>
- 0xd6 // br x17<br>
+static const uint8_t AArch64PltAtomContent[16] = {<br>
+ 0x10, 0x00, 0x00, 0x90, // adrp x16, PAGE(<GLOBAL_OFFSET_TABLE>)<br>
+ 0x11, 0x02, 0x40, 0xf9, // ldr x17, [x16,#offset]<br>
+ 0x10, 0x02, 0x00, 0x91, // add x16, x16, #offset<br>
+ 0x20, 0x02, 0x1f, 0xd6 // br x17<br>
};<br>
<br>
/// \brief Atoms that are used by AArch64 dynamic linking<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div><br></div>