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]

Version definitions and dynamic loading


Could somebody please explain to me what version definitions are used for and how they are used in ELF object/executable files.
Take for example Linux dynamic linker/loader ld-linux.so.2 I have two of them, one in /lib which came with glibc-2.2.5 and another one in my home directory which came with glibc-2.3.2




Running objdump on ld-linux.so.2 (glibc-2.2.5)
----------------------------------------------------
roman: objdump -p /lib/ld-linux.so.2

/lib/ld-linux.so.2: file format elf32-i386

... etc

Version definitions:
1 0x01 0x0ee1b232 ld-linux.so.2
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
        GLIBC_2.0
4 0x00 0x09691f71 GLIBC_2.1.1
        GLIBC_2.1
5 0x00 0x0d696912 GLIBC_2.2
        GLIBC_2.1.1
6 0x00 0x09691a73 GLIBC_2.2.3
        GLIBC_2.2

roman:



Running objdump on ld-linux.so.2 (glibc-2.3.2)
----------------------------------------------------

roman: objdump -p ./ld-linux.so.2

./ld-linux.so.2: file format elf32-i386

... etc

Version definitions:
1 0x01 0x0ee1b232 ld-linux.so.2
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
        GLIBC_2.0
4 0x00 0x0d696913 GLIBC_2.3
        GLIBC_2.1
5 0x00 0x0963cf85 GLIBC_PRIVATE
        GLIBC_2.3

roman:


What I am confused about is how different library versions are defined and how they are used, i.e.


From ld-linux.so.2 (glibc-2.2.5)

2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
        GLIBC_2.0

Does the line above say that this ELF file is compatible with glibc versions 2.0 and 2.1??? Well this linker is statically linked anyway, so maybe it's just saying it was linked against those libraries??
Why is there another indented line, stating GLIBC_2.0??? What is it used for??



From ld-linux.so.2 (glibc-2.3.2)


5 0x00 0x0963cf85 GLIBC_PRIVATE
        GLIBC_2.3

What is that GLIBC_PRIVATE thing?? What sort of version is that?

Basically what I am trying to do is to understand how it all fits together, and to run objdump on an ELF object/executable file and to accurately determine if the libraries which this file was linked against will match the libraries currently installed on the system.

I am still searching for this topic on Google, but nothing relevant seems to show up

Thanks in advance


------ 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]