public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Gao, Liming" <liming.gao@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"lersek@redhat.com" <lersek@redhat.com>,
	 "Shi, Steven" <steven.shi@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	 "leif.lindholm@linaro.org" <leif.lindholm@linaro.org>
Subject: Re: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode
Date: Fri, 29 Jul 2016 08:40:40 +0200	[thread overview]
Message-ID: <CAKv+Gu-7iyCHPZvp_w1Gzt1bqdz4GH=JaNkuC+bY2MWs6KSbyg@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu9OExQc-B0QqtwfbiDrSkK6VybWQsT5kZys1yZRTx60ug@mail.gmail.com>

On 29 July 2016 at 08:09, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 29 July 2016 at 06:47, Gao, Liming <liming.gao@intel.com> wrote:
>> Ard:
>>   Thanks for your update. I have some comments for them.
>> 1) It uses GCC as Link for GCC44-GCC49. Have you done verification on them? I verify GCC49 in OVMFIa32X64 platform. It works.
>
> Yes, I tested all of them.
>
>> 2) After this change, how to append new link option in platform DSC? Use style -Wl, ?
>
> It depends. Some options (like -z) don't need it, but others do.
>
>> 3) I see GCC5 uses gcc-ar as its SLINK, and GCC49 uses ar as its SLINK. Is gcc-ar required only by LTO?
>
> Yes
>
>> 4) Before GCC49 optimization, GCC49 means GCC49 or later, GCC5 can work with GCC49 tool chain configuration. But now, I configure gcc to point to GCC5, and build OVMF with GCC49 tool chain, it reports GenFw failure. I expect GCC5 work with GCC49 and GCC5 tool chain both. GCC49 for no lto, GCC5 for lto. I know Steven has provided the patch to fix this GenFw issue.
>>
>> GenFw: ERROR 3000: Invalid
>>   /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x9.
>> GenFw: ERROR 3000: Invalid
>>   /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x9.
>> GenFw: ERROR 3000: Invalid
>>
>
> Which GCC version are you using?
>

I cannot reproduce this with gcc version 5.4.0 20160609 (Ubuntu
5.4.0-6ubuntu1~16.04.1)

In any case, I think we should merge Steven's patch that adds handling
to the relocation types to GenFw. The issue is only that having a GOT
does not make a lot of sense for UEFI executables, since it forces a
symbol reference to be absolute, which uses more space in the code,
but also in the .reloc section. The visibility pragma I introduced for
GCC4x was intended to prevent GOT based relocations from being
emitted.


  reply	other threads:[~2016-07-29  6:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1469618017-6534-1-git-send-email-ard.biesheuvel@linaro.org>
2016-07-29  4:47 ` [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode Gao, Liming
2016-07-29  6:09   ` Ard Biesheuvel
2016-07-29  6:40     ` Ard Biesheuvel [this message]
2016-07-29 15:18       ` Gao, Liming
2016-07-29 18:21         ` Ard Biesheuvel
2016-07-30 14:34         ` Ard Biesheuvel
2016-07-31 19:04           ` Ard Biesheuvel
2016-08-01  2:26             ` Gao, Liming
2016-08-01  6:03               ` Ard Biesheuvel
2016-07-29 20:33     ` Jordan Justen
2016-07-30  9:22       ` Ard Biesheuvel

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+Gu-7iyCHPZvp_w1Gzt1bqdz4GH=JaNkuC+bY2MWs6KSbyg@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