Re: How does module_init(jpeg_init) get called

2014-01-10 Thread Miles MH Chen
Hi Michael, You can use binary utils like nm or objdump to exam your vmlinux. Linker collects initcall functions and puts them in initcall section. Kernel can find all initcall functions in initcall section. Regards, MH On Fri, Jan 10, 2014 at 3:00 AM, m silverstri < michael.j.silvers...@gmail

Re: How does module_init(jpeg_init) get called

2014-01-09 Thread m silverstri
Thanks. The vmlinx is a binary file, I don't see what you show in your response. I have another question is where does the kernel find these driver modules for it to load? >From the make file, a driver will compile into a .o file? As an example $ more Makefile s5p-jpeg-objs := jpeg-core.o obj-$

Re: How does module_init(jpeg_init) get called

2014-01-09 Thread Miles MH Chen
Hello Michael, The module_init call is defined as device_initcall, which is one of kernel inicalls. All initcalls are put to initcall section and kernel calls all initcalls at boot time. You can check this in your vmlinux: 81765ed8 T __initcall_start 81765ed8 T __setup_end ff

How does module_init(jpeg_init) get called

2014-01-08 Thread m silverstri
Hi, In a kernel driver code, I see it has 'module_init(jpeg_init)' and 'module_exit(jpeg_exit)'. I would like how know how will jpeg_init(void) gets call during kernel bring up. As an example: static int __init jpeg_init(void) { printk(KERN_CRIT "Initialize JPEG driver\n"); platform_driver_regi