The ELF Object File Format: Introduction

The Executable and Linking Format (ELF) has been a popular topic lately. People wonder why the kernel configuations script asks whether or not to donfigure loading ELF executables. As ELF will eventually be the common object file format for Linux binaries, it is appropriate to document it a bit. This month, Eric introduces us to ELF, and next month he will give us a guided tour of real ELF files.
______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

ELF

khalid's picture

I am using gcc compiler in linux can anybody mail me in detail what libraries are needed in the linux executable programs and how the libraries in the linux are dynamically loaded. if possible can any one mail me source code for this.

thanks & regards

khalid

process to execute the arm program

parvendra's picture

sir,
i m not not getting the compilation for arm program ,please tell me how we select the path and which file we include in this,

please tell the total commands to run program in linux redhat8.0.

when i enter first command which is like that

arm-elf-as -D -gstabs -ahlms -mcpu=arm7tdmi -O add.o add.s

than i get the message
arm-elf-as: no such file or directory
please help me...

thanking u in advance

Dynamic Loader

Benitta Lawrence's picture

I am trying to develop a Dynamic Loader for elf format shared libraries.I would like to know whether a function which is defined in an application say app.out can be called in a shared object file.If yes, How can it be done.

how to convert a.out to a flat binary file

srikanth's picture

hi friends

i am trying to convert a.out(or we can say "executable") into a flat binary file. so that i can load it into a floppy and run it with out any operating system.
can anyone help me out...

Link to ne next part

hibou57's picture

As a link is missing to the next part - Part 2 : The ELF Object File Format by Dissection

GCC-ELF

Anonymous's picture

Hi everyone,

I am trying to use 'gcc-elf' but its not reconizing the command. Does anyone know what files I'm missing and where I can obtain them..thanks

Ex. gcc-elf -dr foo.c -> to generate ir(or rtl) using elf format

dude, just use gcc today -

Anonymous's picture

dude, just use gcc today - gcc-elf is what he was using when Linux was still using a.out. So, in that article, he would've been using:

'gcc' - a.out
'gcc-elf' - ELF binary

duh.

This outstanding article is

Prakash's picture

This outstanding article is continuing to benefit mankind even 11 years after its submission.

I was able to do minimal elf file walkthrough using a C program based on concepts learnt from Eric's articles.

Thank you so much Eric for doing this for us.

Kind Regards,
Prakash

Very useful even after 12

Anonymous's picture

Very useful even after 12 years, and will remain so till we have elf ;;)

The doc about the ELF format

Hibou57's picture

The doc about the ELF format is now there : ELF Format

Just one Word to descirbe

Balkad's picture

Just one Word to descirbe this article : FANTASTIC !!!!

Re: Kernel Korner: The ELF Object File Format: Introduction

Anonymous's picture

concise & clear

Re: Kernel Korner: The ELF Object File Format: Introduction

Anonymous's picture

Really very useful and interesting introduction.With this i can understand that main advantages of ELF format over a.out is in using with Shared lib and it provides more symbolic information which is useful for Debugger.

Are there any more advantages of ELF over *.out format??

Re: Kernel Korner: The ELF Object File Format: Introduction

Anonymous's picture

Very interesting, unfortuneately the link given for the ELF doc. is not availible anymore.

Webcast
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions