From 84bc818bafba41e44407389fceb2f0a96cb96678 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 15 Jul 2014 19:35:22 +0000 Subject: [RuntimeDyld] Revert r211652 - MachO object GDB registration support. The registration scheme used in r211652 violated the read-only contract of MemoryBuffer. This caused crashes in llvm-rtdyld where macho objects were backed by read-only mmap'd memory. llvm-svn: 213086 --- llvm/lib/Object/MachOObjectFile.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 4919114..cd9c06b 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1908,7 +1908,7 @@ StringRef MachOObjectFile::getStringTableData() const { bool MachOObjectFile::is64Bit() const { return getType() == getMachOType(false, true) || - getType() == getMachOType(true, true); + getType() == getMachOType(true, true); } void MachOObjectFile::ReadULEB128s(uint64_t Index, @@ -1923,10 +1923,6 @@ void MachOObjectFile::ReadULEB128s(uint64_t Index, } } -const char *MachOObjectFile::getSectionPointer(DataRefImpl Rel) const { - return Sections[Rel.d.a]; -} - ErrorOr ObjectFile::createMachOObjectFile(std::unique_ptr &Buffer) { StringRef Magic = Buffer->getBuffer().slice(0, 4); -- cgit v1.1