From 32e4212d3e2a3ec7db965a54534b0752ad329ccb Mon Sep 17 00:00:00 2001 From: Alessandro Di Federico Date: Sun, 30 May 2021 08:15:10 +0200 Subject: [PATCH] CodeGenerator: stop emitting .li.csv and .need.csv --- lib/Lift/CodeGenerator.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/lib/Lift/CodeGenerator.cpp b/lib/Lift/CodeGenerator.cpp index 7413abc15..7ad7cd81e 100644 --- a/lib/Lift/CodeGenerator.cpp +++ b/lib/Lift/CodeGenerator.cpp @@ -60,17 +60,6 @@ using std::string; // Register all the arguments -// TODO: linking-info-path? -static cl::opt LinkingInfoPath("linking-info", - cl::desc("destination path for the CSV " - "containing linking info"), - cl::value_desc("path"), - cl::cat(MainCategory)); -static cl::alias A2("i", - cl::desc("Alias for -linking-info"), - cl::aliasopt(LinkingInfoPath), - cl::cat(MainCategory)); - // Enable Debug Options to be specified on the command line namespace DIT = DebugInfoType; static auto X = cl::values(clEnumValN(DIT::None, @@ -225,12 +214,6 @@ CodeGenerator::CodeGenerator(BinaryFile &Binary, EarlyLinkedModule = parseIR(EarlyLinked, Context); - // Prepare the linking info CSV - if (LinkingInfoPath.size() == 0) - LinkingInfoPath = OutputPath + ".li.csv"; - std::ofstream LinkingInfoStream(LinkingInfoPath); - LinkingInfoStream << "name,start,end\n"; - auto *Uint8Ty = Type::getInt8Ty(Context); auto *ElfHeaderHelper = new GlobalVariable(*TheModule, Uint8Ty, @@ -331,19 +314,7 @@ CodeGenerator::CodeGenerator(BinaryFile &Binary, // Force alignment to 1 and assign the variable to a specific section Segment.Variable->setAlignment(MaybeAlign(1)); Segment.Variable->setSection("." + Name); - - // Write the linking info CSV - LinkingInfoStream << "." << Name << ",0x" << std::hex - << Segment.StartVirtualAddress.address() << ",0x" - << std::hex << Segment.EndVirtualAddress.address() - << "\n"; } - - // Write needed libraries CSV - std::string NeededLibs = OutputPath + ".need.csv"; - std::ofstream NeededLibsStream(NeededLibs); - for (const std::string &Library : Binary.neededLibraryNames()) - NeededLibsStream << Library << "\n"; } static BasicBlock *replaceFunction(Function *ToReplace) {