|
Home > Archive > Unix questions > February 2004 > Binary formats
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Marmagya 2004-02-04, 6:33 pm |
| Hello,
Can someone suggest me some good sites explaining the details of
binary file formats supported on linux?
Regards
Marmagya
| |
| Pascal Bourguignon 2004-02-05, 1:39 am |
| Marmagya <marmagya@eNOpatra_SPAM.com> writes:
quote:
> Hello,
> Can someone suggest me some good sites explaining the details
> of binary file formats supported on linux?
Unix systems don't support any file format, The allow any kind of byte
sequence in files.
It's up to the libraries and the programs to know how to decode or
encode binary files.
This allow a unix system to effectively and potentially support any
file format. Just write a program to read and write the binary file
format you want.
The file formats (most of them NOT binary though) are documented in
the section 5 of the manual:
ls /usr/share/man/man5
man 5 passwd
etc.
Otherwise, the most definitive documentation cana be found probably in
the sources of the programs that read or write the binary files in
question.
--
__Pascal_Bourguignon__ http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/
| |
| Lew Pitcher 2004-02-05, 2:39 am |
| On 05 Feb 2004 15:50:39 +0100, Pascal Bourguignon
<spam@thalassa.informatimago.com> wrote:
quote:
>Marmagya <marmagya@eNOpatra_SPAM.com> writes:
>
>
>Unix systems don't support any file format,
Unless, of course, you are talking about the binary format of "binary" files
(i.e. native executable files). At least one special format /has/ to be
recognized and supported by the underlying OS, in order for that OS to properly
execute the exec*() system call.
The three formats I've often heard about are:
- "a.out"
- ELF, and
- COFF
I'm sure that there are others as well.
[snip]
--
Lew Pitcher
IT Consultant, Enterprise Technology Solutions
Toronto Dominion Bank Financial Group
(Opinions expressed are my own, not my employers')
| |
| Robert Harris 2004-02-05, 2:39 am |
| I suspect that what Marmgaya really wants to know is the format of
binary executable files which is ELF. Well, SCO are the keepers of the
ELF format but if you search for "ELF ABI" or something like it, you
will find references, e.g. at
<http://x86.ddj.com/ftp/manuals/tools/elf.pdf>
Robert
Pascal Bourguignon wrote:quote:
> Marmagya <marmagya@eNOpatra_SPAM.com> writes:
>
>
>
>
> Unix systems don't support any file format, The allow any kind of byte
> sequence in files.
>
> It's up to the libraries and the programs to know how to decode or
> encode binary files.
>
> This allow a unix system to effectively and potentially support any
> file format. Just write a program to read and write the binary file
> format you want.
>
> The file formats (most of them NOT binary though) are documented in
> the section 5 of the manual:
> ls /usr/share/man/man5
> man 5 passwd
> etc.
>
> Otherwise, the most definitive documentation cana be found probably in
> the sources of the programs that read or write the binary files in
> question.
>
>
| |
| phn@icke-reklam.ipsec.nu 2004-02-05, 3:37 am |
| In comp.unix.internals Marmagya <marmagya@enopatra_spam.com> wrote:quote:
> Hello,
> Can someone suggest me some good sites explaining the details of
> binary file formats supported on linux?
Everyone. Any combination of bits is a valid file format in unix.
Linux, as beeing a clean-room implementation is no difference.
The ones that the 'file' command recognizes is documented
in /etc/magic ( or where your particular vendor chooses to
displace it)
quote:
> Regards
> Marmagya
--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.
| |
| Marmagya 2004-02-05, 5:34 pm |
| Robert,
Thanks a lot, yes this is what I was looking for. I heard that
a.out is a different format than ELF and I am exploring whether there
are more formats available/supported. I would also like to know how
these formats are different.
Regards
Marmagya
Robert Harris wrote:[color=blue]
> I suspect that what Marmgaya really wants to know is the format of
> binary executable files which is ELF. Well, SCO are the keepers of the
> ELF format but if you search for "ELF ABI" or something like it, you
> will find references, e.g. at
>
> <http://x86.ddj.com/ftp/manuals/tools/elf.pdf>
>
> Robert
>
> Pascal Bourguignon wrote:
>
| |
| zentara 2004-02-06, 1:36 am |
| On Fri, 06 Feb 2004 11:50:34 +0530, Marmagya
<marmagya@eNOpatra_SPAM.com> wrote:
>Robert,
> Thanks a lot, yes this is what I was looking for. I heard that
>a.out is a different format than ELF and I am exploring whether there
>are more formats available/supported. I would also like to know how
>these formats are different.
You might get some information by doing a "make menuconfig" of
the kernel source tree, at look at General Setup, and the kernel
support for "binaries", then look at the corresponding source code
Also look in /usr/src/linux/Documentation/filesystems for a list
possible filesystems.
--
When life conspires against you, and no longer floats your boat,
Don't waste your time with crying, just get on your back and float.
| |
| Robert Harris 2004-02-06, 1:36 am |
| Just a minute - filesystems are nothing to do with binary formats: they
are concerned with how files and directories are represented on media.
ELF is the supported binary executable format, at least on i386
architecture but I believe on all others too. a.out format is also
supported but it really is a legacy format: Linux distributions have
been all ELF for many years now.
Robert
zentara wrote:
> On Fri, 06 Feb 2004 11:50:34 +0530, Marmagya
> <marmagya@eNOpatra_SPAM.com> wrote:
>
>
>
>
> You might get some information by doing a "make menuconfig" of
> the kernel source tree, at look at General Setup, and the kernel
> support for "binaries", then look at the corresponding source code
>
> Also look in /usr/src/linux/Documentation/filesystems for a list
> possible filesystems.
>
>
> --
> When life conspires against you, and no longer floats your boat,
> Don't waste your time with crying, just get on your back and float.
| |
| zentara 2004-02-06, 11:33 pm |
| On Fri, 06 Feb 2004 15:01:44 +0000, Robert Harris
<robertdotfdotharris@blueyonder.co.uk> wrote:
>Just a minute - filesystems are nothing to do with binary formats: they
>are concerned with how files and directories are represented on media.
Oops you are right..I was just quickly looking at the docs, and
jumped on that. I probably should have refered him to
/usr/src/linux/Documentation/binfmt_misc.txt
>ELF is the supported binary executable format, at least on i386
>architecture but I believe on all others too. a.out format is also
>supported but it really is a legacy format: Linux distributions have
>been all ELF for many years now.
As others have pointed out, the OP probably intended to ask about
"executable binary formats", but the whole class of binary files
includes just about everything, after all, it's all 1's and 0's at the
lowest level.
So come to think of it, the filesystems which the files are stored on
would also affect it's format. What if it's on an encrypted filesystem?
I havn't looked at it, but I wonder if the actual bits of an ELF file is
the same on a reiserfs vs. iso9660 ? I would guess so.
--
When life conspires against you, and no longer floats your boat,
Don't waste your time with crying, just get on your back and float.
| |
| newsgroup user 2004-02-07, 1:34 am |
| zentara <zentara@highstream.net> writes:
> So come to think of it, the filesystems which the files are stored on
> would also affect it's format. What if it's on an encrypted filesystem?
> I havn't looked at it, but I wonder if the actual bits of an ELF file is
> the same on a reiserfs vs. iso9660 ? I would guess so.
Yes, they are the same, if you don't count fragmentation as a difference.
--
Måns Rullgård
mru@kth.se
|
|
|
|
|