diff --git a/llvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.o b/llvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.o new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@ + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Foo&Bar + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 2.0 + CFBundleVersion + 2 + + diff --git a/llvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.out.dSYM/Contents/Resources/DWARF/dwarf5.out b/llvm/test/tools/dsymutil/Inputs/private/tmp/dwarf5/dwarf5.out.dSYM/Contents/Resources/DWARF/dwarf5.out new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@&1 | FileCheck %s +CHECK: warning: Unsupported attribute form in cloneAttribute. Dropping. diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp --- a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp +++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp @@ -582,10 +582,10 @@ return true; } -/// Look for relocations in the debug_info section that match -/// entries in the debug map. These relocations will drive the Dwarf -/// link by indicating which DIEs refer to symbols present in the -/// linked binary. +/// Look for relocations in either the debug_info or the debug_addr sections +/// that match entries in the debug map. These relocations will drive the Dwarf +/// link by indicating which DIEs refer to symbols present in the linked +/// binary. /// \returns whether there are any valid relocations in the debug info. bool DwarfLinkerForBinary::AddressManager::findValidRelocsInDebugInfo( const object::ObjectFile &Obj, const DebugMapObject &DMO) { @@ -598,9 +598,9 @@ consumeError(NameOrErr.takeError()); SectionName = SectionName.substr(SectionName.find_first_not_of("._")); - if (SectionName != "debug_info") - continue; - return findValidRelocs(Section, Obj, DMO); + if (SectionName == "debug_info" || SectionName == "debug_addr") + if(findValidRelocs(Section, Obj, DMO)) + return true; } return false; }