mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-25 03:54:01 +00:00
动态链接库+修复神秘光标问题
This commit is contained in:
24
cleonos/c/apps/libdemo_main.c
Normal file
24
cleonos/c/apps/libdemo_main.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned long long u64;
|
||||
|
||||
u64 cleonos_libdemo_add(u64 left, u64 right) {
|
||||
return left + right;
|
||||
}
|
||||
|
||||
u64 cleonos_libdemo_mul(u64 left, u64 right) {
|
||||
return left * right;
|
||||
}
|
||||
|
||||
u64 cleonos_libdemo_hello(void) {
|
||||
(void)puts("[libdemo] hello from libdemo.elf");
|
||||
return 0ULL;
|
||||
}
|
||||
|
||||
int cleonos_app_main(int argc, char **argv, char **envp) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
(void)envp;
|
||||
(void)puts("[libdemo] dynamic library image ready");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user