File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1328,20 +1328,22 @@ static void codegenDataGenerate() {
1328
1328
OutlinedHashTreeRecord globalOutlineRecord;
1329
1329
StableFunctionMapRecord globalMergeRecord;
1330
1330
for (ConcatInputSection *isec : inputSections) {
1331
- if (isec->getSegName () == segment_names::data &&
1332
- isec->getName () == section_names::outlinedHashTree) {
1331
+ if (isec->getSegName () != segment_names::data)
1332
+ continue ;
1333
+ if (isec->getName () == section_names::outlinedHashTree) {
1333
1334
// Read outlined hash tree from each section.
1334
1335
OutlinedHashTreeRecord localOutlineRecord;
1336
+ // Use a pointer to allow modification by the function.
1335
1337
auto *data = isec->data .data ();
1336
1338
localOutlineRecord.deserialize (data);
1337
1339
1338
1340
// Merge it to the global hash tree.
1339
1341
globalOutlineRecord.merge (localOutlineRecord);
1340
1342
}
1341
- if (isec->getSegName () == segment_names::data &&
1342
- isec->getName () == section_names::functionmap) {
1343
+ if (isec->getName () == section_names::functionMap) {
1343
1344
// Read stable functions from each section.
1344
1345
StableFunctionMapRecord localMergeRecord;
1346
+ // Use a pointer to allow modification by the function.
1345
1347
auto *data = isec->data .data ();
1346
1348
localMergeRecord.deserialize (data);
1347
1349
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ constexpr const char const_[] = "__const";
339
339
constexpr const char lazySymbolPtr[] = " __la_symbol_ptr" ;
340
340
constexpr const char lazyBinding[] = " __lazy_binding" ;
341
341
constexpr const char literals[] = " __literals" ;
342
- constexpr const char functionmap [] = " __llvm_merge" ;
342
+ constexpr const char functionMap [] = " __llvm_merge" ;
343
343
constexpr const char moduleInitFunc[] = " __mod_init_func" ;
344
344
constexpr const char moduleTermFunc[] = " __mod_term_func" ;
345
345
constexpr const char nonLazySymbolPtr[] = " __nl_symbol_ptr" ;
You can’t perform that action at this time.
0 commit comments