On Jul 18, 2014, at 3:21 PM, Mendyke, DanielX <danielx.mend...@intel.com> wrote:

>  
> I’m running Archlinux kernel 3.15
> Using gcc 4.9
> Python 2.7.8
>  
> I downloaded a current snapshot of OvmfPkg.
> When running the ‘build.sh’ command I receive the following error message:
>  
>                 GenFw: Error 3000: Invalid
>                                 Unsupported section alignment
>  

What process architecture are you compiling for?

This error message usually indicates an issue converting the ELF image produced 
by the compiler into a PE/COFF image for EFI. 

~/work/src/edk2(master)>git grep "Unsupported section alignment"
Binary file BaseTools/Bin/Win32/GenFw.exe matches
BaseTools/Source/C/GenFw/Elf32Convert.c:313:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");
BaseTools/Source/C/GenFw/Elf32Convert.c:368:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");
BaseTools/Source/C/GenFw/Elf32Convert.c:399:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");
BaseTools/Source/C/GenFw/Elf64Convert.c:307:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");
BaseTools/Source/C/GenFw/Elf64Convert.c:362:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");
BaseTools/Source/C/GenFw/Elf64Convert.c:393:          Error (NULL, 0, 3000, 
"Invalid", "Unsupported section alignment.");

https://svn.code.sf.net/p/edk2/code/trunk/edk2/BaseTools/Source/C/GenFw/Elf32Convert.c
https://svn.code.sf.net/p/edk2/code/trunk/edk2/BaseTools/Source/C/GenFw/Elf64Convert.c

  mCoffOffset = CoffAlign(mCoffOffset);
  SectionCount = 0;
  for (i = 0; i < mEhdr->e_shnum; i++) {
    Elf_Shdr *shdr = GetShdrByIndex(i);
    if (IsTextShdr(shdr)) {
      if ((shdr->sh_addralign != 0) && (shdr->sh_addralign != 1)) {
        // the alignment field is valid
        if ((shdr->sh_addr & (shdr->sh_addralign - 1)) == 0) {
          // if the section address is aligned we must align PE/COFF
          mCoffOffset = (UINT32) ((mCoffOffset + shdr->sh_addralign - 1) & 
~(shdr->sh_addralign - 1));
        } else if ((shdr->sh_addr % shdr->sh_addralign) != (mCoffOffset % 
shdr->sh_addralign)) {
          // ARM RVCT tools have behavior outside of the ELF specification to 
try
          // and make images smaller.  If sh_addr is not aligned to sh_addralign
          // then the section needs to preserve sh_addr MOD sh_addralign.
          // Normally doing nothing here works great.
          Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
        }
      }

Thanks,

Andrew Fish

>  
> Also “error 7000” and “error F002”
>  
> I have searched through the archive and the internet for a solution to this 
> problem.  What does the error message refer to and how can I correct it and 
> build a QEMU image?
>  
> -D
>  
> ------------------------------------------------------------------------------
> 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

------------------------------------------------------------------------------
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