Use lambdas to store lazy-evaluated .dynamic entries.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM.
It's a lot bigger a change than I'd expected, but I like it!
lld/ELF/SyntheticSections.cpp | ||
---|---|---|
1176 ↗ | (On Diff #123894) | Missing const maybe - what's the policy on const in LLD? |
Comment Actions
It occurs to me that now that D39493 has landed, this change will need to include the intended change to using a lambda for the DT_MIPS_LOCAL_GOTNO entry. I used the following code to add it locally, in place of the current addInt():
Entries.push_back({DT_MIPS_LOCAL_GOTNO, [=] { return InX::MipsGot->getLocalEntriesNum(); }});
I'm still happy for this to go in with that change, or a similar one.