public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'Wei6 Xu'" <wei6.xu@intel.com>, <devel@edk2.groups.io>
Cc: "'Bob Feng'" <bob.c.feng@intel.com>,
	"'Yuwei Chen'" <yuwei.chen@intel.com>
Subject: 回复: [edk2-devel] [Patch] BaseTools/Conf: Add new macro for customizing dll file reduction.
Date: Wed, 26 Jan 2022 10:04:17 +0800	[thread overview]
Message-ID: <02d501d81259$06728f30$1357ad90$@byosoft.com.cn> (raw)
In-Reply-To: <20220120145956.11592-1-wei6.xu@intel.com>

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Wei6 Xu <wei6.xu@intel.com>
> 发送时间: 2022年1月20日 23:00
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [edk2-devel] [Patch] BaseTools/Conf: Add new macro for customizing
> dll file reduction.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3810
> 
> New macro OBJCOPY_STRIPFLAG is added in build_rule.template to replace
> '--strip-unneeded -R .eh_frame', so that module can have some unique
> objcopy flags for its own purpose.
> In tools_def.template, set '--strip-unneeded -R .eh_frame' as default
> value of OBJCOPY_STRIPFLAG.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
> ---
>  BaseTools/Conf/build_rule.template | 2 +-
>  BaseTools/Conf/tools_def.template  | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Conf/build_rule.template
> b/BaseTools/Conf/build_rule.template
> index 3add1029f2..f401182344 100755
> --- a/BaseTools/Conf/build_rule.template
> +++ b/BaseTools/Conf/build_rule.template
> @@ -373,11 +373,11 @@
>          $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
>          -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
>          -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
>      <Command.GCC>
>          $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
> -        $(OBJCOPY) --strip-unneeded -R .eh_frame ${src}
> +        $(OBJCOPY) $(OBJCOPY_STRIPFLAG) ${src}
> 
>          #
>          #The below 2 lines are only needed for UNIXGCC tool chain, which
> generates PE image directly
>          #
>          -$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index 2e6b382ab6..85b8afbb2d 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1860,10 +1860,11 @@ NOOPT_VS2019_AARCH64_DLINK_FLAGS   =
> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF
>  *_*_*_SYMRENAME_PATH            = echo
>  *_*_*_SYMRENAME_FLAGS           = Symbol renaming not needed for
>  DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG     =
> --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
>  RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
>  NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG     =
> --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
> +*_*_*_OBJCOPY_STRIPFLAG            = --strip-unneeded -R .eh_frame
>  *_*_*_DTC_FLAGS                    = -H epapr
>  *_*_*_DTCPP_PATH                   = DEF(DTCPP_BIN)
>  *_*_*_DTC_PATH                     = DEF(DTC_BIN)
> 
>  DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar
> -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include
> AutoGen.h -fno-common
> --
> 2.16.2.windows.1




      reply	other threads:[~2022-01-26  2:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 14:59 [edk2-devel] [Patch] BaseTools/Conf: Add new macro for customizing dll file reduction Xu, Wei6
2022-01-26  2:04 ` gaoliming [this message]

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='02d501d81259$06728f30$1357ad90$@byosoft.com.cn' \
    --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