@@ -43,8 +43,8 @@ inline void applyBranchToBranchOptImpl(
43
43
// reading relocations of other sections.
44
44
for (ELFFileBase *f : ctx.objectFiles ) {
45
45
auto getRelocBranchInfo =
46
- [&ctx, & getBranchInfo](Relocation &r,
47
- uint64_t addend) -> std::pair<Relocation *, uint64_t > {
46
+ [&getBranchInfo](Relocation &r,
47
+ uint64_t addend) -> std::pair<Relocation *, uint64_t > {
48
48
auto *target = dyn_cast_or_null<Defined>(r.sym );
49
49
// We don't allow preemptible symbols (may go somewhere else),
50
50
// absolute symbols (runtime behavior unknown), non-executable memory
@@ -54,21 +54,21 @@ inline void applyBranchToBranchOptImpl(
54
54
target->section ->kind () != SectionBase::Regular)
55
55
return {nullptr , 0 };
56
56
return getBranchInfo (*cast<InputSection>(target->section ),
57
- target->value + addend);
57
+ target->value + addend);
58
58
};
59
59
for (InputSectionBase *s : f->getSections ()) {
60
60
if (!s)
61
61
continue ;
62
62
for (Relocation &r : s->relocations ) {
63
63
if (std::optional<uint64_t > addend =
64
- getControlTransferAddend (*cast<InputSection>(s),
65
- r)) {
64
+ getControlTransferAddend (*cast<InputSection>(s), r)) {
66
65
std::pair<Relocation *, uint64_t > targetAndAddend =
67
66
getRelocBranchInfo (r, *addend);
68
67
if (targetAndAddend.first ) {
69
68
while (1 ) {
70
69
std::pair<Relocation *, uint64_t > nextTargetAndAddend =
71
- getRelocBranchInfo (*targetAndAddend.first , targetAndAddend.second );
70
+ getRelocBranchInfo (*targetAndAddend.first ,
71
+ targetAndAddend.second );
72
72
if (!nextTargetAndAddend.first )
73
73
break ;
74
74
targetAndAddend = nextTargetAndAddend;
0 commit comments