public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'Mikhail Krichanov'" <krichanov@ispras.ru>, <devel@edk2.groups.io>
Cc: "'Bob Feng'" <bob.c.feng@intel.com>,
	"'Yuwei Chen'" <yuwei.chen@intel.com>,
	"'Vitaly Cheptsov'" <vit9696@protonmail.com>
Subject: 回复: [PATCH] BaseTools: Fix for NOOPT CLANG38 compilation with clang-13
Date: Wed, 15 Dec 2021 13:33:50 +0800	[thread overview]
Message-ID: <01f201d7f175$571a5490$054efdb0$@byosoft.com.cn> (raw)
In-Reply-To: <20211208100517.20306-1-krichanov@ispras.ru>

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Mikhail Krichanov <krichanov@ispras.ru>
> 发送时间: 2021年12月8日 18:05
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Vitaly
> Cheptsov <vit9696@protonmail.com>; Mikhail Krichanov
> <krichanov@ispras.ru>
> 主题: [PATCH] BaseTools: Fix for NOOPT CLANG38 compilation with clang-13
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3715
> REF CI: https://github.com/tianocore/edk2/pull/2241
> 
> We must treat not only R_X86_64_PLT32 as R_X86_64_PC32
> (https://github.com/torvalds/linux/commit/
> b21ebf2fb4cde1618915a97cc773e287ff49173e),
> but also treat R_386_PLT32 relocation as R_386_PC32
> (https://github.com/torvalds/linux/commit/
> bb73d07148c405c293e576b40af37737faf23a6a).
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Vitaly Cheptsov <vit9696@protonmail.com>
> Signed-off-by: Mikhail Krichanov <krichanov@ispras.ru>
> ---
>  BaseTools/Source/C/GenFw/Elf32Convert.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c
> b/BaseTools/Source/C/GenFw/Elf32Convert.c
> index d917a444c8..b785998492 100644
> --- a/BaseTools/Source/C/GenFw/Elf32Convert.c
> +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
> @@ -779,6 +779,7 @@ WriteSections32 (
>              *(UINT32 *)Targ = *(UINT32 *)Targ - SymShdr->sh_addr
>                + mCoffSectionsOffset[Sym->st_shndx];
>              break;
> +          case R_386_PLT32:
>            case R_386_PC32:
>              //
>              // Relative relocation: Symbol - Ip + Addend
> @@ -900,6 +901,7 @@ WriteRelocations32 (
>            if (mEhdr->e_machine == EM_386) {
>              switch (ELF_R_TYPE(Rel->r_info)) {
>              case R_386_NONE:
> +            case R_386_PLT32:
>              case R_386_PC32:
>                //
>                // No fixup entry required.
> @@ -1168,5 +1170,3 @@ CleanUp32 (
>      free (mCoffSectionsOffset);
>    }
>  }
> -
> -
> --
> 2.20.1



           reply	other threads:[~2021-12-15  5:33 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20211208100517.20306-1-krichanov@ispras.ru>]

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-list 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='01f201d7f175$571a5490$054efdb0$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /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