Laszlo, I see you point that GCC needs to have EFIAPI prefix for the var-arg functions. Sorry for my bug.
Reviewed-by: Ruiyu Ni<[email protected]> -----Original Message----- From: Ni, Ruiyu [mailto:[email protected]] Sent: Thursday, August 15, 2013 8:02 AM To: Laszlo Ersek; [email protected]; Gao, Liming Subject: Re: [edk2] [PATCH] MdePkg: UefiDevicePathLibCatPrint() must be EFIAPI Laszlo, The UefiDevicePathLibCatPrint() is an internal function. Why do you like to make it public? Thanks, Ray -----Original Message----- From: Laszlo Ersek [mailto:[email protected]] Sent: Thursday, August 15, 2013 6:48 AM To: [email protected]; Ni, Ruiyu; Gao, Liming Subject: [PATCH] MdePkg: UefiDevicePathLibCatPrint() must be EFIAPI SVN r14504: Add 4 APIs to DevicePathLib: ConvertDeviceNodeToText, ConvertDevicePathToText, ConvertTextToDeviceNode and ConvertTextToDevicePath. Add a new instance of DevicePathLib which tries to locate the protocol and if it's not found, it uses the internal functions. removed CatPrint() [MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c] and introduced UefiDevicePathLibCatPrint() [MdePkg/Library/UefiDevicePathLib/DevicePathToText.c] The EFIAPI calling convention was lost. These functions use the VA_START() macro. The macro has three definitions in "MdePkg/Include/Base.h": - __CC_ARM : __va_start(Marker, Parameter) - __GNUC__ && !NO_BUILTIN_VA_FUNCS : __builtin_va_start (Marker, Parameter) - otherwise : < EFIAPI ABI dependent magic > The "otherwise" branch includes the Microsoft compilers, but also the gcc-4.4 configuration. (SVN r10502 synchronized edk2 to BaseTools r1971, adding -DNO_BUILTIN_VA_FUNCS to GCC44_X64_CC_FLAGS. SVN r11057, which synced edk2 to BaseTools r2093, did not change this.) Hence the third definition of VA_START() is only usable in EFIAPI functions. Supplement EFIAPI for UefiDevicePathLibCatPrint(), otherwise gcc-4.4 builds of edk2 format garbage text representations of device paths. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <[email protected]> --- .../Library/UefiDevicePathLib/DevicePathToText.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c index 83c3f8b..81cf84e 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c @@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ CHAR16 * +EFIAPI UefiDevicePathLibCatPrint ( IN OUT POOL_PRINT *Str, IN CHAR16 *Fmt, -- 1.7.1 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
