diff options
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/DefaultLayout.h')
-rw-r--r-- | lld/lib/ReaderWriter/ELF/DefaultLayout.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h index f9a7324e79c..d198c5abc6f 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h +++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h @@ -10,7 +10,6 @@ #ifndef LLD_READER_WRITER_ELF_DEFAULT_LAYOUT_H #define LLD_READER_WRITER_ELF_DEFAULT_LAYOUT_H -#include "Atoms.h" #include "Chunk.h" #include "HeaderChunks.h" #include "Layout.h" @@ -172,7 +171,6 @@ public: typedef typename std::vector<lld::AtomLayout *>::iterator AbsoluteAtomIterT; typedef llvm::DenseSet<const Atom *> AtomSetT; - typedef llvm::DenseSet<const SharedLibraryAtom *> SharedLibraryAtomSetT; DefaultLayout(const ELFLinkingContext &context) : _context(context) {} @@ -305,10 +303,6 @@ public: return _referencedDynAtoms.count(a); } - const SharedLibraryAtomSetT &getCopiedDynAtoms() const { - return _copiedDynAtoms; - } - protected: /// \brief Allocate a new section. virtual AtomSection<ELFT> *createSection( @@ -331,7 +325,6 @@ protected: LLD_UNIQUE_BUMP_PTR(RelocationTable<ELFT>) _pltRelocationTable; std::vector<lld::AtomLayout *> _absoluteAtoms; AtomSetT _referencedDynAtoms; - SharedLibraryAtomSetT _copiedDynAtoms; const ELFLinkingContext &_context; }; @@ -589,14 +582,7 @@ ErrorOr<const lld::AtomLayout &> DefaultLayout<ELFT>::addAtom(const Atom *atom) if (isa<UndefinedAtom>(reloc->target()) && isLocalReloc) continue; - if (!_context.isCopyRelocation(*reloc)) { - _referencedDynAtoms.insert(reloc->target()); - continue; - } - - const ObjectAtom *oa = dyn_cast<ObjectAtom>(reloc->target()); - assert (oa != nullptr && "Targets of copy relocs must be ObjectAtoms"); - _copiedDynAtoms.insert(oa->getOriginalOwner()); + _referencedDynAtoms.insert(reloc->target()); } return section->appendAtom(atom); |