On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russ...@mellanox.com> wrote:
>
> Here is a sample of the gcc command line:
>
> "/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
> -I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g -fshort-wchar
> -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
> -ffunction-sections -fdata-sections -incl\
> ude AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os 
> -fshort-wchar -fno-builtin -fno-stri\
> ct-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common 
> -mlittle-endian -fno-short-enums -\
> fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address 
> -fno-asynchronous-unwind-tables\
>  -fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable 
> -Wno-unused-const-variable -mcmodel=tiny -n\
> ostdinc -nostdlib -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o 
> /x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
> BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files left out> 
> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
>

You are missing the -fno-unwind-tables option. Please make sure that
you apply commit cbf00651eda6818ca3c76115b8a18e3f6b23eef4 to your
tree.
> echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
> H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
> --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
> deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
> echo  /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
> twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
>
> -----Original Message-----
> From: disc...@edk2.groups.io <disc...@edk2.groups.io> On Behalf Of Russell 
> Peterson via Groups.Io
> Sent: Friday, June 14, 2019 5:19 PM
> To: Ard Biesheuvel <ard.biesheu...@linaro.org>
> Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek 
> <ler...@redhat.com>; disc...@edk2.groups.io
> Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()
>
> Hello, Ard.
>
> The tools_def.txt was updated and both the -fno-pie and -fno-pic are 
> specified when executing gcc.  I don’t have access to the code at the moment 
> but I will post the exact gcc command line as soon as I can.
>
> Regards,
>
> Russell
>
>
> On Jun 14, 2019, at 3:43 PM, Ard Biesheuvel 
> <ard.biesheu...@linaro.org<mailto:ard.biesheu...@linaro.org>> wrote:
>
> On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek 
> <ler...@redhat.com<mailto:ler...@redhat.com>> wrote:
>
> +Ard, +devel
>
> On 06/13/19 17:29, Russell Peterson wrote:
> Hello,
>
> We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3).  
> In the process of doing that we have hit an error building edk2:
>
> make[2]: *** 
> [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi]
>  Error 1
>  WriteSections64(): 
> /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
>  AARCH64 relative relocations require identical ELF and PE/COFF section 
> offsets
>
> There are multiple errors similar to this issued by GenFw.  Our edk2 version 
> is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all 
> this did build fine with gcc 7.3.  Any clues?
>
>
> Your Conf/tools_def.txt is probably stale, and does not contain the -fno-pie 
> option we added a while ago.
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42503): https://edk2.groups.io/g/devel/message/42503
Mute This Topic: https://groups.io/mt/32067395/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to