From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1apHcy-0005Mw-Om for mharc-grub-devel@gnu.org; Sun, 10 Apr 2016 11:50:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHcw-0005JS-9S for grub-devel@gnu.org; Sun, 10 Apr 2016 11:50:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apHcs-00071z-7n for grub-devel@gnu.org; Sun, 10 Apr 2016 11:50:18 -0400 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:34531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apHcr-00071r-VW for grub-devel@gnu.org; Sun, 10 Apr 2016 11:50:14 -0400 Received: by mail-wm0-x22c.google.com with SMTP id l6so116897220wml.1 for ; Sun, 10 Apr 2016 08:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=AnSFyqA5sRj3+Ijm5p29wbS3xZPg3xZHzS5oq/O4ILE=; b=B8SLVG+6LctQ3xXpazATL3jQ7mYlIQmLC7ezoPzLYvU26scQNLRUpCQW0AtTHkQIEs chQZn2zoQ38vW4ESxdtKS6EL24VDon/C//ClJYRy2U2+fqFDRf2ZTPC05bkhIsrf58G2 ui2abySQMuPUQ3Dv1BvTTeyiWbNzwOgibAh5m/XYnJ8xu70fA6M+/qmU3j5bLXcGQNpb fGHkGUv9udJOsDdO8+paf3PjlajVsdeLLXbZSINoqbG5VRuD59QFh3AuP77+8hq+ZWrq 5VUvMEHbSOHaK2xbFLD/H5R0nsm92HRQFrsIMKOD9n8kTGryNKo/zEbg7GazQr4VDyBu XjQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=AnSFyqA5sRj3+Ijm5p29wbS3xZPg3xZHzS5oq/O4ILE=; b=kkGGcal/kkeFowR0nrW/x7Z4HO7bTbGm61iLpjUcGjX/8+Y9aEY7pdpaSRKBvA6jay fa5IADjSGmwN3HVy4nRuhAM3V0BG5TuTZ7Rg/dRiKg2YoiWUFAXwMOlAqaosxMI/c+Ca K0ljc2tzW22sIVtYgu/gGhImQrbAtxWhSBLtDid47p7vsRKN7a0RRUfiSc+FzEUzow2b B7JYHRZlTfO8N89bN1tyDWJmfvHMHtFF14UBAZToRh5ksQdFmkqdyV96A+sPSsSFrw6x kWfUw8nbM/rjuzWl5/3YrHZ1DA6xbhk9Ea/bpxpOLISsj2giQ20NLByK64LKKgheSKyI L9CQ== X-Gm-Message-State: AD7BkJIoxJZ9Cts7W5OP59VNrdNj9g3njlVgF7ud7j3T7OQsD00+TociTo0OyNlgdAdGbw== X-Received: by 10.28.126.21 with SMTP id z21mr14317073wmc.73.1460303412975; Sun, 10 Apr 2016 08:50:12 -0700 (PDT) Received: from [192.168.0.10] (gge44-1-78-198-200-53.fbx.proxad.net. [78.198.200.53]) by smtp.googlemail.com with ESMTPSA id i5sm23236660wja.23.2016.04.10.08.50.11 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Apr 2016 08:50:11 -0700 (PDT) Subject: Re: [PATCH] fs: remove implicit compiler calls to memset/memcpy References: <570A5AB8.7040901@akeo.ie> From: Pete Batard To: grub-devel@gnu.org Message-ID: <570A7632.1060209@akeo.ie> Date: Sun, 10 Apr 2016 17:50:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 15:50:19 -0000 On 2016.04.10 16:30, Vladimir 'phcoder' Serbinenko wrote: > Why is the same solution not suitable for you? That's the first thing I attempted, but the MSVC compiler is uncooperative. If you try to redefine memset/memcpy, you get the following compiler error: error C2169: '_memcpy' : Intrinsic function, cannot be defined And of course, this means that you then have to link with the standard Windows MSVC libraries, which creates issues when building UEFI drivers... Apparently, there used to be a way to disable intrinsic functions with older versions of Visual Studio (using a pragma), but this capability was removed in the latest versions. Either that, or Microsoft does not consider memcpy and friends as belonging to the general "intrinsic" category that the compiler can disable. This means that, right now, the only option available is to patch the GRUB source. Regards, /Pete