File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -652,6 +652,13 @@ void SectionChunk::getRuntimePseudoRelocs(
652
652
dyn_cast_or_null<Defined>(file->getSymbol (rel.SymbolTableIndex ));
653
653
if (!target || !target->isRuntimePseudoReloc )
654
654
continue ;
655
+ // If the target doesn't have a chunk allocated, it may be a
656
+ // DefinedImportData symbol which ended up unnecessary after GC.
657
+ // Normally we wouldn't eliminate section chunks that are referenced, but
658
+ // references within DWARF sections don't count for keeping section chunks
659
+ // alive. Thus such dangling references in DWARF sections are expected.
660
+ if (!target->getChunk ())
661
+ continue ;
655
662
int sizeInBits =
656
663
getRuntimePseudoRelocSize (rel.Type , file->ctx .config .machine );
657
664
if (sizeInBits == 0 ) {
You can’t perform that action at this time.
0 commit comments