grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed to build with "-mretpoline"


From: Vladimir 'phcoder' Serbinenko
Subject: Re: Failed to build with "-mretpoline"
Date: Thu, 22 Feb 2024 20:32:40 +0300

Hello. Why does it create duplicate global symbols? How does LD handle the same situation?

Le ven. 9 févr. 2024, 16:58, Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco) via Grub-devel <grub-devel@gnu.org> a écrit :
Hi,

We are bulding grub with clang that use -mretpoline option. This leads to symbols __llvm_retpoline_[eax/ecx/edx, etc.] generated into binaries. And caused  duplicates error during moddep.lst creation.
I'm not sure if this fix will be a bit project specific?

diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk
index 2474363..f859854 100644
--- a/grub-core/genmoddep.awk
+++ b/grub-core/genmoddep.awk
@@ -18,7 +18,7 @@ BEGIN {
{
if ($1 == "defined") {
- if ($3 !~ /^\.refptr\./ && $3 in symtab) {
+ if ($3 !~ /__llvm_retpoline_.*/ && $3 !~ /^\.refptr\./ && $3 in symtab) {
printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr";
error++;
}

Regards,
Oleksiy
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]