Loading...
--- dyld/dyld-1340/shared_cache_linker/SharedCacheLinker.cpp
+++ dyld/dyld-1235.2/shared_cache_linker/SharedCacheLinker.cpp
@@ -41,11 +41,10 @@
// Darwin
#include <mach-o/loader.h>
-#include <sys/mman.h>
using namespace ld;
using namespace mach_o;
-using namespace json;
+using namespace dyld3::json;
struct JSONHeader
{
@@ -396,15 +395,13 @@
const Node* addendNode = getOptionalValue(diag, contentEntry, "addend");
const Node* authPtrNode = getOptionalValue(diag, contentEntry, "authPtr");
- size_t newAtomSize = bytes.size() + fixupSize;
- atom->setContentAsZeros(newAtomSize);
addFixup(diag, arch, usesAuthPtrs, atom, (uint32_t)bytes.size(), kind,
af->atoms()[targetIndex], addendNode, authPtrNode);
if ( diag.hasError() )
return;
// resize atom's byte to make place for the fixup content
- bytes.resize(newAtomSize);
+ bytes.resize(bytes.size() + fixupSize);
if ( diag.hasError() )
return;
@@ -417,7 +414,7 @@
{
// read input JSON
Diagnostics jsonDiag;
- Node rootNode = readJSON(jsonDiag, jsonData.data(), jsonData.size(), false /* useJSON5 */);
+ Node rootNode = readJSON(jsonDiag, jsonData.data(), jsonData.size());
if ( jsonDiag.hasError() )
return jsonDiag.toError();
@@ -434,7 +431,6 @@
"-platform_version", header.pvs.platform.name(), verStr, verStr,
"-dylib", "-o", outputPath,
"-install_name", strdup(header.installName.data()),
- "-add_lldb_no_nlist_section" // rdar://146167046 (Please add `__TEXT,__lldb_no_nlist` section to libswiftPrespecialized.dylib)
};
// convert raw options string into options vector
// this only splits options by a whitespace, no special logic to escape quotes or so