lkml.org 
[lkml]   [2000]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectunresolved symbols: Compiler/modutils bug?
Hello,

Yesturday I was experimenting with video4linux Buz/DC10+ driver
which requires bigphysarea kernel patch and something strange was
going on... Here is a sequence of events:

1. Applying the patch and reconfiguring the kernel - no problem,
2. Compilation of the latest 2.2.14 kernel and modules - OK
3. Reboot into single user level, run depmod -a - OK,
4. Switch to multiuser - OK.
5. Compilation of Buz/DC10+ drivers to take effect of bigphysarea
patch - no problem.
6. insmod video..., i2c, etc. - OK.
7. insmod buz.o -> unresolved symbol(s): bigphysarea_xxxxxxxxx

I've tried to compile the kernel with gcc 2.7.2.3 and egcs coming
with RedHat 6.1 and different modutils: 2.1.121 and 2.3.7, the
result was the same. Then I've started to check the internals...

Checking Sysmap: everything looks fine, these symbols are there.
Checking /proc/ksyms shows that something strange is there: all
symbols look OK but those ones related to bigphysarea:

cxxxxxx find_vma_Rxxxxxxxx
cxxxxxx get_unmapped_area_Rxxxxxxxx
cxxxxxx bigphysarea_alloc_R__ver_bigphysarea_alloc
cxxxxxx bigphysarea_free_R__ver_bigphysarea_free
cxxxxxx bigphysarea_alloc_pages_R__ver_bigphysarea_alloc_pages
cxxxxxx bigphysarea_free_pages_R__ver_bigphysarea_free_pages
cxxxxxx bigphysarea_R__ver_bigphysarea
cxxxxxx in_group_p_Rxxxxxxxx
cxxxxxx update_atime_Rxxxxxxxx

I've placed xxxxxxx here just because I did not save /proc/ksyms
contents, sorry. Then I've looked at kernel/ksyms.c, the
corresponding part of this file after bigphysarea patch was this:

EXPORT_SYMBOL(find_vma);
EXPORT_SYMBOL(get_unmapped_area);

#ifdef CONFIG_BIGPHYS_AREA
EXPORT_SYMBOL(bigphysarea_alloc);
EXPORT_SYMBOL(bigphysarea_free);
EXPORT_SYMBOL(bigphysarea_alloc_pages);
EXPORT_SYMBOL(bigphysarea_free_pages);
EXPORT_SYMBOL(bigphysarea);
#endif

/* filesystem internal functions */
EXPORT_SYMBOL(in_group_p);
EXPORT_SYMBOL(update_atime);

Well, I've thought, let's try stupid thing: remove (comment out)
these conditional cpp statements:

EXPORT_SYMBOL(find_vma);
EXPORT_SYMBOL(get_unmapped_area);

/* #ifdef CONFIG_BIGPHYS_AREA */
EXPORT_SYMBOL(bigphysarea_alloc);
EXPORT_SYMBOL(bigphysarea_free);
EXPORT_SYMBOL(bigphysarea_alloc_pages);
EXPORT_SYMBOL(bigphysarea_free_pages);
EXPORT_SYMBOL(bigphysarea);
/* #endif */

/* filesystem internal functions */
EXPORT_SYMBOL(in_group_p);
EXPORT_SYMBOL(update_atime);

Then. again compiling the kernel, modules and reboot... And now it
works!

So, what went wrong? Any ideas?


--
Serguei Miridonov CICESE, Research Center,
CICESE, Optics Dept. Ensenada B.C., Mexico
PO Box 434944 E-mail: mirsev@cicese.mx
San Diego, CA 92143-4944 FAX: +52 (6) 1750553
U.S.A.




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.078 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site