Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-10-27 22:48:24 +0300
committerMartin Storsjö <martin@martin.st>2022-10-28 13:34:08 +0300
commit888d9e671fb5b44b74184e13beba2aa42133f4d6 (patch)
tree4bbdcc3a9948de6e9d112fb32d3724510955aeff /lld
parent2a812bdc70c6153f41907db056e348d9b322f01c (diff)
[LLD] [COFF] Include "rust_eh_personality" among the known personality functions
These need to have special treatment wrt to .eh_frame sections and GC - as long as we don't have a full parser of the .eh_frame section in the COFF linker. This fixes Rust unwind issues on i686 mingw as discussed in https://github.com/msys2/MINGW-packages/issues/9091. Differential Revision: https://reviews.llvm.org/D136879
Diffstat (limited to 'lld')
-rw-r--r--lld/COFF/Driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index ead9e984604a..6dbda1045152 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2415,7 +2415,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// For now, just manually try to retain the known possible personality
// functions. This doesn't bring in more object files, but only marks
// functions that already have been included to be retained.
- for (const char *n : {"__gxx_personality_v0", "__gcc_personality_v0"}) {
+ for (const char *n : {"__gxx_personality_v0", "__gcc_personality_v0",
+ "rust_eh_personality"}) {
Defined *d = dyn_cast_or_null<Defined>(ctx.symtab.findUnderscore(n));
if (d && !d->isGCRoot) {
d->isGCRoot = true;