linux-mips
[Top] [All Lists]

OProfile cannot be loaded as module...

To: linux-mips@linux-mips.org
Subject: OProfile cannot be loaded as module...
From: David Daney <ddaney@avtrex.com>
Date: Fri, 07 Oct 2005 16:59:11 -0700
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)
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.

Perhaps a single

extern struct op_mips_model plat_op_model;

That must be defined by each different implementation. Deciding one which implementation would then be done at compile time instead of runtime.

I don't have a patch for this yet, but that is what I am thinking of doing.

David Daney.

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