lkml.org 
[lkml]   [2009]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/14] mce3: pass mce info to EDAC for decoding
Andi Kleen wrote:
>> The goal is to have a default handler within the kernel and a more specific handler in a module after it has loaded. Using the weak symbol as a mechanism to do that. I haven't used that, so I don't know if it works.
>
> weak symbols don't work over kernel modules.
>

For modules, you typically have to have a callback to update an internal
function pointer. If you think about it, it's pretty obvious -- a weak
symbol changes the behavior at link time, but it's still a static call.
If you want modules to change the behavior, you're talking about a
*dynamic* change -- the call will point to different things at different
points in time -- so you need another mechanism, i.e. function pointers.

-hpa



\
 
 \ /
  Last update: 2009-07-20 22:21    [W:0.090 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site