LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2007, 06:39 PM   #1
RedOctober45
Member
 
Registered: Aug 2007
Distribution: OFFICE: Solaris, RedHawk
Posts: 65

Rep: Reputation: 15
'readelf' command - "magic" number


I need some more help/information for analyzing the "magic" number and what it does, in detail. (The number given in the header by using the 'readelf' command) I found from the man pages and header files what the numbers stand for and represent but I want to know more like how that number is used, when it is used or parsed to identify what file it is. Other things like where in a file is it located and the like. I just need to analyze it but I can't find any other information other than what it represents. Any information or links to websites with further information is greatly appreciated.

Thanks!
 
Old 10-24-2007, 02:17 AM   #2
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
If u want to get information on elf binary structure get the elf file format in net.
One good link [http://en.wikipedia.org/wiki/Executa...nkable_Format]
Get the spec sheet and it`ll have evrythin about an elf binary.

If u want to know the magic number of all files check the 'file' command rather than readelf.
It uses the file /usr/share/magic [in most distros] to get the file`s magic number and identifies the file.
Magic numbers are just the first few bytes [most of the times] to identify what the file and which application has to used on that file.
 
  


Reply



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
C Drive "/dev/hda1" accidently used in dd command at "of=" switch M D Linux - Software 4 04-26-2007 08:56 AM
"Bad magic number in superblock" for a windows partition Prio Linux - Newbie 1 12-14-2006 09:12 AM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
"how do I extract a number from a text file using shell command?" sdandeker Linux - Networking 3 02-12-2004 08:54 AM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 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
Open Source Consulting | Domain Registration