lkml.org 
[lkml]   [1996]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.0.19 unresolved symbols?
>>>>> On Thu, 12 Sep 1996 14:51:46 -0500 (CDT), todd@miango.com (Todd Fries)
>>>>> said:

> I can't figure out what I am doing wrong. I didn't
> change my kernel configuration, and the patch
> from 2.0.18 to 2.0.19 shouldn't have effected
> the scsi modules I am using. Yet, 2.0.18's scsi
> modules work just fine, whereas 2.0.19's have
> unresolved symbols. They compile fine, just that
> they are unusable:
> # depmod -a
> *** Unresolved symbols in module /lib/modules/2.0.19/block/floppy.o
> *** Unresolved symbols in module /lib/modules/2.0.19/block/loop.o
> *** Unresolved symbols in module /lib/modules/2.0.19/scsi/scsi_mod.o
> *** Unresolved symbols in module /lib/modules/2.0.19/scsi/sd_mod.o
> *** Unresolved symbols in module /lib/modules/2.0.19/scsi/sr_mod.o
> *** Unresolved symbols in module /lib/modules/2.0.19/scsi/st.o
> #

> I don't get it. Any clues?

This problem is a result of recent additions to the semaphore facility in the
kernel. These modules use MUTEX or MUTEX_LOCKED. If you look at the
definition of these macros, in linux/include/asm-i386/semaphore.h, you find:

extern inline void down(struct semaphore * sem)
{
__asm__ __volatile__(
"# atomic down operation\n"
"1:\n\t"
"leal 1b,%%eax\n\t"
#ifdef __SMP__
"lock ; "
#endif
"decl %0\n\t"
"js down_failed"
:/* no outputs */
:"m" (sem->count), "c" (sem)
:"ax","dx","memory");
}

/*
* Note! This is subtle. We jump to wake people up only if
* the semaphore was negative (== somebody was waiting on it).
* The default case (no contention) will result in NO
* jumps for both down() and up().
*/
extern inline void up(struct semaphore * sem)
{
__asm__ __volatile__(
"# atomic up operation\n\t"
"leal 1f,%%eax\n\t"
#ifdef __SMP__
"lock ; "
#endif
"incl %0\n\t"
"jle up_wakeup\n"
"1:"
:/* no outputs */
:"m" (sem->count), "c" (sem)
:"ax", "dx", "memory");
}

#endif

The symbols that are not being found are down_failed and up_wakeup. If you do
a "nm -u sr_mod.o" (for instance), you will see these symbols in the list, but
missing the extra info that most symbols have:

[stuff deleted]
unlock_buffer_R55c84486
unregister_blkdev_Rd39bbca9
up_wakeup
verify_area_R4cfda560
wait_for_request_Rfe009ba4
[more stuff]

...and this seems to be the source of the problem. These symbols are actually
defined in linux/arch/i386/lib/semaphore.S, and look perfectly normal in
System.map. I've tried various kludges (defining prototypes, etc.) to try and
make these symbols "real", but nothing so far has made any difference.

-Randy
--
http://cogsci.ucsd.edu/~gobbel/

NOTICE: I DO NOT ACCEPT UNSOLICITED COMMERCIAL EMAIL MESSAGES OF ANY KIND. I
CONSIDER SUCH MESSAGES PERSONAL HARRASSMENT AND A GROSS INVASION OF MY
PRIVACY. By sending unsolicited commercial advertising/solicitations (or
otherwise on or as part of a mailing list) to me via e-mail you will be
indicating your consent to paying John R. (Randy) Gobbel $1,000.00 U.S.D./hour
for a minimum of 1 hour for my time spent dealing with it. Payment due in 30
days upon receipt of an invoice (e-mail or regular mail) from me or my
authorized representative.

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