DragonFly BSD
DragonFly kernel List (threaded) for 2003-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Fixed (was Re: Linking panic)

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Nov 2003 15:33:48 -0800 (PST)

    The linking panic has been fixed.    Basically what was happening was
    that snd_cmi.ko has a dependancy on snd_pcm.ko.  The dependancy caused
    snd_pcm.ko to be linked up while the preload scan was working on
    snd_cmi.ko.  Then the preload scan continued onto snd_pcm.ko and 
    linked it up *AGAIN*.  That is, it executed snd_pcm.ko's relocations
    twice, leading to bad addresses.

    The reason the loader got confused was because the module name is
    '/modules/snd_pcm.ko' but the dependancy name is only 'snd_pcm'. 
    The linker already had hacks in it to add the '.ko' but it wasn't
    doing anything about the /modules/ prefix, so the second attempt
    to load /modules/snd_pcm.ko from the preload list failed to twig
    to the fact that snd_pcm.ko had already been linked up using the
    same image data.

    I hope it's fixed!

    Whew.  The module code is a major mess.  FreeBSD-5.x's code is a little
    better but not by much.  The whole thing needs to be rewritten.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]