mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
Kernel: Allow modules to link against anything in kernel.map :^)
We now use the symbols from kernel.map to link modules as they are loaded into the kernel. This is pretty fricken cool!
This commit is contained in:
parent
1f34e16ec6
commit
4ef6be8212
5 changed files with 27 additions and 20 deletions
|
@ -19,6 +19,15 @@ static u8 parse_hex_digit(char nibble)
|
|||
return 10 + (nibble - 'a');
|
||||
}
|
||||
|
||||
u32 address_for_kernel_symbol(const char* name)
|
||||
{
|
||||
for (unsigned i = 0; i < ksym_count; ++i) {
|
||||
if (!strcmp(name, s_ksyms[i].name))
|
||||
return s_ksyms[i].address;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const KSym* ksymbolicate(u32 address)
|
||||
{
|
||||
if (address < ksym_lowest_address || address > ksym_highest_address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue