[uClinux-dev] new shared library implementation trashage?

Miles Bader miles at lsi.nec.co.jp
Wed Apr 24 05:13:32 EDT 2002


I've been having problems getting the new source snapshot to work on the
v850 -- the text segments of programs are getting bogus values written
into them.

I notice the following in fs/binfmt_flat.c:

	/* Update data segment pointers for all libraries */
	for (i=0; i<MAX_SHARED_LIBS; i++)
		if (libinfo.lib_list[i].loaded)
			for (j=0; j<MAX_SHARED_LIBS; j++)
				(-(j+1))[(unsigned long *)(libinfo.lib_list[i].start_data)] =
					(libinfo.lib_list[j].loaded)?
						libinfo.lib_list[j].start_data:UNLOADED_LIB;

I don't understand at all what it's trying to do, and I thought at first
that it wouldn't affect me, as the v850 doesn't have any kind of shared
library support.  However, I notice now that the executable file is
apparently considered `shared library number 0'.

That said, what on earth is happening here?  It appears as if this is
going to simply go and trash some memory before the start of the data
segment (which in my case, is the text segment).  Is this true?  Should
I have somehow updated the way I build flat files?  Was this announced
somewhere?

Thanks for any help,

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list