linux-mips
[Top] [All Lists]

Re: OProfile cannot be loaded as module...

To: David Daney <ddaney@avtrex.com>, linux-mips@linux-mips.org
Subject: Re: OProfile cannot be loaded as module...
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 13 Oct 2005 23:55:21 +0100
In-reply-to: <43470BCF.1070709@avtrex.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <43470BCF.1070709@avtrex.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Fri, Oct 07, 2005 at 04:59:11PM -0700, David Daney wrote:

> arch/mips/oprofile/common.c defines several symbols (op_model_mipsxx and 
> op_model_rm9000) with __attribute__((weak)).  It then assumes that ELF 
> linking conventions will prevail and there will be no problems if they 
> are undefined.
> 
> The problem is if you try to load oprofile as a module.  The kernel 
> module linker evidentially does not understand weak symbols and refuses 
> to load the module because they are undefined.

Actually it contains code to handle weak symbols so this is a bit
surprising not last because STB_WEAK handling happen in the generic
module loader code and is being used by other architectures as well.

So if there's a problem with the module loader I'd prefer to solve that
instead of starting to kludge around it.

What compiler exactly are you using btw?

  Ralf

<Prev in Thread] Current Thread [Next in Thread>