[lld] r177482 - [ELF] Order .got.plt properly
Shankar Easwaran
shankare at codeaurora.org
Tue Mar 19 21:52:08 PDT 2013
Author: shankare
Date: Tue Mar 19 23:52:08 2013
New Revision: 177482
URL: http://llvm.org/viewvc/llvm-project?rev=177482&view=rev
Log:
[ELF] Order .got.plt properly
Modified:
lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=177482&r1=177481&r2=177482&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Tue Mar 19 23:52:08 2013
@@ -334,7 +334,10 @@ Layout::SectionOrder DefaultLayout<ELFT>
return ORDER_BSS;
case DefinedAtom::typeGOT:
- return ORDER_GOT;
+ return llvm::StringSwitch<Reference::Kind>(name)
+ .StartsWith(".got.plt", ORDER_GOT_PLT)
+ .Default(ORDER_GOT);
+
case DefinedAtom::typeStub:
return ORDER_PLT;
More information about the llvm-commits
mailing list