Files
Seiya Nuta d3ca385e82 [llvm-objcopy][MachO] Rebuild the symbol/string table in the writer
Summary: Build the string table using StringTableBuilder, reassign symbol indices, and update symbol indices in relocations to allow adding/modifying/removing symbols from the object.

Reviewers: alexshap, rupprecht, jhenderson

Reviewed By: alexshap

Subscribers: mgorny, jakehehrlich, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63309

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364000 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 00:21:50 +00:00

16 lines
349 B
C++

#include "Object.h"
#include "../llvm-objcopy.h"
namespace llvm {
namespace objcopy {
namespace macho {
const SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) const {
assert(Index < Symbols.size() && "invalid symbol index");
return Symbols[Index].get();
}
} // end namespace macho
} // end namespace objcopy
} // end namespace llvm