[edk2-devel] [Patch V2 7/7] BaseTools/Conf: Fix Linux GCC ARM build issues with HII

Michael D Kinney michael.d.kinney at intel.com
Fri Nov 5 03:01:12 UTC 2021


Hi Leif,

I am dropping patch 7 from this series.

I am not able to get the ARM build failure resolved at this time.

The basic issue is that the GCC builds are using objcopy to create
and ELF image with an section named .hii with the HII data.  However,
objcopy can not set the ELF fields for the ABI correctly and some of
the linkers will complain if the ABI does not match, even if there
is no code associated with the ELF image.

We may need to consider a better solution for generating resource
sections that works for all toolchains instead of trying to use
objcopy.

Mike

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney at intel.com>
> Sent: Thursday, November 4, 2021 10:08 AM
> To: devel at edk2.groups.io; leif at nuviainc.com; Kinney, Michael D <michael.d.kinney at intel.com>
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>; Chen, Christine <yuwei.chen at intel.com>; Ard
> Biesheuvel <ardb+tianocore at kernel.org>
> Subject: RE: [edk2-devel] [Patch V2 7/7] BaseTools/Conf: Fix Linux GCC ARM build issues with HII
> 
> Hi Leif,
> 
> I will add NOOPT information to the commit message.
> 
> Unfortunately, this change caused a boot to shell failure for ArmVirtPkg QEMU.  TFTP dynamic shell command failed to find
> HII package.
> 
> 	https://github.com/tianocore/edk2/pull/2166
> 	https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=32907&view=logs&j=cf2d8b26-a21c-5c68-abf4-
> b944c123e462&t=5ffbbe5c-1d3a-55f5-5ef3-8a0ef80d76a1&l=547
> 
> I am investigating and will send a V3 with updates.
> 
> Mike
> 
> > -----Original Message-----
> > From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Leif Lindholm
> > Sent: Thursday, November 4, 2021 3:50 AM
> > To: Kinney, Michael D <michael.d.kinney at intel.com>
> > Cc: devel at edk2.groups.io; Feng, Bob C <bob.c.feng at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>; Chen, Christine
> > <yuwei.chen at intel.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>
> > Subject: Re: [edk2-devel] [Patch V2 7/7] BaseTools/Conf: Fix Linux GCC ARM build issues with HII
> >
> > On Wed, Nov 03, 2021 at 15:59:54 -0700, Michael D Kinney wrote:
> > > Update builds_rules.template to add $(SLINK) to the GCC
> > > steps for processing HII resources to produce a static
> > > library instead of an object file.  This improves linker
> > > compatibility and specifically fixes a link failure seen
> > > on Linux GCC ARM builds of the MdeModulePkg due to
> > > mismatched ABI types between the HII resource section
> > > and the rest of the libraries.
> > >
> > > Cc: Bob Feng <bob.c.feng at intel.com>
> > > Cc: Liming Gao <gaoliming at byosoft.com.cn>
> > > Cc: Yuwei Chen <yuwei.chen at intel.com>
> > > Cc: Leif Lindholm <leif at nuviainc.com>
> > > Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
> > > Signed-off-by: Michael D Kinney <michael.d.kinney at intel.com>
> >
> > This arguably looks like a plain fix in the first place.
> >
> > However, I am only able to trigger the build failure for the NOOPT
> > target. That may be useful to mention in the commit message.
> >
> > With that:
> > Reviewed-by: Leif Lindholm <leif at nuviainc.com>
> >
> > > ---
> > >  BaseTools/Conf/build_rule.template | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
> > > index 3add1029f276..5f59044da36d 100755
> > > --- a/BaseTools/Conf/build_rule.template
> > > +++ b/BaseTools/Conf/build_rule.template
> > > @@ -668,6 +668,8 @@
> > >
> > >      <Command.GCC>
> > >          "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
> > $(GENFW_FLAGS)
> > > -        "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
> > > +        "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc.obj
> > > +        "$(SLINK)" cr  ${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc.obj
> > > +
> > >      <Command.XCODE, Command.RVCT, Command.CLANGGCC>
> > >          "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
> > $(GENFW_FLAGS)
> > > --
> > > 2.32.0.windows.1
> > >
> >
> >
> > 
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83363): https://edk2.groups.io/g/devel/message/83363
Mute This Topic: https://groups.io/mt/86804632/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list