Index: tools/llvm-objcopy/Object.h =================================================================== --- tools/llvm-objcopy/Object.h +++ tools/llvm-objcopy/Object.h @@ -584,7 +584,6 @@ using SecPtr = std::unique_ptr; using SegPtr = std::unique_ptr; - std::shared_ptr OwnedData; std::vector Sections; std::vector Segments; @@ -617,10 +616,6 @@ StringTableSection *SectionNames = nullptr; SymbolTableSection *SymbolTable = nullptr; - explicit Object(std::shared_ptr Data) - : OwnedData(std::move(Data)) {} - virtual ~Object() = default; - void sortSections(); SectionTableRef sections() { return SectionTableRef(Sections); } ConstRange sections() const { Index: tools/llvm-objcopy/Object.cpp =================================================================== --- tools/llvm-objcopy/Object.cpp +++ tools/llvm-objcopy/Object.cpp @@ -835,7 +835,7 @@ } std::unique_ptr ELFReader::create() const { - auto Obj = llvm::make_unique(Data); + auto Obj = llvm::make_unique(); if (auto *o = dyn_cast>(Bin.get())) { ELFBuilder Builder(*o, *Obj); Builder.build();