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.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState