Patch for  Bug 3715 -  Some tools fail to compile for NOOPT with clang-13.
--
Михаил Кричанов
 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83295): https://edk2.groups.io/g/devel/message/83295
Mute This Topic: https://groups.io/mt/86803253/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


From 76be193a80051662fe6a83307285e5fdde71be6f Mon Sep 17 00:00:00 2001
From: ocbuild <ocbuild@acidanthera.local>
Date: Fri, 22 Oct 2021 16:20:16 +0300
Subject: [PATCH] Fix for NOOPT CLANG38 compilation with clang-13.

---
 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 d917a44..b785998 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 via email to