[lld] r195598 - [Gnu] Set the defaults in the ELFLinkingContext.

Shankar Easwaran shankare at codeaurora.org
Sun Nov 24 20:28:57 PST 2013


Author: shankare
Date: Sun Nov 24 22:28:57 2013
New Revision: 195598

URL: http://llvm.org/viewvc/llvm-project?rev=195598&view=rev
Log:
[Gnu] Set the defaults in the ELFLinkingContext.

Comment from Rui Ueyema.

Modified:
    lld/trunk/lib/Driver/GnuLdDriver.cpp
    lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp

Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=195598&r1=195597&r2=195598&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Sun Nov 24 22:28:57 2013
@@ -177,12 +177,6 @@ bool GnuLdDriver::parse(int argc, const
        it != ie; ++it)
     ctx->addSearchPath((*it)->getValue());
 
-  // Create a dynamic executable by default
-  ctx->setOutputELFType(llvm::ELF::ET_EXEC);
-  ctx->setIsStaticExecutable(false);
-  ctx->setAllowShlibUndefines(false);
-  ctx->setUseShlibUndefines(true);
-
   // Figure out output kind ( -r, -static, -shared)
   if ( llvm::opt::Arg *kind = parsedArgs->getLastArg(OPT_relocatable, OPT_static,
                                       OPT_shared, OPT_nmagic,

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=195598&r1=195597&r2=195598&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Sun Nov 24 22:28:57 2013
@@ -42,7 +42,7 @@ ELFLinkingContext::ELFLinkingContext(
       _targetHandler(std::move(targetHandler)), _baseAddress(0),
       _isStaticExecutable(false), _noInhibitExec(false),
       _mergeCommonStrings(false), _runLayoutPass(true),
-      _useShlibUndefines(false), _dynamicLinkerArg(false),
+      _useShlibUndefines(true), _dynamicLinkerArg(false),
       _noAllowDynamicLibraries(false), _outputMagic(OutputMagic::DEFAULT),
       _sysrootPath("") {}
 





More information about the llvm-commits mailing list