From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.4717.1678153458993757622 for ; Mon, 06 Mar 2023 17:44:19 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8BxttjvlgZkMyUJAA--.16504S3; Tue, 07 Mar 2023 09:44:15 +0800 (CST) Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxB73vlgZkRGdNAA--.3696S3; Tue, 07 Mar 2023 09:44:15 +0800 (CST) Message-ID: <18098106-4cc3-9874-e3eb-35b1b2911393@loongson.cn> Date: Tue, 7 Mar 2023 09:44:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [edk2-devel] [PATCH] Platform/Loongson: Allow building with stack protector support To: devel@edk2.groups.io, git@xen0n.name Cc: Bibo Mao , Xianglai li , Leif Lindholm , Michael D Kinney References: <20230305044035.476989-1-git@xen0n.name> From: "Chao Li" In-Reply-To: <20230305044035.476989-1-git@xen0n.name> X-CM-TRANSID: AQAAf8BxB73vlgZkRGdNAA--.3696S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQACCGQEhnMnBwAvsR X-Coremail-Antispam: 1Uk129KBjvJXoW7Ww48tFWrZw47WF4ruw13twb_yoW8JFWxpF 1rAa1xKr1UJr4jy398Ca4DKF4qyFyDGFyDJF4DJr429r9xJ3WkW3yayFs8tr43Aa4Sqa48 Xay8Ka1Uu3WDWFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUb4AYFVCjjxCrM7AC8VAFwI0_Jr0_ Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFV AK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2 z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4j6r4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l 57IF6xkI12xvs2x26I8E6xACxx1lYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14 v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCjr7xvwVCIw2I0I7xG 6c02F41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7x kEbVWUJVW8JwC20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E 67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1x MIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvf C2KfnxnUUI43ZEXa7IU14rW5UUUUU== Content-Type: multipart/alternative; boundary="------------Aov9Mwy0X28ji63uZ9msO0D3" --------------Aov9Mwy0X28ji63uZ9msO0D3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Reviewed-by: Chao Li Thanks, Chao 在 2023/3/5 12:40, WANG Xuerui 写道: > Some toolchains have stack protection enabled by default, so without the > appropriate library included the build will fail with missing symbols > during link. > > Cc: Bibo Mao > Cc: Xianglai li > Cc: Chao Li > Cc: Leif Lindholm > Cc: Michael D Kinney > Signed-off-by: WANG Xuerui > --- > Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > index d1162519cd..465e9229a2 100644 > --- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > +++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc > @@ -95,6 +95,9 @@ > TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf > !endif > > + # For stack protector support > + NULL | MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf > + > BaseLib | MdePkg/Library/BaseLib/BaseLib.inf > SafeIntLib | MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf > TimeBaseLib | EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf --------------Aov9Mwy0X28ji63uZ9msO0D3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Reviewed-by: Chao Li <lichao@loongson.cn>


Thanks,
Chao
在 2023/3/5 12:40, WANG Xuerui 写道:
Some toolchains have stack protection enabled by default, so without the
appropriate library included the build will fail with missing symbols
during link.

Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Xianglai li <lixianglai@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: WANG Xuerui <git@xen0n.name>
---
 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
index d1162519cd..465e9229a2 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -95,6 +95,9 @@
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
 
+  # For stack protector support
+  NULL                             | MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
   BaseLib                          | MdePkg/Library/BaseLib/BaseLib.inf
   SafeIntLib                       | MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   TimeBaseLib                      | EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
--------------Aov9Mwy0X28ji63uZ9msO0D3--