On Sun, Jul 20, 2014 at 9:28 AM, Andrew Fish <af...@apple.com> wrote:
> On Jul 19, 2014, at 9:42 PM, Jordan Justen <jljus...@gmail.com> wrote:
>> Anyway, I figured out what the issue is, but I don't have a solution yet.
>> https://gcc.gnu.org/ml/gcc-help/2014-07/msg00075.html
>>
>> Basically GCC 4.9 creates a 64-byte aligned section in the elf image,
>> but we instruct the linker to use 32 byte alignment. Then GenFw (which
>> also assumes 32 byte alignment) complains while trying to convert the
>> ELF image to PE/COFF.
>>
>
> The default alignment for image  (PE/COFF, ELF, etc.) sections is usually 4K 
> (page aligned).  We cranked the alignment down to 32 bytes (0x20) to make the 
> images smaller. There  is nothing magic about 32 bytes, it was just the 
> smallest alignment we could make work with VC++.
>
> I think if you set the section alignment to 64 bytes everything would just 
> work.
>
> I think that means you would need a different linker script fro GCC 4.9.
> https://svn.code.sf.net/p/edk2/code/trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script

Ok. I'll do this.

If we find a way to get GCC 4.9 to cap the alignment at 32 bytes, then
we can adjust the toolchain to save some space.

Thanks,

-Jordan

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to