X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FX64%2FProcessorBind.h;fp=MdePkg%2FInclude%2FX64%2FProcessorBind.h;h=a4aad3e524e8e52497be50b2bc1d277368687206;hp=705104af062a9e3506645c8d1f8324cceb64f60e;hb=1252a681a67da81bf1304c7ac836f90eab8bb7cb;hpb=17ab1ec5accc866b77446f4e336e982bb5e1cc9f diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 705104af06..a4aad3e524 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -27,6 +27,15 @@ #pragma pack() #endif +#if defined(__GNUC__) && defined(__pic__) +// +// Mark all symbol declarations and references as protected, 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. +// +#pragma GCC visibility push (protected) +#endif #if defined(__INTEL_COMPILER) //