From 388838ed23da43bea39001ba28f4e41282bf468e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 20 Oct 2016 05:23:23 +0000 Subject: [PATCH] Format. NFC. llvm-svn: 284697 --- lld/ELF/Driver.cpp | 19 +++++++------------ lld/ELF/InputSection.h | 7 +------ 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index e89ca09..47abaeb 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -450,8 +450,6 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { if (!RPaths.empty()) Config->RPath = llvm::join(RPaths.begin(), RPaths.end(), ":"); - Config->SectionStartMap = getSectionStartMap(Args); - if (auto *Arg = Args.getLastArg(OPT_m)) { // Parse ELF{32,64}{LE,BE} and CPU type. StringRef S = Arg->getValue(); @@ -512,13 +510,18 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { Config->ZNow = hasZOption(Args, "now"); Config->ZOrigin = hasZOption(Args, "origin"); Config->ZRelro = !hasZOption(Args, "norelro"); + Config->ZStackSize = getZOptionValue(Args, "stack-size", -1); Config->ZWxneeded = hasZOption(Args, "wxneeded"); + Config->OFormatBinary = isOutputFormatBinary(Args); + Config->SectionStartMap = getSectionStartMap(Args); + Config->SortSection = getSortKind(Args); + Config->Target2 = getTarget2Option(Args); + Config->UnresolvedSymbols = getUnresolvedSymbolOption(Args); + if (!Config->Relocatable) Config->Strip = getStripOption(Args); - Config->ZStackSize = getZOptionValue(Args, "stack-size", -1); - // Config->Pic is true if we are generating position-independent code. Config->Pic = Config->Pie || Config->Shared; @@ -554,8 +557,6 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { } } - Config->OFormatBinary = isOutputFormatBinary(Args); - for (auto *Arg : Args.filtered(OPT_auxiliary)) Config->AuxiliaryList.push_back(Arg->getValue()); if (!Config->Shared && !Config->AuxiliaryList.empty()) @@ -564,12 +565,6 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { for (auto *Arg : Args.filtered(OPT_undefined)) Config->Undefined.push_back(Arg->getValue()); - Config->SortSection = getSortKind(Args); - - Config->UnresolvedSymbols = getUnresolvedSymbolOption(Args); - - Config->Target2 = getTarget2Option(Args); - if (auto *Arg = Args.getLastArg(OPT_dynamic_list)) if (Optional Buffer = readFile(Arg->getValue())) parseDynamicList(*Buffer); diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index fcac34c..0708c2b 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -54,15 +54,10 @@ private: public: Kind kind() const { return (Kind)SectionKind; } - // Used for garbage collection. - unsigned Live : 1; - + unsigned Live : 1; // for garbage collection unsigned Compressed : 1; - uint32_t Alignment; - StringRef Name; - ArrayRef Data; ArrayRef getData(const SectionPiece &P) const; -- 2.7.4