Home | History | Annotate | Download | only in LD

Lines Matching defs:Archive

1 //===- Archive.cpp --------------------------------------------------------===//
9 #include <mcld/LD/Archive.h>
21 // Archive
22 const char Archive::MAGIC[] = "!<arch>\n";
23 const char Archive::THIN_MAGIC[] = "!<thin>\n";
24 const size_t Archive::MAGIC_LEN = sizeof(Archive::MAGIC) - 1;
25 const char Archive::SVR4_SYMTAB_NAME[] = "/ ";
26 const char Archive::STRTAB_NAME[] = "// ";
27 const char Archive::PAD[] = "\n";
28 const char Archive::MEMBER_MAGIC[] = "`\n";
30 Archive::Archive(Input& pInputFile, InputBuilder& pBuilder)
36 // FIXME: move creation of input tree out of Archive.
40 Archive::~Archive()
45 /// getARFile - get the Input& of the archive file
46 Input& Archive::getARFile()
51 /// getARFile - get the Input& of the archive file
52 const Input& Archive::getARFile() const
57 /// inputs - get the input tree built from this archive
58 InputTree& Archive::inputs()
63 /// inputs - get the input tree built from this archive
64 const InputTree& Archive::inputs() const
70 Archive::ObjectMemberMapType& Archive::getObjectMemberMap()
76 const Archive::ObjectMemberMapType& Archive::getObjectMemberMap() const
82 size_t Archive::numOfObjectMember() const
89 /// @param pIter - the iterator in the input tree built from this archive
90 bool Archive::addObjectMember(uint32_t pFileOffset, InputTree::iterator pIter)
101 bool Archive::hasObjectMember(uint32_t pFileOffset) const
106 /// getArchiveMemberMap - get the map that contains the included archive files
107 Archive::ArchiveMemberMapType& Archive::getArchiveMemberMap()
112 /// getArchiveMemberMap - get the map that contains the included archive files
113 const Archive::ArchiveMemberMapType& Archive::getArchiveMemberMap() const
118 /// addArchiveMember - add an archive in the archive member map
119 /// @param pName - the name of the new archive member
121 /// subtree of this archive member
123 /// subtree of this archive member
124 bool Archive::addArchiveMember(const llvm::StringRef& pName,
142 /// hasArchiveMember - check if an archive file is included or not
143 bool Archive::hasArchiveMember(const llvm::StringRef& pName) const
148 /// getArchiveMember - get a archive member
149 Archive::ArchiveMember* Archive::getArchiveMember(const llvm::StringRef& pName)
158 Archive::SymTabType& Archive::getSymbolTable()
164 const Archive::SymTabType& Archive::getSymbolTable() const
170 void Archive::setSymTabSize(size_t pSize)
176 size_t Archive::getSymTabSize() const
182 size_t Archive::numOfSymbols() const
190 void Archive::addSymbol(const char* pName,
192 enum Archive::Symbol::Status pStatus)
200 const std::string& Archive::getSymbolName(size_t pSymIdx) const
207 uint32_t Archive::getObjFileOffset(size_t pSymIdx) const
214 enum Archive::Symbol::Status Archive::getSymbolStatus(size_t pSymIdx) const
221 void Archive::setSymbolStatus(size_t pSymIdx,
222 enum Archive::Symbol::Status pStatus)
229 std::string& Archive::getStrTable()
235 const std::string& Archive::getStrTable() const
241 bool Archive::hasStrTable() const
246 /// getMemberFile - get the member file in an archive member
247 /// @param pArchiveFile - Input reference of the archive member
248 /// @param pIsThinAR - denote the archive menber is a Thin Archive or not
253 Input* Archive::getMemberFile(Input& pArchiveFile,