The ELF Object File Format by Dissection

The Executable and Linking Format has been a popular topic lately, as people ask why the kernel configuration script asks whether or not to configure loading ELF executables. Since ELF will eventually be the common object file format for Linux binaries, it is appropriate to document it a bit. Last month, Eric introduced us to ELF, and this month, he gives 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.

Very good article indeed.

ms's picture

Very good article indeed.

Very good description of the ELF file format

Vikings's picture

Hi all
I'm trying to write a small ELF loader, enough to interface the L4/Fiasco microkernel from a non-ELF executable files (LX types, OS/2 flavour). So after the loadable segments have been read into their virtual space, What is the next step? Set up the .got table, but how?
Greetings

Good article

Tapas Mishra's picture

This is a very good article.I came across it by chance but it is a very good article as I am new to kernel development it did helped me.

Another year, another reader..

Anonymous's picture

2010 and still useful to at least me :)
Although the output of readelf is more verbose these days..

Allocation of global data

Brian Trugillo's picture

Global data as well as static data will be allocated on the .data section of the linker directive.

where the global data goes into ?

Anonymous's picture

thank you very much for the detailed info.
where the global data goes into, in which section the global data goes ?

How to change Entry Point Address?

Hari Prasath's picture

Hi Eric,

IT was a good material on ELF.....

Is it possible to change the entry point address of an ELF object file.How to do it?

Question

Arbey's picture

hello, I have a problem and I believe that you can solve to me, beforehand thank you very much. I must make an operating system that it loaded to me from a USB, then I am using bootmaker, but when attempt to run it leaves the following message to me:
error: cannot load "kernel.elf"

as I solve it? thank you very much

sorry for my english, if someone speak spanish, better.

link to the previous part

Hibou57's picture

To give a link to the first part (it was missing)...
Part 1 : The ELF Object File Format - Introduction

It is realy a good article

Gayanath's picture

This is a very good article, Most of the programmers don't know what are the thigs happenning when they compiled ,Thank u very much.
Gayanath

Great Article.

Anonymous's picture

This is a very good article.
It is a recommended read especially during the late night.

The ELF format is almost invisible to most users.
This good article also let me understanding how much time/work
has been devoted by the freelance programmers around the world
because even something seemingly trivial but really important
needs good design from the great minds. I am very grateful.
Thanks!

For those rude or impolite persons, please be humble because
you did/do nothing good to the community but just mumble harshly.
And that will NOT win any honor to you.

(I am not a native English speaker. Forgive me if you do not understand my writing.)

Great Article.

Anonymous's picture

This is a very good article.
It is a recommended read especially during the late night.

The ELF format is almost invisible to most users.
This good article also let me understanding how much time/work
has been devoted by the freelance programmers around the world
because even something seemingly trivial but really important
needs good design from the great minds. I am very grateful.
Thanks!

For those rude or impolite persons, please be humble because
you did/do nothing good to the community but just mumble harshly.
And that will NOT win any honor to you.

(I am not a native English speaker. Forgive me if you do not understand my writing.)

I must admit that I also foun

Anonymous's picture

I must admit that I also found this article useful, even in the year 2005. Gave me quite an insight as to what was actually happening in the ELF format representation of my process.

Hey Its a very good article.

Anonymous's picture

Hey Its a very good article. this isn't a shit. watch your words...

Re: Kernel Korner: The ELF Object File Format by Dissection

Anonymous's picture

Well 9 years on, and there are still people out here who are grateful for you article.
It certainly helped me solve a problem.

AlanB

Re: Kernel Korner: The ELF Object File Format by Dissection

Anonymous's picture

Hello Eric, thanks a lot. Very good!

Great Article

Anonymous's picture

Hi Eric, I've just read this article and I think its still relevant and useful to a lot of people. Thanks a lot.

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