You can use asm to get around msvc limitations. Sth like

.global memcpy
memcpy:
      jmp grub_memcpy

Where implicit memcpy is inserted is pretty much unpredictable and we're
not going to maintain memcpy-free environment because of this

Le Mon, Apr 11, 2016 à 1:50 AM, Pete Batard <p...@akeo.ie> a écrit :

> 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
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to