mirror of https://github.com/acidanthera/audk.git
SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors
Move ExceptionStubHeaderSize from 16 to 32 bits to work around clang relocation limitation. Use movw, not move for 32-bit segment register operations. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anderw Fish <afish@apple.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16067 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
41f80fbd99
commit
19ee4a9049
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
extern UINTN Exception0Handle;
|
extern UINTN Exception0Handle;
|
||||||
extern UINTN TimerInterruptHandle;
|
extern UINTN TimerInterruptHandle;
|
||||||
extern UINT16 ExceptionStubHeaderSize;
|
extern UINT32 ExceptionStubHeaderSize;
|
||||||
extern BOOLEAN mSkipBreakpoint;
|
extern BOOLEAN mSkipBreakpoint;
|
||||||
extern EFI_VECTOR_HANDOFF_INFO mVectorHandoffInfoDebugAgent[];
|
extern EFI_VECTOR_HANDOFF_INFO mVectorHandoffInfoDebugAgent[];
|
||||||
extern UINTN mVectorHandoffInfoCount;
|
extern UINTN mVectorHandoffInfoCount;
|
||||||
|
|
|
@ -33,7 +33,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
|
ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ ENDM
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
ExceptionStubHeaderSize DW Exception1Handle - Exception0Handle
|
ExceptionStubHeaderSize DD Exception1Handle - Exception0Handle
|
||||||
CommonEntryAddr DD CommonEntry
|
CommonEntryAddr DD CommonEntry
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
|
@ -34,7 +34,7 @@ ASM_GLOBAL ASM_PFX(CommonEntry)
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
ASM_PFX(ExceptionStubHeaderSize): .word ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
|
ASM_PFX(ExceptionStubHeaderSize): .long ASM_PFX(Exception1Handle) - ASM_PFX(Exception0Handle)
|
||||||
|
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
@ -271,13 +271,13 @@ NoExtrPush:
|
||||||
movzwq 32(%rbp), %rax
|
movzwq 32(%rbp), %rax
|
||||||
# movq %cs, %rax
|
# movq %cs, %rax
|
||||||
pushq %rax
|
pushq %rax
|
||||||
movq %ds, %rax
|
movw %ds, %rax
|
||||||
pushq %rax
|
pushq %rax
|
||||||
movq %es, %rax
|
movw %es, %rax
|
||||||
pushq %rax
|
pushq %rax
|
||||||
movq %fs, %rax
|
movw %fs, %rax
|
||||||
pushq %rax
|
pushq %rax
|
||||||
movq %gs, %rax
|
movw %gs, %rax
|
||||||
pushq %rax
|
pushq %rax
|
||||||
|
|
||||||
## UINT64 Rip;
|
## UINT64 Rip;
|
||||||
|
|
|
@ -32,7 +32,7 @@ AGENT_HANDLER_SIGNATURE MACRO
|
||||||
db 41h, 47h, 54h, 48h ; SIGNATURE_32('A','G','T','H')
|
db 41h, 47h, 54h, 48h ; SIGNATURE_32('A','G','T','H')
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
ExceptionStubHeaderSize dw Exception1Handle - Exception0Handle ;
|
ExceptionStubHeaderSize dd Exception1Handle - Exception0Handle ;
|
||||||
CommonEntryAddr dq CommonEntry ;
|
CommonEntryAddr dq CommonEntry ;
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
Loading…
Reference in New Issue