From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::234; helo=mail-wm0-x234.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 18EDE221EA0AC for ; Thu, 7 Dec 2017 07:51:38 -0800 (PST) Received: by mail-wm0-x234.google.com with SMTP id t8so13858663wmc.3 for ; Thu, 07 Dec 2017 07:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=n2GJvbBtUmfCXLrC4ngwcu56WjC9Vuw6CWRAOt1oj+I=; b=raCqWcK5PbPh09TCVuzk7oTRwPEu+KvuWhBSBPRHHwZurjm8CKMVcNG8cdD2CvhTHE Vg3tyMeycPCycDtDAYrybIMpkV+cMSc/0bCRDJSLH8z/1QmDWDaTOq/7RHl87W9eP4f0 FIerhzLzx9+xfxj5/Nho9cuvcMgGduW9vfqG5Iwta2njzzN7fsFNbL422shRe3LtvW7k CoKeI+7jM/8CS7Wz7B9TdwWWTUeIZzvqyh56rye7rgm9eBQSkQ8dgRLZwMemrQMkYTsm i6FcALptaXj8kiZ/HmOdhsoNHjgeuBLljSadS0yJ18jEFFNilirvGZ8HI4zebi1/2YTw pyZg== 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-language :content-transfer-encoding; bh=n2GJvbBtUmfCXLrC4ngwcu56WjC9Vuw6CWRAOt1oj+I=; b=f0DwK0tI/9p0BTq47CPRkvLamrL3WrhgnRIv1zo+OlMrZQIp1bL+W+Hn0srard69Wx aBc8Q5qqPULzkYSrf5hQTljPUAA+c/T8FzsosklOGt3IbcUjO6UJRuzl1tVm645ShWBh SH1WSKjSh93JVG9Mme5e59+cJehLDAjK56Fzvffedk5NGa8RyAYMjKZBgv5AiKixHywb MKtIhzwhX7XNrCyPmJmHJoGg7l76UCSd0nR8evp3wANvpJGDM2MRjKNakKC8dD4cA/EI cqI8/cZW7PsK5aHaY6/Sd03QdKRUuCvo04e3OoZQO/ZNuMk5L7vU0o782GDSdoqdt6Y2 gBQQ== X-Gm-Message-State: AJaThX4APTHdt+rCMfu9ENl6LfebcD4gPYZrhZaUzAuwN81iWnxPuMQp U6STfTF2BWf8Lp+qnAzxV7/UA1WpidQ= X-Google-Smtp-Source: AGs4zMaEjRZIkoX8b2laZQoM466iayvVAqd1G6Dd3HjkXrjwYWY7Lbt+b2uFg3j7WcgOiTP2eNihqg== X-Received: by 10.80.135.226 with SMTP id 31mr47337221edz.210.1512662170788; Thu, 07 Dec 2017 07:56:10 -0800 (PST) Received: from [10.0.0.101] ([84.203.54.161]) by smtp.googlemail.com with ESMTPSA id j39sm2520670ede.38.2017.12.07.07.56.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 07:56:09 -0800 (PST) To: "edk2-devel@lists.01.org" , "Gao, Liming" References: <20171206111509.10144-1-pete@akeo.ie> <4A89E2EF3DFEDB4C8BFDE51014F606A14E18BA51@SHSMSX104.ccr.corp.intel.com> From: Pete Batard Message-ID: <111a956e-9cff-0324-121f-4a75a2d569fc@akeo.ie> Date: Thu, 7 Dec 2017 15:56:07 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18BA51@SHSMSX104.ccr.corp.intel.com> Subject: Re: [PATCH v2 0/6] Add ARM support for VS2017 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, 07 Dec 2017 15:51:39 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Hi Liming, On 2017.12.07 03:02, Gao, Liming wrote: > This is the base step to enable VS2017 ARM tool chain. Then, user could use it and build ARM application first. Yes. > Here, I have one question. VS2017 ARM requires 4096 alignment. So, why not add /FILEALIGN:4096 into tools_def.txt as the default linker option for ARM? I don't think we want to do that on account that this option does not need to be specified when building regular applications, and is currently only needed when building the QEMU firmware. So it's probably better to only specify it in the context where it is needed, rather than globally, especially as the documentation for /FILEALIGN [1] indicates that "By default, the linker does not use a fixed alignment size" which would tend to indicate that we might be better off letting the compiler decide what it should use on its own. Especially, forcing /FILEALIGN to 4K everywhere does appear to increase the size of the generated binaries. For instance, I'm seeing a RELEASE Shell.efi with a size of 762 KB without /FILEALIGN, vs. 792 KB with /FILEALIGN:4096. Thus, I think we should be conservative with regards to the global compiler options we add: if an option only seems to be needed for a single module (and especially, if that module has not yet been patched and reviewed for compilation), it should probably be specified for that module alone. As such, unless you or other people on this list have a strong opinion that /FILEALIGN:4096 should be global, I am currently not planning to resubmit a new patch that adds that option. Please let me know if you still think the patch should be altered. Regards, /Pete [1] https://docs.microsoft.com/en-gb/cpp/build/reference/filealign