On Fri, Jul 18, 2014 at 3:21 PM, Mendyke, DanielX <danielx.mend...@intel.com> wrote: > When running the ‘build.sh’ command I receive the following error message: > GenFw: Error 3000: Invalid > Unsupported section alignment
Someone reported this issue a few weeks back on irc. I couldn't reproduce it then, but now I am able to. On Fri, Jul 18, 2014 at 3:32 PM, Andrew Fish <af...@apple.com> wrote: > 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."); > } > } In trying to help debug it, I was looking at this code that you added in BaseTools r1760 "Fix an issue with mtoc not producing XIP images correctly as an area of zeros was not in the PE/COFF file image, but was in the virtual (memory) image. This makes for a file that does not run XIP. This code includes fixes from the code review done on the mailing list." Apparently some tool was buggy at that point. Is this still the case, and does it still need to be supported? If I get a patch for this, will you be able to check that toolchain? -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