Advertisement

Wednesday, December 12, 2007

What's All This about ELF? glibc?

This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).
See the ELF HOWTO by Daniel Barlow. Note that this is not the file move-to-elf, which is a blow-by-blow account of how to upgrade to ELF manually.

Linux has two different formats for executables, object files, and object code libraries, known as, "ELF". (The old format is called "a.out".) They have advantages, including better support for shared libraries and dynamic linking.

Both a.out and ELF binaries can coexist on a system. However, they use different shared C libraries, both of which have to be installed.

If you want to find out whether your system can run ELF binaries, look in / lib for a file named, libc.so.5. If it's there, you probably have ELF libraries. If you want to know whether your installation actually is ELF you can pick a representative program, like ls, and run file on it:

 -chiark:~> file /bin/ls                                                   
/bin/ls: Linux/i386 impure executable (OMAGIC) - stripped

valour:~> file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped

There is a patch to get 1.2.x to compile using the ELF compilers, and produce ELF core dumps, at ftp://tsx-11.mit.edu/pub/packages/GCC/. You do not need the patch merely to run ELF binaries. 1.3.x and later do not need the patch at all.

The GNU glibc2 libraries are essentially more recent versions of ELF libraries that follow most of the same processes for dynamic linking and loading. Upgrade information is contained in How Do I Upgrade the Libraries without Trashing the System?.

1 comments:

Nice efforts!!!!!
Keep going........
Plz do visit on my blog & show your presence over there by leaving a comment on posts.If you want,You can also provide a link to my blog from your blog.

my blog:- http://anup-life.blogspot.com/
Thanx!

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More