[lkml]   [2003]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [module-init-tools] fix weak symbol handling
    On Fri, Jan 17, 2003 at 12:57:03PM +1100, Rusty Russell wrote:
    > > No. The semantics I need is if A references a weak symbol S
    > > and *no one* implements it, then S resolves to NULL.
    > Sorry, I was unclear. I want to know the dependency semantics:
    > If B exports S, should depmod believe A needs B, or not? Your patch
    > leaves that semantic (all it does is suppress the errors).

    Well, that depends on whether A defines S or not. If A does
    define S, then I don't care. I'd say "no", A does not depend
    on B. If A does not define S, then most definitely "yes", as
    with any other definition.

    > I'm not sure what semantics are "right", since I don't know what
    > you're trying to do, or what is wrong with get_symbol().

    I just told you. Quoted again above. Perhaps the following
    dummy module will make things even clearer.

    #include <linux/module.h>
    #include <linux/init.h>

    extern int not_defined __attribute__((weak));

    static int init(void)
    return &not_defined ? -EINVAL : 0;

    static void fini(void)


    You should be able to load this module.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:32    [W:0.024 / U:56.260 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site