On Fri, 2015-07-24 at 00:08 +0200, Laszlo Ersek wrote: > > > Any non-EFIAPI function using varargs is broken, isn't it? > > Correct, with one tweak: any non-EFIAPI function accessing varargs with > the VA_* macros from Base.h is broken.
Can we *make* them break? I don't know, something like 'volatile
unsigned long dummy_ecx __asm__("ecx")' where ECX is a reserved
register in the SYSV ABI but not MS?
I know, that's a *really* bad example and I don't think you can even
assign variables to registers like that any more. But it's just an
illustration; can we come up with *something* that makes the VA_LIST
macro break at *build* time from a non-EFIAPI function? Ideally on
*all* builds, but at least for x86_64 ELF.
An artificial way to keep us honest w.r.t. EFIAPI annotations would
also be nice, if Jordan insists on keeping it working. I wonder if we
can put them in a separate section, and have a script post-process the
objects looking for discrepancies? I also thought about prepending
something to the function names, but I can't see how that could be made
to work. Any other ideas?
--
dwmw2
--
David Woodhouse Open Source Technology Centre
[email protected] Intel Corporation
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

