On 19/06/14 13:59, Andrew Fish wrote:
> 
> On Jun 19, 2014, at 11:58 AM, e...@ragequ.it wrote:
> 
> > I changed the `retf` to a `ret` to get it to assemble for now.
> > 
> 
> That looks right. I think it should be ret.
i'm pretty certain this should be lret. Basically either the osx assembler
should support retf(which I have a patch for, but probably won't happen ever)
or it should use lret, which is exactly the same instruction.

> 
> > Issue #2
> > 
> > Next issue is with the ACPI tables:
> > 
> > Issue #3
> Try changing your *_*_*_ASLDLINK_FLAGS in Conf/tools_def.txt to look like:  
> -e _ReferenceAcpiTable -preload -segalign 0x20  -pie -seg1addr 0x240 
> -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
the link_flags look fine, but it's like that you have a newer iasl therefore
the cc and pp flags might need adjustment as well.

*_ASLCC_FLAGS      = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing 
-Wall -Werror -Wno-missing-braces -c -include AutoGen.h
*_ASLPP_FLAGS      = -x c -E -P



> No. The library has non PC relative addressing in it and this is not 
> supported by the linker. When building the UefiCpuPkg.dsc this library is 
> built, but not linked so you don’t hit this error building the package. Just 
> linking the library. 
> 
> So things like:
> movabsq ASM_PFX(mDoFarReturnFlag), %ax
> 
> Need to be:
> movzbl    ASM_PFX(mDoFarReturnFlag)(%rip), %eax
> 
> You need to convert any assembly code using absolute addresses to to relative 
> addressing. 
I gave up at this point. This is a major PITA. At this point my recommendation
is to make a gcc 48 efi cross compiler. Andrew gave me some help for these
too, but I don't think it's worth exploring.

Even if you manage to this to compile somehow the emulator will crash. At
least it did for me.

Basically the osx linker does not support PIE(amongst other things).

You can build an efi cross compiler with the code available here:

https://github.com/STLVNUB/CloverGrower

personally I modified the script for easier and stripped down use. If you want
I'll up the fork when I have time, (which won't be until next thursday)


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to