[lld] Enough LLD changes to bootstrap OpenBSD on sparc64 (PR #207609)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 15:22:54 PDT 2026


================
@@ -3836,6 +3845,7 @@ void elf::combineEhSections(Ctx &ctx) {
     EhFrameSection &eh = *ctx.in.ehFrame;
     sec->parent = &eh;
     eh.addralign = std::max(eh.addralign, sec->addralign);
+    eh.flags |= sec->flags & SHF_WRITE;
----------------
jrtc27 wrote:

Hm, we currently do this for CHERI too, because we seal our return capabilities and therefore can't just do pointer arithmetic on them to get to a landing pad like you normally would with relative offsets. That is a bit ugly for various reasons though, not just requiring it to be relro rather than read-only, so we've talked about having a separate table of such capabilities that gets indexed by .eh_frame. But that's not what we do today. And to be honest, even if the input on non-CHERI is unnecessary, given it's little burden to support and is valid, should we not?

https://github.com/llvm/llvm-project/pull/207609


More information about the llvm-commits mailing list