Message ID | 1409698598-9766-2-git-send-email-lersek@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf b/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf index ec6764d..84fab2b 100644 --- a/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf +++ b/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf @@ -23,6 +23,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = PlatformFvbLib|DXE_RUNTIME_DRIVER + CONSTRUCTOR = EmuVariableFvbLibConstructor + # # The following information is for reference only and not required by the build tools. # diff --git a/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c b/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c index 9b449a6..2825da1 100644 --- a/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c +++ b/OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c @@ -101,3 +101,11 @@ PlatformFvbBlocksErased ( } +RETURN_STATUS +EFIAPI +EmuVariableFvbLibConstructor ( + VOID + ) +{ + return RETURN_SUCCESS; +}
Calls to constructors of interdependent library instances are generated in the correct order only if all library instances in question have constructors. If some have no constructors, then the rest may see their constructors called out of order. Cycle detection also only works when all library instances have constructors. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf | 2 ++ OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.c | 8 ++++++++ 2 files changed, 10 insertions(+)