Message ID | 20190211183322.23133-1-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
Series | [edk2,edk2-platforms] Silicon/SynQuacer/Stage2Tables: fix build for cross compile from x86 | expand |
On Mon, Feb 11, 2019 at 07:33:22PM +0100, Ard Biesheuvel wrote: > AArch64 binutils support AArch32 seamlessly when running natively, > which allowed us to drop the -I objcopy argument specifying that > the input format is elf64-little, which is no longer accurate now > that the module can be built in 32-bit mode as well (which makes no > difference whatsoever given that the resulting binary image is only > a set of stage2 page tables) > > The same does not apply to binutils hosted on x86, so add back the > appropriate input format depending on the target type. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> > --- > Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > index f845015b9002..3e7039d586e1 100644 > --- a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > +++ b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > @@ -26,6 +26,8 @@ [Sources] > [BuildOptions] > *_*_*_OBJCOPY_PATH == objcopy > *_*_*_OBJCOPY_FLAGS == -O binary -j .rodata > + *_*_AARCH64_OBJCOPY_FLAGS = -I elf64-little > + *_*_ARM_OBJCOPY_FLAGS = -I elf32-little > *_*_*_ASM_FLAGS == -nostdlib -Wl,-e,0x81f8000,--section-start=.rodata=0x81f8000 > *_CLANG35_*_ASM_FLAGS = -no-integrated-as > *_CLANG38_*_ASM_FLAGS = -no-integrated-as > -- > 2.20.1 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On Mon, 11 Feb 2019 at 20:07, Leif Lindholm <leif.lindholm@linaro.org> wrote: > > On Mon, Feb 11, 2019 at 07:33:22PM +0100, Ard Biesheuvel wrote: > > AArch64 binutils support AArch32 seamlessly when running natively, > > which allowed us to drop the -I objcopy argument specifying that > > the input format is elf64-little, which is no longer accurate now > > that the module can be built in 32-bit mode as well (which makes no > > difference whatsoever given that the resulting binary image is only > > a set of stage2 page tables) > > > > The same does not apply to binutils hosted on x86, so add back the > > appropriate input format depending on the target type. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > Acked-by: Leif Lindholm <leif.lindholm@linaro.org> > Tested-by: Leif Lindholm <leif.lindholm@linaro.org> > Pushed as d7b29975f8f8..06454982de98 Thanks > > --- > > Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > > index f845015b9002..3e7039d586e1 100644 > > --- a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > > +++ b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf > > @@ -26,6 +26,8 @@ [Sources] > > [BuildOptions] > > *_*_*_OBJCOPY_PATH == objcopy > > *_*_*_OBJCOPY_FLAGS == -O binary -j .rodata > > + *_*_AARCH64_OBJCOPY_FLAGS = -I elf64-little > > + *_*_ARM_OBJCOPY_FLAGS = -I elf32-little > > *_*_*_ASM_FLAGS == -nostdlib -Wl,-e,0x81f8000,--section-start=.rodata=0x81f8000 > > *_CLANG35_*_ASM_FLAGS = -no-integrated-as > > *_CLANG38_*_ASM_FLAGS = -no-integrated-as > > -- > > 2.20.1 > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf index f845015b9002..3e7039d586e1 100644 --- a/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf +++ b/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf @@ -26,6 +26,8 @@ [Sources] [BuildOptions] *_*_*_OBJCOPY_PATH == objcopy *_*_*_OBJCOPY_FLAGS == -O binary -j .rodata + *_*_AARCH64_OBJCOPY_FLAGS = -I elf64-little + *_*_ARM_OBJCOPY_FLAGS = -I elf32-little *_*_*_ASM_FLAGS == -nostdlib -Wl,-e,0x81f8000,--section-start=.rodata=0x81f8000 *_CLANG35_*_ASM_FLAGS = -no-integrated-as *_CLANG38_*_ASM_FLAGS = -no-integrated-as
AArch64 binutils support AArch32 seamlessly when running natively, which allowed us to drop the -I objcopy argument specifying that the input format is elf64-little, which is no longer accurate now that the module can be built in 32-bit mode as well (which makes no difference whatsoever given that the resulting binary image is only a set of stage2 page tables) The same does not apply to binutils hosted on x86, so add back the appropriate input format depending on the target type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables.inf | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel