Skip to contentSkip to conversation

Dump: pb with module_list

parisc-linux Bruno Vidal 3 participants 3 messages Jan 23, 2002 – Jan 25, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi
There is something I don't understand (and I really dont like to not understand). I didn't have any pb with utsname. But now I want to retrieve the loaded modules at dump time. In order to do that, I wrote a very simple loop (it is based on find_module function). It is based on the pointer "module_list". this is define in linux/module.h as:
extern struct module *module_list;

Because I don't want to modify kernel/module.c I've put my function in my dump_base.c
(it already include linux/module.h). It compile right, but when using depmod, insmod, etc...:
dump.o: unresolved symbol module_list
I've already recompile the entire kernel, make dep, etc...

I'm probably missing something, but what ????

thanks.

Signature · 3 lines
	Vidal Bruno, (770-4271)
        SSD-HA Team, HP-UX & LINUX Support
	[email protected]

begin:vcard
n:Bruno;VIDAL
tel;fax:01-69-82-60-14
tel;work:01-69-29-42-71
x-mozilla-html:TRUE
url:www.france.hp.com
org:Solution Center
version:2.1
email;internet:[email protected]
title:Expert Logiciel Environnement Haute Disponibilité
adr;quoted-printable:;;HP France=0D=0A;Z.A de Courtaboeuf;1 Av. du Canada;91947 Les Ulis cedex;France x-mozilla-cpt:;26208
fn:VIDAL Bruno
end:vcard

#1 lore raw
Quoted 10 lines · Bruno Vidal

Hi
There is something I don't understand (and I really dont like to not understand). I didn't have any pb with utsname. But now I want to retrieve the loaded modules at dump time. In order to do that, I wrote a very simple loop (it is based on find_module function). It is based on the pointer "module_list". this is define in linux/module.h as:
extern struct module *module_list;

Quoted 8 lines

Because I don't want to modify kernel/module.c I've put my function in my dump_base.c
(it already include linux/module.h). It compile right, but when using depmod, insmod, etc...:
dump.o: unresolved symbol module_list
I've already recompile the entire kernel, make dep, etc...

I'm probably missing something, but what ????

You need to export the symbol for modules to see it. See arch/parisc/kernel/parisc_ksyms.c for example.

Richard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 4 lines · Richard Hirst
Quoted 1 line

I'm probably missing something, but what ????

You need to export the symbol for modules to see it. See arch/parisc/kernel/parisc_ksyms.c for example.

And add the export-objs variable to your Makefile. See drivers/*/Makefile or arch/parisc/kernel/Makefile.

grant