提交 850a5669 编写于 作者: Z Zbigniew Bodek 提交者: Wojciech Zmuda WX948747

Workaround linking problem caused by missing SystemInit during build

During LiteOS consolidation, system_init.o object that contains
SystemInit() doesn't exist yet as it is being built later
and linked in ./vendor directory when OHOS_Image is created.
This is not the case when building for HiSilicon platforms as
SystemInit is provided for them in precompiled libraries.

Workaround this issue by creating "weak" function in LiteOS
that will be replaced by the "strong" symbol from ./vendor
in linking phase of the OHOS_Image.
Signed-off-by: NZbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39f327a350722a3e41a370ee93ba3b734c5681b0
上级 669221b6
......@@ -132,6 +132,11 @@ extern "C" {
extern UINT32 OsSystemInit(VOID);
extern VOID SystemInit(VOID);
VOID __attribute__((weak)) SystemInit(VOID)
{
PRINT_WARN("Function not implemented. Using weak reference stub\n");
}
LITE_OS_SEC_TEXT_INIT VOID osRegister(VOID)
{
g_sysClock = OS_SYS_CLOCK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册