[PATCH] D136879: [LLD] [COFF] Include "rust_eh_personality" among the known personality functions

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 14:30:37 PDT 2022


mstorsjo added a comment.

In D136879#3889829 <https://reviews.llvm.org/D136879#3889829>, @rnk wrote:

> I read the Rust issue. Do you think we should do more to promote relocations to discarded sections into errors on mingw, so that this issue becomes a link error, not a runtime error?

Ideally yes, but apparently it's not that easy; we blanket disable the error for mingw due to how GCC handles their non-associative .rdata sections for jump tables: D52600 <https://reviews.llvm.org/D52600> Also we disable the error entirely for DWARF - since those aren't split up into nice associative sections, so if building with `-ffunction-sections` and GC, there will be plenty of relocations against discarded things. So offhand I don't really have any good ideas for doing it better, other than going all in for parsing `.eh_frame` like the ELF linker apparently does - but that's pretty much overkill wrt the effort I had hoped to spend on this issue...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136879/new/

https://reviews.llvm.org/D136879



More information about the llvm-commits mailing list