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.

Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

Webcast
8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
On Demand
Moderated by Linux Journal Contributor Mike Diehl

Sign up and watch now

Sponsored by Skybot