Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Ard Biesheuvel c9f297559b BaseTools X64: fold PLT relocations into simple relative references
For X64/GCC, we use position independent code with hidden visibility
to inform the compiler that symbol references are never resolved at
runtime, which removes the need for PLTs and GOTs. However, in some
cases, GCC has been reported to still emit PLT based relocations, which
we need to handle in the ELF to PE/COFF perform by GenFw.

Unlike GOT based relocations, which are non-trivial to handle since the
indirections in the code can not be fixed up easily (although relocation
types exist for X64 that annotate relocation targets as suitable for
relaxation), PLT relocations simply point to jump targets, and we can
relax such relocations by resolving them using the symbol directly rather
than via a PLT entry that does nothing more than tail call the function
we already know it is going to call (since all symbol references are
resolved in the same module).

So handle R_X86_64_PLT32 as a R_X86_64_PC32 relocation.

Suggested-by: Steven Shi <steven.shi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-08-08 08:26:41 +02:00
AppPkg AppPkg/.../Python: Clean up and document how to escape the -# option. 2016-01-06 01:00:19 +00:00
ArmPkg ArmPkg/CompilerIntrinsicsLib: make the default memset() weak 2016-08-05 16:32:36 +02:00
ArmPlatformPkg ArmPlatformPkg: change PcdBdsLinuxSupport default value 2016-08-04 14:32:19 +01:00
ArmVirtPkg ArmVirtPkg ARM: make relocatable PrePi users build with CLANG35 2016-08-03 15:45:23 +02:00
BaseTools BaseTools X64: fold PLT relocations into simple relative references 2016-08-08 08:26:41 +02:00
BeagleBoardPkg BeagleBoardPkg: Convert to build FatPkg from source 2016-04-07 20:45:39 +02:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg/SecCore: Adding NASM files in SecCore module 2016-08-03 17:20:17 -07:00
CorebootPayloadPkg CorebootModulePkg/PciHostBridgeLib: Fix PCI 64bit memory BAR size issue 2016-05-27 14:28:37 -07:00
CryptoPkg CryptoPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:13 +08:00
DuetPkg DuetPkg FSVariable: return error for empty str VariableName to GetVariable 2016-05-15 17:48:53 +08:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix GCC build failure 2016-08-01 12:44:44 +08:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg: make PrePiMemoryAllocationLib a SEC type library 2016-08-03 15:45:23 +02:00
EmulatorPkg BaseTools GCC: use 'gcc' as the linker command for GCC44 and later 2016-08-02 08:40:43 +02:00
FatBinPkg FatBinPkg: Change to 2-clause BSD license 2016-04-22 00:55:21 -07:00
FatPkg FatPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:03 +08:00
IntelFrameworkModulePkg IntelFrameworkModulePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:04 +08:00
IntelFrameworkPkg IntelFrameworkPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:04 +08:00
IntelFsp2Pkg IntelFsp2Pkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:05 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:05 +08:00
IntelFspPkg IntelFspPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:06 +08:00
IntelFspWrapperPkg IntelFspWrapperPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:06 +08:00
IntelSiliconPkg IntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD 2016-06-16 08:42:44 +08:00
MdeModulePkg MdeModulePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:07 +08:00
MdePkg MdePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:08 +08:00
NetworkPkg NetworkPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:08 +08:00
Nt32Pkg Nt32Pkg: Make Shell as the first boot option 2016-08-01 12:58:43 +08:00
Omap35xxPkg Omap35xxPkg: drop CpuExceptionHandlerLib library class resolution 2016-03-17 09:15:11 +01:00
OptionRomPkg OptionRomPkg: Fix typos in comments 2016-07-11 10:29:47 +08:00
OvmfPkg OvmfPkg: use StatusCode Router and Handler from MdeModulePkg 2016-08-02 20:52:10 +02:00
PcAtChipsetPkg PcAtChipsetPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:09 +08:00
PerformancePkg PerformancePkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:09 +08:00
QuarkPlatformPkg QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos 2016-06-30 13:08:14 +02:00
QuarkSocPkg QuarkSocPkg/SmmCpuFeaturesLib: Add SMRR PhysBase/PhysMask fields check 2016-05-19 10:04:34 -07:00
SecurityPkg SecurityPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:10 +08:00
ShellBinPkg ShellBinPkg Arm/AArch64 Shell binary update 2016-08-02 12:25:13 +02:00
ShellPkg ShellPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:11 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:11 +08:00
StdLib StdLib: Series of patches to fix typos - availabe to available 2016-07-07 15:23:19 -07:00
StdLibPrivateInternalFiles StdLib: Clarify and improve comments. 2016-01-06 00:31:42 +00:00
UefiCpuPkg UefiCpuPkg DSC: Add build option to disable deprecated APIs 2016-08-08 11:00:12 +08:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2DeviceRefCodePkg/ValleyView2Soc: Remove the unused code 2016-08-03 11:02:19 +08:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg/FvbRuntimeDxe: Remove unused variables 2016-08-03 16:09:44 +08:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt BaseTools: Updated BuildNotes URLs 2016-03-25 09:46:44 +08:00
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 2015-10-08 09:29:36 +00:00
Maintainers.txt Change ShellPkg&ShellBinPkg maintainer 2016-07-06 08:05:21 -07:00
edksetup.bat Update edksetup.bat to check NASM system environment variable 2016-07-26 10:16:48 +08:00
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00