Chunks.cpp (5f757f3ff9144b609b3c433dfd370cc6bdc191ad) | Chunks.cpp (dfa39133b333f57ca3133bf6c71cd75be4c3e801) |
---|---|
1//===- Chunks.cpp ---------------------------------------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 --- 638 unchanged lines hidden (view full) --- 647// imported from another DLL). 648void SectionChunk::getRuntimePseudoRelocs( 649 std::vector<RuntimePseudoReloc> &res) { 650 for (const coff_relocation &rel : getRelocs()) { 651 auto *target = 652 dyn_cast_or_null<Defined>(file->getSymbol(rel.SymbolTableIndex)); 653 if (!target || !target->isRuntimePseudoReloc) 654 continue; | 1//===- Chunks.cpp ---------------------------------------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 --- 638 unchanged lines hidden (view full) --- 647// imported from another DLL). 648void SectionChunk::getRuntimePseudoRelocs( 649 std::vector<RuntimePseudoReloc> &res) { 650 for (const coff_relocation &rel : getRelocs()) { 651 auto *target = 652 dyn_cast_or_null<Defined>(file->getSymbol(rel.SymbolTableIndex)); 653 if (!target || !target->isRuntimePseudoReloc) 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 int sizeInBits = 656 getRuntimePseudoRelocSize(rel.Type, file->ctx.config.machine); 657 if (sizeInBits == 0) { 658 error("unable to automatically import from " + target->getName() + 659 " with relocation type " + 660 file->getCOFFObj()->getRelocationTypeName(rel.Type) + " in " + 661 toString(file)); 662 continue; --- 405 unchanged lines hidden --- | 662 int sizeInBits = 663 getRuntimePseudoRelocSize(rel.Type, file->ctx.config.machine); 664 if (sizeInBits == 0) { 665 error("unable to automatically import from " + target->getName() + 666 " with relocation type " + 667 file->getCOFFObj()->getRelocationTypeName(rel.Type) + " in " + 668 toString(file)); 669 continue; --- 405 unchanged lines hidden --- |