Re: sound blaster driver as a module

Urban Widmark (urban@svenskatest.se)
Wed, 30 Dec 1998 23:13:51 +0100 (MET)


On Tue, 29 Dec 1998, Alan Cox wrote:

> EXPORT_SYMBOL() causes a reference to it to get written into the
> exports tables so it is referenced.
>

But if the EXPORT_SYMBOL() is in sound_firmware doesn't it just say that
sound_firmware uses mod_firmware_load? And that's no need for ld to use
that object file, or is there some magic in the
__attribute__((section("..."))) part that I don't understand?

% nm sound.a | less
...
sound_firmware.o:
00000000 ? __kstrtab_mod_firmware_load
00000000 ? __ksymtab_mod_firmware_load <- from EXPORT_SYMBOL()
00000000 t do_mod_firmware_load
00000000 b errno
00000000 t gcc2_compiled.
00000150 T mod_firmware_load
...

Moving the EXPORT_SYMBOL() to sound_core makes the symbols appear in
vmlinux, since sound_core.o gets a U mod_firmware_load. Again, I haven't
tried booting with these kernels but the symbols are there.

/Urban

---
Urban Widmark                           urban@svenskatest.se
Svenska Test AB                         +46 90 71 71 23

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/