David Woodhouse [mailto:dw...@infradead.org] wrote:
]Sent: Wednesday, July 22, 2015 06:06 PM ]To: Laszlo Ersek <ler...@redhat.com> ]Cc: edk2-devel@lists.sourceforge.net; q...@host178.hostmonster.com ]Subject: Re: [edk2] [PATCH] CryptoPkg: OpensslLib: reintroduce EFIAPI for ERR_add_error_data() ] ]On Thu, 2015-07-23 at 00:44 +0200, Laszlo Ersek wrote: ]> I "guess" it should work at the moment (and -UNO_BUILTIN_VA_FUNCS would ]> be easy enough to add under [BuildOptions] in ]> "CryptoPkg/Library/OpensslLib/OpensslLib.inf"). ]> ]> But, as soon as a "genuinely" EFIAPI function with a variable argument ]> list appeared in "OpensslLib.inf", things would break again. ] ]I'm slightly confused. Why does it *only* matter for varargs functions? ]I thought that on some platforms, the difference between the ELF ABI ]and the MS ABI extended to putting arguments in *completely* different ]registers? Why doesn't that bite us? ] ]> Any particular reason for disliking these hunks of ]> "EDKII_openssl-1.0.2d.patch" (over the other hunks)? ] ]Oh, I dislike lots of other bits of that too. I'm just working through ]them all separately. Are you on the openssl-dev mailing list? :) ] ]> So, this issue is not fixable globally under gcc. With gcc (compiling ]> for x86_64), EFIAPI and non-EFIAPI differ from each other,.. ] ]Well, why don't we just add -mabi=ms to the compiler flags? Then EFIAPI ]in the source code could be a no-op, right? A good question. It was discussed in a 2014 thread. Search for: "Why not just change the ABI on all functions?" https://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg10480.html Adding -mabi=ms results in considerable code size reduction too. Thanks, Scott ]Alternatively, why in $DEITY's name doesn't GCC give us a set of ]builtin functions which actually DTRT according to whether *this* ]particular function is being built with the MS ABI or not? Is there a ]PR for that already? ] ]-- ]dwmw2 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel