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.14350.1678245433947377365 for ; Tue, 07 Mar 2023 19:17:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lixianglai@loongson.cn) Received: from loongson.cn (unknown [10.20.42.32]) by gateway (Coremail) with SMTP id _____8Axbdo1_gdkoLMJAA--.12482S3; Wed, 08 Mar 2023 11:17:10 +0800 (CST) Received: from [10.20.42.32] (unknown [10.20.42.32]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxK740_gdkH+hOAA--.5950S3; Wed, 08 Mar 2023 11:17:08 +0800 (CST) Subject: Re: [edk2-devel] [PATCH] Platform/Loongson: Allow building with stack protector support To: devel@edk2.groups.io, git@xen0n.name Cc: Bibo Mao , Chao Li , Leif Lindholm , Michael D Kinney References: <20230305044035.476989-1-git@xen0n.name> From: "xianglai" Message-ID: <6ed30673-98f7-7c16-1c16-33cc4988dfaa@loongson.cn> Date: Wed, 8 Mar 2023 11:17:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230305044035.476989-1-git@xen0n.name> X-CM-TRANSID: AQAAf8DxK740_gdkH+hOAA--.5950S3 X-CM-SenderInfo: 5ol0xt5qjotxo6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7KryfWrWfKrWxur15CrWUCFg_yoW8JFW3pF 1rAa1xKr1UJr4jy398Ca4DKF4qyF98GFykJF4kAr17ur9xJ3WkW3yayF4Dtr43Aa4Sqa48 XrW8Ka1Uua4DWFJanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUbf8YFVCjjxCrM7AC8VAFwI0_Jr0_ Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFV AK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2 z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr 1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1ln4kS14v26r1Y6r17M2AIxVAIcxkE cVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1lYx0E2Ix0cI8IcVAFwI0_Jr v_JF1lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxG rwCjr7xvwVCIw2I0I7xG6c02F41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWUXVWUAwC20s026c02F40E 14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU88gA7UU UUU== Content-Type: multipart/alternative; boundary="------------1D56298BCBA3018B16CDDBCF" Content-Language: en-US --------------1D56298BCBA3018B16CDDBCF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Reviewed-by: Xianglai Li On 2023/3/5 下午12:40, WANG Xuerui wrote: > 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 --------------1D56298BCBA3018B16CDDBCF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Reviewed-by: Xianglai Li <lixianglai@loongson.cn>

On 2023/3/5 下午12:40, WANG Xuerui wrote:
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
--------------1D56298BCBA3018B16CDDBCF--