From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in21.apple.com (mail-out21.apple.com [17.171.2.31]) (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 8F69721A16EE8 for ; Tue, 23 May 2017 16:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1495581938; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LaG6Okk9mmOe4wq+u+8VQYFYJPA3Ndg/7GmX52i1ZEA=; b=HKLkbf9IE+6fUmPgp5Uwe20fmwWcqeLJJV1WtbivDom6hNWhm/W8hsLR8sVw2E88 T3zTiVk6iTStOqZxoT9b4KraF5dyfRAMIb3/PNakUUTAqW6R/b9RL3Jw8QMhLL6o OHmUpzWGmQnq3DALL3IgNCnPd72g/78nFFb7TtQHEozUbSc96+tOEfIQFO0/8E67 NV+Xtb5dwGrdnX2BXKg+r3Q/S1fTMh1ZdDSTqAXQivT+QzWNzCTnpug9gOFed4/M /GD1DquYpw+OMlKnn2qBNf1yPVgeCNYVksRtBzpxgr32M49d5TzPuVsFbxd70kVZ KKe0W+ATatvlDdaPLZfsmg==; Received: from relay8.apple.com (relay8.apple.com [17.128.113.102]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in21.apple.com (Apple Secure Mail Relay) with SMTP id 2F.65.03314.0F4C4295; Tue, 23 May 2017 16:25:38 -0700 (PDT) X-AuditID: 11ab0215-aa5ff70000000cf2-ad-5924c4efd918 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by relay8.apple.com (Apple SCV relay) with SMTP id 60.D3.21490.FE4C4295; Tue, 23 May 2017 16:25:35 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.39.244] by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OQF00IJGIEM0V70@nwk-mmpp-sz10.apple.com>; Tue, 23 May 2017 16:25:35 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: <1495581673-10788-1-git-send-email-michael.d.kinney@intel.com> Date: Tue, 23 May 2017 16:25:33 -0700 Cc: edk2-devel@lists.01.org, Jeff Fan , Hao Wu , Laszlo Ersek Message-id: References: <1495581673-10788-1-git-send-email-michael.d.kinney@intel.com> To: Mike Kinney X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsUi2FCYpvvpiEqkwd8NehZ7Dh1ltrh66xeT xcn1Sxgtlh3bwWLR0fGPyYHVY/Gel0we3bP/sXi833eVLYA5issmJTUnsyy1SN8ugSvj4ptZ 7AUrRCruT3rG3MDYINjFyMkhIWAiMXH+RNYuRi4OIYG1TBJndi5hg0m8bF/HApE4xCjx9VkH WIJXQFDix+R7QAkODmYBeYmD52VBwswCWhLfH7VC1X9llHg2bzc7SEJYQFzi3ZlNzBB2iMSZ KYfA4mwCyhIr5n8AszkFvCUmXmxgArFZBFQllq34yAQxtFriS9MDqL02EkeWvmQH2Ssk4CXx 6JwHiCkioCPRvTIa4mRZiVuzLzGDnCAhsIdN4uq+TewTGIVnIbl6FsLVs5BcvYCReRWjcG5i Zo5uZp6RoV5iQUFOql5yfu4mRlAErGYS3cE4/5XhIUYBDkYlHl6J6SqRQqyJZcWVuYcYpTlY lMR5z8YDhQTSE0tSs1NTC1KL4otKc1KLDzEycXBKNTCumCQYufTF9KZduQ7rct7F+yaX+5oH THNs9pTQXOjR4MvaqNCasyT5lcbr45qFqZNu/1r8zTGr/Fjd2TOFt1xCjpYfcI5dNNHCKKOo PDDuZNDyU5dTuLLWf73Dr3Goqivw1MFlzqvN7569/eaT4CoNp+TDKtuf2LtuXsd2dVpA4Od/ ux5wtx5WYinOSDTUYi4qTgQAoS7hk2ECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRmVeSWpSXmKPExsUi2FBcpfv+iEqkwYnHBhZ7Dh1ltrh66xeT xcn1Sxgtlh3bwWLR0fGPyYHVY/Gel0we3bP/sXi833eVLYA5issmJTUnsyy1SN8ugSvj4ptZ 7AUrRCruT3rG3MDYINjFyMkhIWAi8bJ9HUsXIxeHkMAhRomvzzrYQBK8AoISPybfA0pwcDAL yEscPC8LEmYW0JL4/qgVqv4ro8SzebvZQRLCAuIS785sYoawQyTOTDkEFmcTUJZYMf8DmM0p 4C0x8WIDE4jNIqAqsWzFRyaIodUSX5oeQO21kTiy9CU7yF4hAS+JR+c8QEwRAR2J7pXRECfL StyafYl5AqPALCSHzkI4dBaSQxcwMq9iFChKzUmstNBLLCjISdVLzs/dxAgO18K0HYxNy60O MQpwMCrx8CY4qEQKsSaWFVfmAkOCg1lJhHf5BqAQb0piZVVqUX58UWlOavEhxiqg6ycyS4km 5wNjKa8k3tDExMDE2NjM2NjcxJwqwkrivJkJQJsF0hNLUrNTUwtSi2CWM3FwSjUwahbr/H71 7IzHvVW9BWs+n3u95sQi99WKdUl/q8yqz/yaJ6hXahJgxXl+q13A47DSm1GnA6ccP8fyK0C2 sp7r8O4EAzPl264nqhdyM3JkrNkWtD3cTHiy/LLDfwyO7nVPmizNl/3SKlmV75yko26EdeqG bd8N/exzFFIn7M9J7C7ZXrxwx9F9SizFGYmGWsxFxYkALtzHubICAAA= 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: Tue, 23 May 2017 23:25:39 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Mike, Do the other compilers promote (or is that demote) to static? Would not making these lib globals, and private functions static solve this class of issue? Thanks, Andrew Fish > On May 23, 2017, at 4:21 PM, Michael Kinney wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=573 > > The SecPeiDebugAgentLib uses the global variable > mMemoryDiscoveredNotifyList for a PPI notification on > the Memory Discovered PPI. This same variable name is > used in the DxeIplPeim for the same PPI notification. > > The XCODE5 tool chain detects this duplicate symbol > when the OVMF platform is built with the flag > -D SOURCE_DEBUG_ENABLE. > > The fix is to rename this global variable in the > SecPeiDebugAgentLib library. > > Cc: Andrew Fish > Cc: Jeff Fan > Cc: Hao Wu > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Michael D Kinney > --- > .../Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c > index b717e33..9f5223a 100644 > --- a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c > +++ b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c > @@ -32,7 +32,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mVectorHandoffInf > } > }; > > -GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_NOTIFY_DESCRIPTOR mMemoryDiscoveredNotifyList[1] = { > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_NOTIFY_DESCRIPTOR mDebugAgentMemoryDiscoveredNotifyList[1] = { > { > (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > &gEfiPeiMemoryDiscoveredPpiGuid, > @@ -554,7 +554,7 @@ InitializeDebugAgent ( > // Register for a callback once memory has been initialized. > // If memery has been ready, the callback funtion will be invoked immediately > // > - Status = PeiServicesNotifyPpi (&mMemoryDiscoveredNotifyList[0]); > + Status = PeiServicesNotifyPpi (&mDebugAgentMemoryDiscoveredNotifyList[0]); > if (EFI_ERROR (Status)) { > DEBUG ((EFI_D_ERROR, "DebugAgent: Failed to register memory discovered callback function!\n")); > CpuDeadLoop (); > -- > 2.6.3.windows.1 >