[edk2-devel] [PATCH v6 03/11] MdePkg: don't set visibility to hidden

Gerd Hoffmann posted 11 patches 4 months, 1 week ago
[edk2-devel] [PATCH v6 03/11] MdePkg: don't set visibility to hidden
Posted by Gerd Hoffmann 4 months, 1 week ago
Not needed any more on modern toolchains, they are better
in not creating a GOT without this trick.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
 MdePkg/Include/X64/ProcessorBind.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h
index cdbb4fd6d3d1..bc152ea761f9 100644
--- a/MdePkg/Include/X64/ProcessorBind.h
+++ b/MdePkg/Include/X64/ProcessorBind.h
@@ -21,20 +21,6 @@
   #pragma pack()
-#if defined (__GNUC__) && defined (__pic__) && !defined (USING_LTO)  && !defined (__APPLE__)
-// Mark all symbol declarations and references as hidden, meaning they will
-// not be subject to symbol preemption. This allows the compiler to refer to
-// symbols directly using relative references rather than via the GOT, which
-// contains absolute symbol addresses that are subject to runtime relocation.
-// The LTO linker will not emit GOT based relocations when all symbol
-// references can be resolved locally, and so there is no need to set the
-// pragma in that case (and doing so will cause other issues).
-  #pragma GCC visibility push (hidden)
 #if defined (__INTEL_COMPILER)
 // Disable ICC's remark #869: "Parameter" was never referenced warning.

Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105254): https://edk2.groups.io/g/devel/message/105254
Mute This Topic: https://groups.io/mt/99109299/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]