From 33c979d685e35ac8ac813543c0ccc70a7ec392f8 Mon Sep 17 00:00:00 2001 From: Shankar Easwaran Date: Fri, 20 Mar 2015 23:47:01 +0000 Subject: [PATCH] [ELF][X86_64] Use anonymous namespace only for class declarations llvm-svn: 232865 --- .../ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp index 12faf93..0703927 100644 --- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp @@ -30,22 +30,21 @@ using namespace lld; using namespace lld::elf; using namespace llvm::ELF; -namespace { // .got values -const uint8_t x86_64GotAtomContent[8] = { 0 }; +static const uint8_t x86_64GotAtomContent[8] = {0}; // .plt value (entry 0) -const uint8_t x86_64Plt0AtomContent[16] = { - 0xff, 0x35, 0x00, 0x00, 0x00, 0x00, // pushq GOT+8(%rip) - 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *GOT+16(%rip) - 0x90, 0x90, 0x90, 0x90 // nopnopnop +static const uint8_t x86_64Plt0AtomContent[16] = { + 0xff, 0x35, 0x00, 0x00, 0x00, 0x00, // pushq GOT+8(%rip) + 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *GOT+16(%rip) + 0x90, 0x90, 0x90, 0x90 // nopnopnop }; // .plt values (other entries) -const uint8_t x86_64PltAtomContent[16] = { - 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmpq *gotatom(%rip) - 0x68, 0x00, 0x00, 0x00, 0x00, // pushq reloc-index - 0xe9, 0x00, 0x00, 0x00, 0x00 // jmpq plt[-1] +static const uint8_t x86_64PltAtomContent[16] = { + 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmpq *gotatom(%rip) + 0x68, 0x00, 0x00, 0x00, 0x00, // pushq reloc-index + 0xe9, 0x00, 0x00, 0x00, 0x00 // jmpq plt[-1] }; // TLS GD Entry @@ -54,6 +53,7 @@ static const uint8_t x86_64GotTlsGdAtomContent[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +namespace { /// \brief Atoms that are used by X86_64 dynamic linking class X86_64GOTAtom : public GOTAtom { public: -- 2.7.4