Hello,
I'm building a #GP fault handler for a shell application. I named my
file __gp_fault_handler.S and I added it to my inf file. Everything compiles
and
the exception handler actually works.
However, now I want to set a global variable that is declared in a
separate "C" file. When I assemble my file GAS uses a R_X86_64_32S offset to
the
variable. In my other "C" files I see that the compiler uses a R_X86_64_64
offset
to my variable instead.
How can I get the GNU assembler to output a R_X86_64_64 offset in the
EDK2 build?
Thanks,
Stephen
Here's a shortened version of my assembly code:
.extern EXCEPTION_EXECUTE_HANDLER
.global __gp_fault_handler
__gp_fault_handler: .code64
# Set the GP_FAULT flag
movl $1, EXCEPTION_EXECUTE_HANDLER
Here is the GNU assembler output:
Disassembly of section .text:
0000000000000000 <__gp_fault_handler>:
16: c7 04 25 00 00 00 00 movl $0x1,0x0
1d: 01 00 00 00
19: R_X86_64_32S EXCEPTION_EXECUTE_HANDLER
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel