LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 07-28-2004, 07:01 AM   #1
bestofmed
Member
 
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, 02:18 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
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:
http://sources.redhat.com/gdb/downlo.../stabs_13.html
 
Old 07-28-2004, 02:19 PM   #3
infamous41md
Member
 
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 http://x86.ddj.com/ftp/manuals/tools/elf.pdf , 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, 04:24 AM   #4
bestofmed
Member
 
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.
 
  


Reply


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 03:57 AM
How to add custom program links in Applications with icons? crash_override_me Ubuntu 2 10-01-2005 08:31 AM
How to add my custom icon to my JAVA app? on jBuilderX randomx Programming 6 07-08-2004 04:01 PM
add www-data user restless Linux - Newbie 1 06-01-2004 08:51 AM
radius append/add data ethanchic Linux - Software 0 04-16-2003 03:05 AM


All times are GMT -5. The time now is 07:21 PM.

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