From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::22d; helo=mail-pf0-x22d.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0154220355239 for ; Wed, 8 Nov 2017 16:40:42 -0800 (PST) Received: by mail-pf0-x22d.google.com with SMTP id e64so3007682pfk.9 for ; Wed, 08 Nov 2017 16:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=II4DhsN0hGu+83SjVTYnuucWz9kC39EPsPvG1/kseAY=; b=gKBDbZiReqfBm7P38/JgmsRpXLCnO/bXUXthn9SG9sKQtIp9DIBwSj6i0uGHIPGttN ru3snc2TVFDVfeRzWXkgSqZIu5mIVUPqrU65v7c4wwFaRhrAj0QNtPUY9s3m6ibxIQs0 uGaOxEinM5Dpuz/aU9oQc+JjjyW6/Q6KCicBU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=II4DhsN0hGu+83SjVTYnuucWz9kC39EPsPvG1/kseAY=; b=YjNTbrMGvEW5uW22A8xXaCtFXXIIAOmyXJjonk1bx7gMmvjXdZUSuPFYgsGHEcMfz2 9yLxVe57XIF1T21vSm9GKIPVjWjaSdnsPceYifQKLClpOwIeqmWcxN/ujr7rKkQkAl7H XSFpp0r9FuFXynx9z4+6Eh/R3+Ky6sqnQonzdyoZTtekXYurqvg+3v0kOHYnO4CCz+ry 76DdfMvHHuMqY6/rCBV30Fuu1J/aGyh8jk+/a6vZ7R4Xaf4lT0KoJzKObbSrPOTw2Kdw cgQqSNYhCe29m2f9tA1VPGGf7k4Tin0UaQmz3c9EThLBicT4AxO70ecGnaDcvemnFvbh +uhg== X-Gm-Message-State: AJaThX4ZM3Pi35jkZcL006zWCm0rKRU5frnYsJr8w441mjn4YAIIyJa2 pe+Sk8je8/u5oYcUS2lpAOFoMA== X-Google-Smtp-Source: ABhQp+QnIN/R7j/5oMU7lzhLq3wgdvOp0LDR9bUAGSkLyrrZ94FI9eL1TlamcgdM0XRnZafyj7eNsQ== X-Received: by 10.99.185.71 with SMTP id v7mr2167226pgo.24.1510188283657; Wed, 08 Nov 2017 16:44:43 -0800 (PST) Received: from [10.170.149.130] ([104.237.91.99]) by smtp.gmail.com with ESMTPSA id i62sm10090829pfe.73.2017.11.08.16.44.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 16:44:43 -0800 (PST) To: "Gao, Liming" , Laszlo Ersek , "edk2-devel@lists.01.org" , pbonzini@redhat.com References: <145387dc-028f-c75f-6df3-cb0ead996eb8@linaro.org> <328f6c59-f41a-1b53-621c-a8ac000dcb45@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E17A2B5@SHSMSX104.ccr.corp.intel.com> From: Heyi Guo Message-ID: Date: Thu, 9 Nov 2017 08:44:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17A2B5@SHSMSX104.ccr.corp.intel.com> Subject: Re: Why do we use -g option of gcc even for RELEASE build? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2017 00:40:43 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US That makes sense. Thank you all :) Regards, Heyi 在 11/8/2017 11:32 PM, Gao, Liming 写道: > In build_rule.txt, GCC built image will be strip first, then be converted to EFI image by GenFw. There is no symbol in the final EFI image. All symbols are kept into original GCC built image. > > Thanks > Liming >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Wednesday, November 8, 2017 10:54 PM >> To: Heyi Guo ; edk2-devel@lists.01.org >> Cc: Gao, Liming >> Subject: Re: [edk2] Why do we use -g option of gcc even for RELEASE build? >> >> On 11/08/17 03:25, Heyi Guo wrote: >>> Hi folks, >>> >>> From gcc manual, -g option seems to produce debugging information. In >>> tools_def.template, -g is included in GCC_ALL_CC_FLAGS, so it will also >>> be enabled for RELEASE build with gcc tool chain. Any special reason to >>> do that? >> In the edk2 tree, -g was added to GCC_ALL_CC_FLAGS and >> GCC44_ALL_CC_FLAGS in commit 52302d4dee58 ("Sync EDKII BaseTools to >> BaseTools project r1903.", 2010-02-28). >> >> If you check the history of the now-historical separate BaseTools >> project , "-g" >> was introduced in commit 46c1e64305d4 ("Upgrade the binutil 2.18.50.0.5 >> to 2.20.51.0.5 for UNIXGCC tool chain", 2010-02-25). >> >> I guess that the same for [Dynamic-Library-File] must be >> able to work for both DEBUG/NOOPT and RELEASE builds. So -g is included >> for all of those build targets, in the C flags. Ultimately the debug >> symbols are not copied into the .efi binaries, for RELEASE, I believe. >> >> Thanks >> Laszlo