Modules and kernel symbols
Posted: Thu Oct 09, 2008 6:33 pm
Over the last few days, I have been borrowing (I mean, basing my code heavily off of) Linux 1.0's module code, and module system. I have now reached the stage where I must understand kernel symbols, as (I guess) putting those functions and variables in the system call table would be a security problem.
However, I cannot understand out the module uses them. The file ksyms.S contains a list of symbols, is compiled, put through a script, and I get something like:
Which is fine, as it does compile and link into my kernel (and even works with some of my module code which references it).
But how does a module use those symbols?
-JL
However, I cannot understand out the module uses them. The file ksyms.S contains a list of symbols, is compiled, put through a script, and I get something like:
Code: Select all
.data
.globl symbol_table_size, symbol_table
symbol_table_size:
.long 16
symbol_table:
.long add_syscall
.long strings+0
.long current_task
.long strings+12
strings:
.ascii "add_syscall\0"
.ascii "current_task\0"
But how does a module use those symbols?
-JL