Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-28-2004, 06:01 AM   #1
Registered: Jul 2004
Location: Jemna, Tunisia
Posts: 46

Rep: Reputation: 15
How can I add custom data to my executable

Hi everyone

Plz I want to ask how to embed custom data in linux standard executables(I mean the ELF exe) so I can extract it using a table definition like method. I tried a previous method which is not what I'm looking for. you can find the method here (the implementation for the example is in delphi).

I want a standard way that is possible for me or for any other developer to find out the custom data.
Old 07-28-2004, 01:18 PM   #2
jim mcnamara
Registered: May 2002
Posts: 964

Rep: Reputation: 36
I'm guessing this is not steganography, so you probably want a way of embedding completely arbitrary data in object file. Soemtimes it's called stabs. But I'm not sure. It requires writing asm.

Look here:
Old 07-28-2004, 01:19 PM   #3
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
what exactly do u want for an answer??? append your data to the end of file and go about your business. if you wan to get tricky, then read the ELF standards , and you'll see that executable files do not need the section header table. any non stripped binary has one, and u can instead embed your data in the sh table, that way the original exe won't change sizes.
Old 07-29-2004, 03:24 AM   #4
Registered: Jul 2004
Location: Jemna, Tunisia
Posts: 46

Original Poster
Rep: Reputation: 15
This is why

Thank you for the answers.

The reason I wanna it like that coz I don't want a non standard way to add custom data (there will be incompatability between footers).

i need it for the following projects:
[list=1][*]Linstaller: Installation builder for Linux that will build one execuatable with all the data.[*]Piz: (Zip flipped): a compression program that make selfextractor archives (small installation)[*]Programming a kde thumb viewer for executable files. This viewer will extract the executable information (icon/screenshot/website) and more from the executable and display it.[/list=1]

I don't want my exec to be confused or removed whene someone else add data to the end.
As you see each project try to add custom data using his way. This is not a solution, so I made standard structure to define the content and more. but I'm looking for better solution and I think I found it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add a device driver into custom redhat 9 install cd zhchang Linux - Hardware 3 03-31-2010 02:57 AM
How to add custom program links in Applications with icons? crash_override_me Ubuntu 2 10-01-2005 07:31 AM
How to add my custom icon to my JAVA app? on jBuilderX randomx Programming 6 07-08-2004 03:01 PM
add www-data user restless Linux - Newbie 1 06-01-2004 07:51 AM
radius append/add data ethanchic Linux - Software 0 04-16-2003 02:05 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration