Skip to contentSkip to conversation

how can i add a kernel function ?

DISCUSSION BenHanokh Gabriel 3 participants 3 messages Oct 2, 2000 Memory management

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · BenHanokh Gabriel

hi

i'm trying to add a function of my own to my copy of fs/buffer.c

how can i export the symbol ?

add an entry to kernel/ksyms.c like this:

/* BenHakokh's function to do .... */
EXPORT_SYMBOL(bhg_doit);

also, make sure that the declaration of the function is visible to kernel/ksyms.c.

Regards,
Tigran

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#2 lore raw
Quoted 9 lines · Tigran Aivazian
Quoted 5 lines · BenHanokh Gabriel

hi

i'm trying to add a function of my own to my copy of fs/buffer.c

how can i export the symbol ?

add an entry to kernel/ksyms.c like this:

Not specifically related to BenHanokh Gabriel's problem, but I wanted to take this opportunity to point out that we want to move away from putting all exported symbols in one file. Linus prefers that the symbols are exported from the files in which they are declared.

Eventually we want to do away with the distinction of O_OBJS and OX_OBJS, and just treat all files as OX_OBJS. Linus suggested I look into this but there were higher priority items. Maybe some of the kbuild guys will tackle it...

Jeff

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/