Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755291AbbDKSQJ (ORCPT ); Sat, 11 Apr 2015 14:16:09 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:33588 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752650AbbDKSQH (ORCPT ); Sat, 11 Apr 2015 14:16:07 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 11 Apr 2015 15:16:06 -0300 Message-ID: Subject: Re: Problems exporting symbols from the main kernel to a module From: Eduardo Cruz To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1888 Lines: 69 I solved the issue. Nevermind. 2015-04-11 12:53 GMT-03:00 Eduardo Cruz : > I am modifying the kernel to provide some statistics about memory usage. > For that, part of my code is added in the main kernel, and part is in a module. > > The kernel version is 2.6.32. > The target machine is an ia64 machine. > Newer kernels do not boot the machine. > I'm using a debian distribution. > > In the main kernel, in arch/ia64/mm/fault.c, I added the following > function pointer: > > void (*module_task_added)(struct task_struct *) = NULL; > EXPORT_SYMBOL(module_task_added); > > In the module, i have: > > extern void (*module_task_added)(struct task_struct *); > > void handler_func (struct task_struct *task) { > ... > } > > int init_module () { > module_task_added = handler_func; > } > > when I compile the module, i get the following warning: > > WARNING: "module_task_added" > [/home/ehmcruz/linux-tammu/tammu-module/tammu.ko] undefined! > > > when I try to load the module, it fails resolving the symbol module_task_added: > > [ 3306.496239] tammu: Unknown symbol module_task_added > > > I already verified that the symbol is present in /proc/kallsyms: > > a000000100ac1b78 S module_task_added > > however, I don't know why, the variable doesn't appear in Module.symvers > > Anyone can help me? > > thanks in advance > > -- > Eduardo Henrique Molina da Cruz > PhD student > Parallel and Distributed Processing Group > Federal University of Rio Grande do Sul (UFRGS) -- Eduardo Henrique Molina da Cruz PhD student Parallel and Distributed Processing Group Federal University of Rio Grande do Sul (UFRGS) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/