From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Russell Peterson <russell@mellanox.com>
Cc: "discuss@edk2.groups.io" <discuss@edk2.groups.io>,
edk2-devel-groups-io <devel@edk2.groups.io>,
Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()
Date: Mon, 17 Jun 2019 11:41:29 +0200 [thread overview]
Message-ID: <CAKv+Gu9ZqsnG51SuRCQH3oFUL8ccuaDiywuV0sSbhj2Umy13-A@mail.gmail.com> (raw)
In-Reply-To: <VI1PR05MB558306DC4F02323985A5A785C7E90@VI1PR05MB5583.eurprd05.prod.outlook.com>
On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@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: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Russell Peterson via Groups.Io
> Sent: Friday, June 14, 2019 5:19 PM
> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>; discuss@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.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>> wrote:
>
> On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek <lersek@redhat.com<mailto:lersek@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.
>
>
>
>
prev parent reply other threads:[~2019-06-17 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AM6PR05MB5572BFC98AF62AFED0244CC0C7EF0@AM6PR05MB5572.eurprd05.prod.outlook.com>
2019-06-14 19:17 ` [edk2-discuss] WriteSections64() Laszlo Ersek
2019-06-14 19:43 ` [edk2-devel] " Ard Biesheuvel
2019-06-14 21:19 ` Russell Peterson
[not found] ` <15A82D62E078CF58.4443@groups.io>
2019-06-15 0:17 ` Russell Peterson
2019-06-15 8:28 ` Ard Biesheuvel
2019-06-16 14:11 ` Russell Peterson
2019-06-17 12:56 ` Russell Peterson
2019-06-17 9:41 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu9ZqsnG51SuRCQH3oFUL8ccuaDiywuV0sSbhj2Umy13-A@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox