[lld] r192310 - [ELF] Change MaxAlignment to 2.
Shankar Easwaran
shankare at codeaurora.org
Wed Oct 9 11:12:32 PDT 2013
Author: shankare
Date: Wed Oct 9 13:12:31 2013
New Revision: 192310
URL: http://llvm.org/viewvc/llvm-project?rev=192310&view=rev
Log:
[ELF] Change MaxAlignment to 2.
Added:
lld/trunk/test/elf/Hexagon/Inputs/libMaxAlignment.a
lld/trunk/test/elf/Hexagon/maxalignment.test
Modified:
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h
lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h
lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.h
lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h
lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h Wed Oct 9 13:12:31 2013
@@ -14,7 +14,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 4, false> HexagonELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, false> HexagonELFType;
class HexagonLinkingContext;
template <class HexagonELFType> class HexagonRuntimeFile
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h Wed Oct 9 13:12:31 2013
@@ -15,7 +15,6 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 4, false> HexagonELFType;
class HexagonLinkingContext;
class HexagonTargetHandler;
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h Wed Oct 9 13:12:31 2013
@@ -13,7 +13,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 4, false> HexagonELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, false> HexagonELFType;
template <typename ELFT> class HexagonTargetLayout;
class HexagonLinkingContext;
Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h Wed Oct 9 13:12:31 2013
@@ -18,7 +18,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 4, false> HexagonELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, false> HexagonELFType;
class HexagonLinkingContext;
/// \brief Handle Hexagon specific Atoms
Modified: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h Wed Oct 9 13:12:31 2013
@@ -15,7 +15,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::big, 4, false> PPCELFType;
+typedef llvm::object::ELFType<llvm::support::big, 2, false> PPCELFType;
class PPCLinkingContext;
class PPCTargetRelocationHandler LLVM_FINAL
Modified: lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.h Wed Oct 9 13:12:31 2013
@@ -15,7 +15,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 4, false> X86ELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, false> X86ELFType;
class X86LinkingContext;
class X86TargetRelocationHandler LLVM_FINAL
Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h Wed Oct 9 13:12:31 2013
@@ -15,7 +15,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 8, true> X86_64ELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, true> X86_64ELFType;
class X86_64LinkingContext;
class X86_64TargetRelocationHandler LLVM_FINAL
Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h?rev=192310&r1=192309&r2=192310&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h Wed Oct 9 13:12:31 2013
@@ -19,7 +19,7 @@
namespace lld {
namespace elf {
-typedef llvm::object::ELFType<llvm::support::little, 8, true> X86_64ELFType;
+typedef llvm::object::ELFType<llvm::support::little, 2, true> X86_64ELFType;
class X86_64LinkingContext;
class X86_64TargetHandler LLVM_FINAL
Added: lld/trunk/test/elf/Hexagon/Inputs/libMaxAlignment.a
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/Inputs/libMaxAlignment.a?rev=192310&view=auto
==============================================================================
Binary files lld/trunk/test/elf/Hexagon/Inputs/libMaxAlignment.a (added) and lld/trunk/test/elf/Hexagon/Inputs/libMaxAlignment.a Wed Oct 9 13:12:31 2013 differ
Added: lld/trunk/test/elf/Hexagon/maxalignment.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/maxalignment.test?rev=192310&view=auto
==============================================================================
--- lld/trunk/test/elf/Hexagon/maxalignment.test (added)
+++ lld/trunk/test/elf/Hexagon/maxalignment.test Wed Oct 9 13:12:31 2013
@@ -0,0 +1,8 @@
+# This tests that we lld is able to get the contentType properly for archives
+# when they intermittently get loaded at an address whose alignment is 2
+
+RUN: lld -flavor gnu -target hexagon --whole-archive %p/Inputs/libMaxAlignment.a \
+RUN: --noinhibit-exec -static -o %t
+RUN: llvm-nm %t | FileCheck %s
+
+CHECK: {{[0-9a-f]+}} D a
More information about the llvm-commits
mailing list