This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GLIBC_PRIVATE and crosstool?


John Utz wrote:
Hi;

GLIBC_PRIVATE shows up when i do an nm --dynamic against
libpthread-0.9.so on my target RH73 platform.

but it doesnt show up when i do an  nm --dynamic against the
libpthread-0.9.so that i built with crosstool (gcc-3.2.3-glibc-2.2.5).

what is this thing, why is it there, and could/should/how-would i
generate this symbol in my own glibc build?

tnx!

johnu


they're version definitions, i.e. each time they release a new version of glibc, they define new version definitions for shared libraries etc. You can view them by running "objdump -p" on a given library. Basically when you run a progam which was linked agains glibc, the dynamic linker/loader (which is /lib/ld-linux.so.2) will check all the libraries that need to be loades and their versions, if the versions mismatch, or fail dependancy tests etc, you'll get an error message and the program will not be run. This is why if you link some application against glibc-2.3.2, the chances are you will not be able to run it on system which has glibc-2.2.5 installed. This is all done to make sure the progams do not crash all of a sudden, while they're running. As people improve and develop glibc, they make incompatible changes to the API etc, so without the version definitions, you could run a program which was linked against some old and incompatible glibc, but if your you system has a different version of glibc, which has changed some functions/datatypes etc, your program might run for a while OK, but as soon as it makes a call to such a function, it will crash, leaving you to figure out what the hell has happened. With version definitions, if the versions don't match, the loader doesn't attempt to load and run that program. This is why it's a pain in the ass to upgrade glibc, because every other program which depends on glibc, needs to be recompiled agains the new incompatible glibc library.



------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]