diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionH=
andlerAsm.nasm b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHan=
dlerAsm.nasm
similarity index 92%
rename from UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHa=
ndlerAsm.nasm
rename to UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm=
.nasm
index 957478574253e619..10af4cfcdb6b1ea2 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerA=
sm.nasm
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm
@@ -59,7 +59,7 @@ AsmIdtVectorBegin:
%rep 256=0D
push strict dword %[Vector] ; This instruction pushes sign-extended=
8-byte value on stack=0D
push rax=0D
- mov rax, strict qword 0 ; mov rax, ASM_PFX(CommonInterruptE=
ntry)=0D
+ mov rax, ASM_PFX(CommonInterruptEntry)=0D

I'm fairly certain this can be a relative reference, as the code doesn't seem to be copied away (as opposed to HookAfterStubHeaderBegin). If true, this would save 256 relocs, which sounds quite nice. Would you mind verifying? Thanks!

Marvin,

You are right the mov can be replaced with “lea”. But, we need to analyze if using lea, the size of each idt stub is fixed or variant (today the size is fixed, so StubSize = TotalSize / 256).

Another thing we need to evaluate is the impact to “Hook after” feature because “hook after” stub is very like the idt stub.

I think we can firstly use Ard’s solution. Later to evaluate to eliminate unnecessary absolute reference.

Thanks,

Ray