Message ID | 1409698598-9766-8-git-send-email-lersek@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf index 71beacb..bed33e6 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf @@ -23,6 +23,8 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = QemuFwCfgLib|SEC + CONSTRUCTOR = QemuFwCfgSecLibConstructor + # # The following information is for reference only and not required by the build tools. # diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c index 88c32ce..0156279 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c @@ -79,3 +79,13 @@ InternalQemuFwCfgIsAvailable ( // return TRUE; } + + +RETURN_STATUS +EFIAPI +QemuFwCfgSecLibConstructor ( + 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/QemuFwCfgLib/QemuFwCfgSecLib.inf | 2 ++ OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c | 10 ++++++++++ 2 files changed, 12 insertions(+)