summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
diff options
context:
space:
mode:
authorSeiya Nuta <nuta@seiya.me>2019-08-19 06:45:48 +0000
committerSeiya Nuta <nuta@seiya.me>2019-08-19 06:45:48 +0000
commit1e335611adc863201a3522705d30b989e76d2b66 (patch)
tree18a76ebcd228b83d6de323bbf37ba7c2aa7064bd /llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
parent38426c114f6e50f8638bdd656f2f423151bc8eca (diff)
downloadbcm5719-llvm-1e335611adc863201a3522705d30b989e76d2b66.tar.gz
bcm5719-llvm-1e335611adc863201a3522705d30b989e76d2b66.zip
Revert r369230 and r369231
Looks these commits break CI builds: - http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-gn/builds/4159 This commit reverts r369230 and r369231 (git coommit: 4a198a7 and dee9546). llvm-svn: 369234
Diffstat (limited to 'llvm/tools/llvm-objcopy/MachO/MachOReader.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/MachO/MachOReader.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/llvm/tools/llvm-objcopy/MachO/MachOReader.cpp b/llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
index b48a0d8952d..23dde7de53d 100644
--- a/llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
+++ b/llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
@@ -129,19 +129,10 @@ void MachOReader::readLoadCommands(Object &O) const {
case MachO::LC_SYMTAB:
O.SymTabCommandIndex = O.LoadCommands.size();
break;
- case MachO::LC_DYSYMTAB:
- O.DySymTabCommandIndex = O.LoadCommands.size();
- break;
case MachO::LC_DYLD_INFO:
case MachO::LC_DYLD_INFO_ONLY:
O.DyLdInfoCommandIndex = O.LoadCommands.size();
break;
- case MachO::LC_DATA_IN_CODE:
- O.DataInCodeCommandIndex = O.LoadCommands.size();
- break;
- case MachO::LC_FUNCTION_STARTS:
- O.FunctionStartsCommandIndex = O.LoadCommands.size();
- break;
}
#define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \
case MachO::LCName: \
@@ -231,35 +222,6 @@ void MachOReader::readExportInfo(Object &O) const {
O.Exports.Trie = MachOObj.getDyldInfoExportsTrie();
}
-void MachOReader::readDataInCodeData(Object &O) const {
- if (!O.DataInCodeCommandIndex)
- return;
- const MachO::linkedit_data_command &LDC =
- O.LoadCommands[*O.DataInCodeCommandIndex]
- .MachOLoadCommand.linkedit_data_command_data;
-
- O.DataInCode.Data = arrayRefFromStringRef(
- MachOObj.getData().substr(LDC.dataoff, LDC.datasize));
-}
-
-void MachOReader::readFunctionStartsData(Object &O) const {
- if (!O.FunctionStartsCommandIndex)
- return;
- const MachO::linkedit_data_command &LDC =
- O.LoadCommands[*O.FunctionStartsCommandIndex]
- .MachOLoadCommand.linkedit_data_command_data;
-
- O.FunctionStarts.Data = arrayRefFromStringRef(
- MachOObj.getData().substr(LDC.dataoff, LDC.datasize));
-}
-
-void MachOReader::readIndirectSymbolTable(Object &O) const {
- MachO::dysymtab_command DySymTab = MachOObj.getDysymtabLoadCommand();
- for (uint32_t i = 0; i < DySymTab.nindirectsyms; ++i)
- O.IndirectSymTable.Symbols.push_back(
- MachOObj.getIndirectSymbolTableEntry(DySymTab, i));
-}
-
std::unique_ptr<Object> MachOReader::create() const {
auto Obj = std::make_unique<Object>();
readHeader(*Obj);
@@ -271,9 +233,6 @@ std::unique_ptr<Object> MachOReader::create() const {
readWeakBindInfo(*Obj);
readLazyBindInfo(*Obj);
readExportInfo(*Obj);
- readDataInCodeData(*Obj);
- readFunctionStartsData(*Obj);
- readIndirectSymbolTable(*Obj);
return Obj;
}
OpenPOWER on IntegriCloud