From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 178ED1A1E12 for ; Sun, 31 Jul 2016 23:03:07 -0700 (PDT) Received: by mail-io0-x229.google.com with SMTP id b62so177767572iod.3 for ; Sun, 31 Jul 2016 23:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zDGaY9np5UC2njsOWXPxzBUW0vnM4efPVGrmUnlLlfE=; b=QyPjHN/IvXHgkA9Eil/a9xY6JPRo2vT+iWeeUTWHob1vyN4UwQCMcVzU6gvqM6vJDm D3vCN30F8aPRYFmakHi+iD8/DAPO7ZzLb9tjo3+ULGcCZWTf0wwh4cAbVgj5tZmHpwSe /PPD/SwmBRMTL9XYd0iBjOxCcYyPlhYPCVUk4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zDGaY9np5UC2njsOWXPxzBUW0vnM4efPVGrmUnlLlfE=; b=Uq/2ersO4st748nqaUe7/uEcpeyridH8ETGr8MG2cGdYydl4JcOxgotLFfpuekcwjv zd9+a/kEZCc7UIGnvZz/6x1vtnLdULWUo5GEZajiLLmbT2nIOjJDQd1wI/+6pEcUPS/X 29ouXJHoR8hhmtbzoSuElHOXj0UxgMDaO5AYML+z0OtfUxsO1HTLmhxvm2uG2FliDReN Hj8q7/X5YsUvWDm/U3bKDfSECdDsscNMew4M5PTTuyD59zIcTWkgQVljjhQv3lgnZ4An K9+8xd1e7gHceg4mdnLcYJbM5LL45sYHLatYUjLy3elDZafVIhZbBgAq6CjZRVxui5v0 lbVQ== X-Gm-Message-State: AEkoouuOg2dj27kgQJlG4FsIsEx/IM8Fl8XTwE1dD8nkLvGGjw3T0ZiNJk/kXj5Y30tFa0ipu1TkthLVR9WARcDu X-Received: by 10.107.41.67 with SMTP id p64mr52153238iop.130.1470031386490; Sun, 31 Jul 2016 23:03:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Sun, 31 Jul 2016 23:03:06 -0700 (PDT) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E2CFC@shsmsx102.ccr.corp.intel.com> References: <1469618017-6534-1-git-send-email-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A1155E24F5@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A1155E2761@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A1155E2CFC@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Mon, 1 Aug 2016 08:03:06 +0200 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" , "lersek@redhat.com" , "Shi, Steven" , "Zhu, Yonghong" , "Justen, Jordan L" , "leif.lindholm@linaro.org" Subject: Re: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 06:03:07 -0000 Content-Type: text/plain; charset=UTF-8 On 1 August 2016 at 04:26, Gao, Liming wrote: > Ard: > My GNU ld (GNU Binutils for Ubuntu) 2.24. Which version you use? > > 1. #pragma GCC visibility push (hidden) , GCC5 with GCC49 tool chain pass. GCC5 with GCC5 tool chain failure. Here is failure message. > GenFw: Elf64Convert.c:424: ScanSections64: Assertion `((BOOLEAN)(0==1))' failed. > GenFw: ERROR 3000: Invalid > Did not find any '.text' section. > Aborted (core dumped) > > 2. #pragma GCC visibility push (protected), GCC5 with GCC49 tool chain failure, GCC5 with GCC5 tool chain pass. Failure message is below. > Thanks for checking. The problem with GCC5 is that the fact that '_ModuleEntryPoint' is also hidden, which confuses the LTO code and makes it eliminate all input objects. I think this is a bug in LTO, since the entry point is passed explicitly to the linker using the -e option. But we still need to work around it. Since the current issue (#2) is a problem with GCC49, I will propose a separate patch to fix it by changing the 'protected' to 'hidden'. I will then add a patch to my GCC5 series as well to work around the LTO problem. Thanks, Ard.