Message ID | 1409698598-9766-6-git-send-email-lersek@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.inf b/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.inf index 5f51391..3e409a0 100644 --- a/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.inf +++ b/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.inf @@ -23,6 +23,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = PlatformFvbLib|DXE_RUNTIME_DRIVER + CONSTRUCTOR = PlatformFvbLibNullConstructor + # # The following information is for reference only and not required by the build tools. # diff --git a/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.c b/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.c index ea5da6e..2a8c64a 100644 --- a/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.c +++ b/OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.c @@ -87,3 +87,11 @@ PlatformFvbBlocksErased ( } +RETURN_STATUS +EFIAPI +PlatformFvbLibNullConstructor ( + 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/PlatformFvbLibNull/PlatformFvbLibNull.inf | 2 ++ OvmfPkg/Library/PlatformFvbLibNull/PlatformFvbLibNull.c | 8 ++++++++ 2 files changed, 10 insertions(+)