From: "Liming Gao" <liming.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"tigerliu@zhaoxin.com" <tigerliu@zhaoxin.com>
Subject: Re: [edk2-devel] question about MSFT compiler/link option
Date: Tue, 4 Aug 2020 15:20:53 +0000 [thread overview]
Message-ID: <CY4PR11MB152605F1434CB5C49F12B37C804A0@CY4PR11MB1526.namprd11.prod.outlook.com> (raw)
In-Reply-To: <4ae1dae2a47b42b0a3e3e3108c2b870e@zhaoxin.com>
If this global variable is used by code, it will be linked into the final EFI image. You can check whether the generate map file includes it.
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tiger Liu(BJ-RD)
> Sent: Tuesday, August 4, 2020 5:34 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] question about MSFT compiler/link option
>
> Hi, Experts:
> I have a question about MSFT compiler/link option.
>
> I wrote a PEIM, which had a large global data array definition in a C file.
> Such as:
> PRI_DATA_STRUCT PdataStructTable[] = {
> {01, 0x75, 0xF0, 0x0, 0x0, 0x0 },
> {02, 0x77, 0xF0, 0x0, 0x0, 0x0 },
> {03, 0x79, 0xF0, 0x0, 0x0, 0x0 },
> {04, 0x7B, 0xF0, 0x0, 0x0, 0x0 },
> {05, 0x7D, 0xF0, 0x0, 0x0, 0x0 },
> {06, 0x7F, 0xF0, 0x0, 0x0, 0x0 },
> ......
> };
>
> This global data array is very large, about 20KB.
>
> But I found the PEIM's compiled size is about 5KB, it seems not include this global data array in the efi binary statically.
> Even the release version PEIM's size is larger than debug version.
>
> I found when compiling release version, the link option has : /MERGE:.rdata=.data
> It seems release binary included the global data array in the final efi image.
>
> So, my question is:
> Will the global data array be in linked into the final efi binary image when compiling debug version?
>
> Thanks
>
>
> 保密声明:
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
> CONFIDENTIAL NOTE:
> This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized
> review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
>
>
next prev parent reply other threads:[~2020-08-04 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 9:34 [edk2-devel] question about MSFT compiler/link option Tiger Liu(BJ-RD)
2020-08-04 15:20 ` Liming Gao [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-05 6:33 Tiger Liu(BJ-RD)
2020-08-05 15:17 ` Michael D Kinney
2020-08-06 3:31 Tiger Liu(BJ-RD)
2020-08-06 3:46 ` Andrew Fish
2020-08-10 3:25 Tiger Liu(BJ-RD)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY4PR11MB152605F1434CB5C49F12B37C804A0@CY4PR11MB1526.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox