Section atoms are not sorted, so we need to scan the whole section to find the
start address.
No test case: Found by inspection, and any reproduction would depend on pointer
ordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358865
91177308-0d34-0410-b5e6-
96231b3b80d8
for (auto &S : G.sections())
if (S.getName() == EHFrameSectionName && !S.atoms_empty()) {
Addr = (*S.atoms().begin())->getAddress();
+ for (auto *DA : S.atoms())
+ if (DA->getAddress() < Addr)
+ Addr = DA->getAddress();
break;
}