[libj6] Remove driver_main

The `driver_main` sinature was an alternate signature for `main`
implemented with weak symbols, but it causes linking issues when not
statically linked, and drivers are going to work differently soon
anyway. Just get rid of it for now.
This commit is contained in:
Justin C. Miller
2023-08-26 19:23:13 -07:00
parent eda816ad90
commit 646a534dfd
5 changed files with 15 additions and 5 deletions

View File

@@ -73,6 +73,9 @@ struct j6_init_args
/// Find the first handle of the given type held by this process
j6_handle_t j6_find_first_handle(j6_object_type obj_type);
/// Get the init args
const j6_init_args * j6_get_init_args();
/// Drivers may use driver_main instead of main
int driver_main(unsigned, const char **, const char **, const j6_init_args *);

View File

@@ -36,12 +36,18 @@ j6_find_first_handle(j6_object_type obj_type)
return j6_handle_invalid;
}
extern "C" j6_init_args *
const j6_init_args *
j6_get_init_args()
{
return &init_args;
}
extern "C" void
__init_libj6(uint64_t arg0, uint64_t arg1)
{
init_args.args[0] = arg0;
init_args.args[1] = arg1;
return &init_args;
}
#endif // __j6kernel

View File

@@ -7,7 +7,6 @@ j6 = module("j6",
"channel.cpp",
"condition.cpp",
"init.cpp",
"init.s",
"memutils.cpp",
"mutex.cpp",
"protocol_ids.cpp",