@@ -139,7 +139,7 @@ namespace SharedCacheAPI {
139139 std::string installName;
140140
141141 std::vector<std::pair<uint64_t , bool >> entryPoints;
142- std::vector<uint64_t > m_entryPoints; // list of entrypoints
142+ std::vector<uint64_t > m_entryPoints; // list of entrypoints
143143
144144 symtab_command symtab;
145145 dysymtab_command dysymtab;
@@ -152,7 +152,7 @@ namespace SharedCacheAPI {
152152
153153 uint64_t relocationBase;
154154 // Section and program headers, internally use 64-bit form as it is a superset of 32-bit
155- std::vector<segment_command_64> segments; // only three types of sections __TEXT, __DATA, __IMPORT
155+ std::vector<segment_command_64> segments; // only three types of sections __TEXT, __DATA, __IMPORT
156156 segment_command_64 linkeditSegment;
157157 std::vector<section_64> sections;
158158 std::vector<std::string> sectionNames;
@@ -167,6 +167,7 @@ namespace SharedCacheAPI {
167167
168168 std::string exportTriePath;
169169
170+ bool linkeditPresent = false ;
170171 bool dysymPresent = false ;
171172 bool dyldInfoPresent = false ;
172173 bool exportTriePresent = false ;
@@ -186,7 +187,7 @@ namespace SharedCacheAPI {
186187 MSS_SUBCLASS (symtab);
187188 MSS_SUBCLASS (dysymtab);
188189 MSS_SUBCLASS (dyldInfo);
189- // MSS_SUBCLASS(routines64);
190+ MSS_SUBCLASS (routines64);
190191 MSS_SUBCLASS (functionStarts);
191192 MSS_SUBCLASS (moduleInitSections);
192193 MSS_SUBCLASS (exportTrie);
@@ -202,6 +203,7 @@ namespace SharedCacheAPI {
202203 MSS_SUBCLASS (buildVersion);
203204 MSS_SUBCLASS (buildToolVersions);
204205 MSS (exportTriePath);
206+ MSS (linkeditPresent);
205207 MSS (dysymPresent);
206208 MSS (dyldInfoPresent);
207209 MSS (exportTriePresent);
@@ -212,41 +214,42 @@ namespace SharedCacheAPI {
212214 }
213215
214216 static SharedCacheMachOHeader Load (SharedCacheCore::DeserializationContext& context) {
215- return SharedCacheMachOHeader {
216- .MSL (textBase),
217- .MSL (loadCommandOffset),
218- .MSL (ident),
219- .MSL (identifierPrefix),
220- .MSL (installName),
221- .MSL (entryPoints),
222- .MSL (m_entryPoints),
223- .MSL (symtab),
224- .MSL (dysymtab),
225- .MSL (dyldInfo),
226- // .MSL(routines64), // FIXME CRASH but also do we even use this?
227- .MSL (functionStarts),
228- .MSL (moduleInitSections),
229- .MSL (exportTrie),
230- .MSL (chainedFixups),
231- .MSL (relocationBase),
232- .MSL (segments),
233- .MSL (linkeditSegment),
234- .MSL (sections),
235- .MSL (sectionNames),
236- .MSL (symbolStubSections),
237- .MSL (symbolPointerSections),
238- .MSL (dylibs),
239- .MSL (buildVersion),
240- .MSL (buildToolVersions),
241- .MSL (exportTriePath),
242- .MSL (dysymPresent),
243- .MSL (dyldInfoPresent),
244- .MSL (exportTriePresent),
245- .MSL (chainedFixupsPresent),
246- // .MSL(routinesPresent),
247- .MSL (functionStartsPresent),
248- .MSL (relocatable),
249- };
217+ SharedCacheMachOHeader header;
218+ header.MSL (textBase);
219+ header.MSL (loadCommandOffset);
220+ header.MSL (ident);
221+ header.MSL (identifierPrefix);
222+ header.MSL (installName);
223+ header.MSL (entryPoints);
224+ header.MSL (m_entryPoints);
225+ header.MSL (symtab);
226+ header.MSL (dysymtab);
227+ header.MSL (dyldInfo);
228+ header.MSL (routines64);
229+ header.MSL (functionStarts);
230+ header.MSL (moduleInitSections);
231+ header.MSL (exportTrie);
232+ header.MSL (chainedFixups);
233+ header.MSL (relocationBase);
234+ header.MSL (segments);
235+ header.MSL (linkeditSegment);
236+ header.MSL (sections);
237+ header.MSL (sectionNames);
238+ header.MSL (symbolStubSections);
239+ header.MSL (symbolPointerSections);
240+ header.MSL (dylibs);
241+ header.MSL (buildVersion);
242+ header.MSL (buildToolVersions);
243+ header.MSL (exportTriePath);
244+ header.MSL (linkeditPresent);
245+ header.MSL (dysymPresent);
246+ header.MSL (dyldInfoPresent);
247+ header.MSL (exportTriePresent);
248+ header.MSL (chainedFixupsPresent);
249+ header.MSL (routinesPresent);
250+ header.MSL (functionStartsPresent);
251+ header.MSL (relocatable);
252+ return header;
250253 }
251254 };
252255
0 commit comments