But what can you do with absolute addressing to _NullSeg?
-------
_EntryPoint:
DD _ToUserCode - ASM_PFX(m16Start)
DW CODE16
_16Gdtr:
DW GDT_SIZE - 1
_16GdtrBase:
DQ _NullSeg
-------
On 28.08.2014, at 15:16, Andrew Fish wrote:
>
> On Aug 28, 2014, at 12:15 AM, Sergey Isakov <isakov...@bk.ru> wrote:
>
>>>
>>>
>>> Actually I just noticed you are getting an illegal text-relocation error.
>>> This is usually caused by an absolute relocation, and clang wants it to be
>>> IP relative. Basically Xcode/clang only supports a subset of the
>>> relocations that gcc uses for X64.
>> If I correctly understand you, compilation for Thunk16 is not possible in
>> XCLANG toolset because of idea of this codes?
>>
>
> No, but this toolchain puts extra restrictions on how things can be coded.
>
> For example Thunk16.asm contains absolute addressing
> lea r8, @RetFromRealMode
> But in Thunk16.S this is converted to IP relative addressing to support
> clang.
> lea L_RetFromRealMode(%rip), %r8
> Some of the .set address math in Thunk16.S is also working around addressing
> mode limitations, as it removes relocations from the code.
>
> Thanks,
>
> Andrew Fish
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel