From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C6CC21952CD8 for ; Thu, 25 May 2017 09:08:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77715C056828; Thu, 25 May 2017 16:08:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 77715C056828 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 77715C056828 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-147.phx2.redhat.com [10.3.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1505F5DD60; Thu, 25 May 2017 16:08:39 +0000 (UTC) To: "Kinney, Michael D" , Ard Biesheuvel , "Andrew Fish (afish@apple.com)" Cc: "Wu, Hao A" , "edk2-devel@lists.01.org" , "Fan, Jeff" References: <1495581673-10788-1-git-send-email-michael.d.kinney@intel.com> From: Laszlo Ersek Message-ID: <60f3303b-c333-101d-b6e5-806ab85075a9@redhat.com> Date: Thu, 25 May 2017 18:08:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 25 May 2017 16:08:41 +0000 (UTC) Subject: Re: [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 16:08:42 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/25/17 03:47, Kinney, Michael D wrote: > Andrew, > > I think I have found an alternate fix for this XCODE5 specific > build failure. Since there appears to be a difference in the > linker behavior between MSFT/GCC/XCODE tool chains, I reviewed > the 'ld' command line options used in XCODE5 tool chain in > tools_def.txt. > > There is a flag set call '-all_load'. The description of this > flag is 'Loads all members of static archive libraries.'. > > I tried removing this flag from the XCODE5 specific SLINK_FLAGS > and DLINK_FLAGS statements in tools_def.txt, and the duplicate > symbol build failure is no longer present. I am able to build > and boot OVMF with XCODE5 with -D SOURCE_DEBUG_ENABLE flag set. > > This seems to make XCODE5 linker behavior match the MSFT and GCC > linker behavior. > > Do you know why '-all_load' is used in XCODE5 and what impacts > there may be from removing it? Please don't remove -all_load from there; instead we should figure out if the same can be brought to MSFT and GCC. The error message that XCODE5 emitted caught a real bug (undefined behavior according to ISO C, see my previous email), and so we should keep that detection enabled (we should even extend it to other toolchains, if that's possible). As for docs, I found this: http://www.manpages.info/macosx/ld.1.html > -all_load > Loads all members of static archive libraries. This option does > not apply to dynamic shared libraries. Thanks Laszlo