From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.7055.1643162660313812352 for ; Tue, 25 Jan 2022 18:04:21 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 26 Jan 2022 10:04:15 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Wei6 Xu'" , Cc: "'Bob Feng'" , "'Yuwei Chen'" References: <20220120145956.11592-1-wei6.xu@intel.com> In-Reply-To: <20220120145956.11592-1-wei6.xu@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoXSBCYXNlVG9vbHMvQ29uZjogQWRkIG5ldyBtYWNybyBmb3IgY3VzdG9taXppbmcgZGxsIGZpbGUgcmVkdWN0aW9uLg==?= Date: Wed, 26 Jan 2022 10:04:17 +0800 Message-ID: <02d501d81259$06728f30$1357ad90$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGwTNwtZHhc4+BHoP2UFLxqb4oaQKzEGDcA Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Wei6 Xu > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA1=D4=C220=C8=D5 23:00 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Bob Feng ; Liming Gao > ; Yuwei Chen > =D6=F7=CC=E2: [edk2-devel] [Patch] BaseTools/Conf: Add new macro for = customizing > dll file reduction. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3810 >=20 > 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. >=20 > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Signed-off-by: Wei6 Xu > --- > BaseTools/Conf/build_rule.template | 2 +- > BaseTools/Conf/tools_def.template | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) >=20 > 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) > > $(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug > - $(OBJCOPY) --strip-unneeded -R .eh_frame ${src} > + $(OBJCOPY) $(OBJCOPY_STRIPFLAG) ${src} >=20 > # > #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 =3D > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_*_*_SYMRENAME_PATH =3D echo > *_*_*_SYMRENAME_FLAGS =3D Symbol renaming not needed for > DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG =3D > --add-gnu-debuglink=3D$(DEBUG_DIR)/$(MODULE_NAME).debug > RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG =3D > NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG =3D > --add-gnu-debuglink=3D$(DEBUG_DIR)/$(MODULE_NAME).debug > +*_*_*_OBJCOPY_STRIPFLAG =3D --strip-unneeded -R .eh_frame > *_*_*_DTC_FLAGS =3D -H epapr > *_*_*_DTCPP_PATH =3D DEF(DTCPP_BIN) > *_*_*_DTC_PATH =3D DEF(DTC_BIN) >=20 > DEFINE GCC_ALL_CC_FLAGS =3D -g -Os -fshort-wchar > -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds = -include > AutoGen.h -fno-common > -- > 2.16.2.windows.1