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.

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