How to create a section in ELF?

N

netorib94

I'm reading about ELF file format and trying to create one without any library, to really understand how the things works--I'm looking for actual codeexamples using it. In fact, I was able to create one by setting all neededheaders and put some op code to it print a string on std out. But how to create the string table and then the sections, to be honest, I have no code to show because I didn't understand even how to create the string table myself and set it to sh_name. I'd love any code example how to do this. I've search a lot on internet without luck. Even libelf by example doesn't show how to do it directly the explanation actually I get it's same as from standard elf document.
 
N

Noob

netorib94 said:
I'm reading about ELF file format and trying to create one without
any library, to really understand how the things works--I'm looking
for actual code examples using it. In fact, I was able to create one
by setting all needed headers and put some op code to it print a
string on std out. But how to create the string table and then the
sections, to be honest, I have no code to show because I didn't
understand even how to create the string table myself and set it to
sh_name. I'd love any code example how to do this. I've search a lot
on internet without luck. Even libelf by example doesn't show how to
do it directly the explanation actually I get it's same as from
standard elf document.

Try comp.unix.programmer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top