================
@@ -626,6 +627,11 @@ int main(int argc, char **argv) {
Str.reset(TheTarget->createAsmStreamer(Ctx, std::move(FOut), std::move(IP),
std::move(CE), std::move(MAB)));
+ Triple T(TripleName);
+ if (T.isLFI()) {
+ Str->initSections(NoExecStack, *STI);
----------------
zyedidia wrote:
I believe this was required since `initializeLFIMCStreamer` uses
`pushSection`/`popSection` to insert the LFI ABI Note section, so there must be
an existing section to avoid a crash. See this failure in the pending PR that
performs rewrites:
https://github.com/llvm/llvm-project/pull/186896#issuecomment-4107740880.
I'm happy to restructure this if you want a different approach -- please let me
know if there is something that comes to mind.
https://github.com/llvm/llvm-project/pull/172906
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits