From: Jay Freeman (saurik) Date: Sun, 31 Dec 2017 10:07:16 +0000 (-0800) Subject: Support signing binaries without any symbol table. X-Git-Tag: v2.1.0~7 X-Git-Url: https://git.saurik.com/ldid.git/commitdiff_plain/422bad37a8c2fef85a857d6ee9707057879d3231?hp=1190f447adc6290d57702d7992474b10557370e5 Support signing binaries without any symbol table. --- diff --git a/ldid.cpp b/ldid.cpp index 08ac3a3..1f9287c 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -1220,9 +1220,11 @@ static void Allocate(const void *idata, size_t isize, std::streambuf &output, co if (symtab != NULL) { auto end(mach_header.Swap(symtab->stroff) + mach_header.Swap(symtab->strsize)); - _assert(end <= size); - _assert(end >= size - 0x10); - size = end; + if (symtab->stroff != 0 || symtab->strsize != 0) { + _assert(end <= size); + _assert(end >= size - 0x10); + size = end; + } } size_t alloc(allocate(mach_header, size));