grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Failed to build with "-mretpoline"
Date: Thu, 22 Feb 2024 20:32:40 +0300	[thread overview]
Message-ID: <CAEaD8JP0QM40U32SaHLFdf+5_5uXNqw6n1VhV+tDtDNdOzPthw@mail.gmail.com> (raw)
In-Reply-To: <PH0PR11MB4902E6AB90F0AEDC7EC55BE6D74B2@PH0PR11MB4902.namprd11.prod.outlook.com>


[-- Attachment #1.1: Type: text/plain, Size: 1149 bytes --]

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
>

[-- Attachment #1.2: Type: text/html, Size: 5263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

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

      parent reply	other threads:[~2024-02-22 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 10:48 Failed to build with "-mretpoline" Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco) via Grub-devel
2024-02-22 15:21 ` Daniel Kiper
2024-02-22 17:32 ` Vladimir 'phcoder' Serbinenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEaD8JP0QM40U32SaHLFdf+5_5uXNqw6n1VhV+tDtDNdOzPthw@mail.gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).