1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Seiya Nuta 9d712950b5 [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

llvm-svn: 364000
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