A help to create an ELF file


 
Thread Tools Search this Thread
Top Forums Programming A help to create an ELF file
# 1  
Old 07-22-2011
A help to create an ELF file

Hi!!! How do I create a file .ELF? What code should I use, could help me with a simple code or example? I know programming to Windows by important languages but this seems to be more sistematical, and I really don't know how to.
# 2  
Old 07-22-2011
ELF is an exectuable format that is used on most Linux and Solaris OS boxes.

If you have gcc or cc on your unix box, create a simple "hello world" C code file.
Call it myfile.c Use gcc below if you have gcc, otherwise use cc.
Code:
gcc -o myfile myfile.c
file myfile

The file shows you what type of executable file was created. If you system uses ELF, it will be an ELF file.
# 3  
Old 07-23-2011
Absolutilly thanks jim. I finally understand about the .ELF Maybe I can create an file but I will search fo r a Unix system first.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

I am following the "Compilling and Installing" guide from Apache > HTTP Server > Documentation > Version 2.4 page The configure running OK: # export CC="gcc -m64" # ./configure \ --prefix=/usr/local/apache2/httpd-2.4.20 \ --with-port=80 \ --with-mpm=worker \ --enable-mods-shared=most \... (0 Replies)
Discussion started by: jhuang
0 Replies

2. Shell Programming and Scripting

ps -elf AND grep for changes

Hoping theres something already out there like this. I have a list of proccesses who's "ps -elf" (field 10) values I need to continuously monitor and if the values of field 10 start to signiciantly increase (double, triple) then do something. The field 10 is the "memory size" field. (these... (4 Replies)
Discussion started by: ajp7701
4 Replies

3. Solaris

Not a Vaild ELF File

Hi Anyone, I have two disks , one is primary and anothe is mirror. I checked my mirror disk , It was fine. After that i booted from my primary disk, did some installations regarding kernel patches. It did not get booted properly. It says ==================== Not a valid... (2 Replies)
Discussion started by: jegaraman
2 Replies

4. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

5. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

6. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

7. UNIX for Dummies Questions & Answers

Running elf files

I have a few questions about elf files and how they are executed. When gcc compiles a elf file it creates an executable. Is this executable then run directly by the hardware or does the kernel get involved, interpret the elf file and place the asm code directly in memory. Cheers (0 Replies)
Discussion started by: mshindo
0 Replies

8. Linux

editing ELF file

Hello, This is not exactly relevant to Linux kernel but I'm gonna ask any way. Is there any way I can modify a 64-bit ELF object file to make it look like 32-bit ELF object file and link it (using `ld`) with 32-bit ELF file? I tried libelf but was unsuccessful. I had this pretty link... (1 Reply)
Discussion started by: tejuwala
1 Replies

9. Filesystems, Disks and Memory

How to find Dependent libraries in ELF file?

Dear group, I need to load dependent libraries for an application which is in ELF format.please let me know how to parse the ELF file to find dependent libraries. thnaks in advance, Ravinder (3 Replies)
Discussion started by: ravinder.are
3 Replies
Login or Register to Ask a Question