mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:25:07 +00:00
LibC: Run constructors on process startup.
Cooperate with the compiler to generate and execute the _init_array list of constructor functions on userspace program statup. This took two days to get working, my goodness. :^)
This commit is contained in:
parent
f1a2cb0882
commit
23bb276fcd
22 changed files with 101 additions and 61 deletions
|
@ -52,6 +52,8 @@ void* mmx_memcpy(void* dest, const void* src, size_t len)
|
|||
return dest;
|
||||
}
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
static inline uint32_t divq(uint64_t n, uint32_t d)
|
||||
{
|
||||
uint32_t n1 = n >> 32;
|
||||
|
@ -144,5 +146,6 @@ uint64_t __udivmoddi4(uint64_t n, uint64_t d, uint64_t* r)
|
|||
|
||||
return q;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue