Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

"Don't fear the pen. When in doubt, draw a pretty picture." -- Baker's Third Law of Design.


programming / alt.lang.asm / what is the greatest executable format in your point of view

SubjectAuthor
* what is the greatest executable format in your point of viewPeter Cheung
+- Re: what is the greatest executable format in your point of viewDavs
+- Re: what does an operating system need in an executable format, wasRod Pemberton
+* Re: what is the greatest executable format in your point of viewRobert Wessel
|`* Re: what is the greatest executable format in your point of viewPeter Cheung
| `* Re: what is the greatest executable format in your point of viewRick C. Hodgin
|  `- Re: what is the greatest executable format in your point of viewPeter Cheung
`- Re: what is the greatest executable format in your point of viewRick C. Hodgin

1
Subject: what is the greatest executable format in your point of view
From: Peter Cheung
Newsgroups: alt.lang.asm
Date: Wed, 3 Jul 2019 16:11 UTC
X-Received: by 2002:a05:6214:2b0:: with SMTP id m16mr32762813qvv.23.1562170319885;
Wed, 03 Jul 2019 09:11:59 -0700 (PDT)
X-Received: by 2002:a0d:db51:: with SMTP id d78mr23597551ywe.500.1562170319445;
Wed, 03 Jul 2019 09:11:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!m24no2938625qtm.0!news-out.google.com!g23ni35qtq.1!nntp.google.com!m24no2938623qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Wed, 3 Jul 2019 09:11:59 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=14.0.175.11; posting-account=bv9fUwoAAAALZPMyH_uNDx4MtNzAsvy6
NNTP-Posting-Host: 14.0.175.11
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
Subject: what is the greatest executable format in your point of view
From: mcheun...@gmail.com (Peter Cheung)
Injection-Date: Wed, 03 Jul 2019 16:11:59 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 1
View all headers
Is it elf? pe? coff?
thx


Subject: Re: what is the greatest executable format in your point of view
From: Davs
Newsgroups: alt.lang.asm
Date: Fri, 5 Jul 2019 08:46 UTC
References: 1
X-Received: by 2002:ac8:2e59:: with SMTP id s25mr1676963qta.94.1562316414504;
Fri, 05 Jul 2019 01:46:54 -0700 (PDT)
X-Received: by 2002:a81:3c56:: with SMTP id j83mr1285167ywa.141.1562316414310;
Fri, 05 Jul 2019 01:46:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!m24no8613609qtm.0!news-out.google.com!g23ni228qtq.1!nntp.google.com!m24no8613598qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Fri, 5 Jul 2019 01:46:53 -0700 (PDT)
In-Reply-To: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=58.69.61.56; posting-account=pNq-1woAAACJdJaGqYSw47U7LcFg5qWy
NNTP-Posting-Host: 58.69.61.56
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <68df32cf-4dc3-4d1c-9739-c11679f351b1@googlegroups.com>
Subject: Re: what is the greatest executable format in your point of view
From: johndeme...@gmail.com (Davs)
Injection-Date: Fri, 05 Jul 2019 08:46:54 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
View all headers
On Thursday, July 4, 2019 at 12:12:00 AM UTC+8, Peter Cheung wrote:
Is it elf? pe? coff?
thx

OS?

elf is dependent upon .so file

pe is dependent upon .dll file

same from my point of view.


Subject: Re: what does an operating system need in an executable format, was [Re: what is the greatest executable format in your point of view]
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Netfront http://www.netfront.net/
Date: Fri, 5 Jul 2019 11:01 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.unit0.net!news.netfront.net!.POSTED.68.54.0.181!not-for-mail
From: inva...@lkntrgzxc.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: what does an operating system need in an executable format, was
[Re: what is the greatest executable format in your point of view]
Date: Fri, 5 Jul 2019 07:01:47 -0400
Organization: Netfront http://www.netfront.net/
Message-ID: <qfnahp$2buf$1@adenine.netfront.net>
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Injection-Date: Fri, 5 Jul 2019 10:59:05 -0000 (UTC)
Injection-Info: adenine.netfront.net; posting-host="68.54.0.181";
logging-data="77775"; mail-complaints-to="news@netfront.net"
View all headers
On Wed, 3 Jul 2019 09:11:59 -0700 (PDT)
Peter Cheung <mcheung63@gmail.com> wrote:

Is it elf? pe? coff?

Unfortunately, it seems that Wotsit's File Format collection website is
no longer online.  Wayback archive has only archived the website, not
their collection of file formats.  There seem to be some mirrors, but
I've not found any that give me the files so far.

Is it elf? pe? coff?

In terms of "greatest"- however that may be defined - I have no real
exposure to the technical details, e.g., layout or capabilities, of
executable file formats.

From my perspective, as long as I can load the code to the correct
address and execute it, why should I care about anything else? ...

Mostly, executable formats should be "transparent" to the user, in the
sense that you shouldn't notice them or need to know anything about
them.  It's the operating system and compiler tools that uses them.

So, I really only have a bit of exposure to the layout two executable
formats: COFF and MS-DOS com, although I've produce code for four: ELF,
COFF, MS-DOS com and MS-DOS exe.

Obviously, MS-DOS compilers produce exe and Linux compilers produce
ELF executables, but I've had no need to understand their formats.  I
only needed to understand a bit of COFF because I use DJGPP
executables to load code to execute for my OS.

DJGPP (GCC + custom DOS libraries) uses COFF.  One of the problems here
is that other GCC based environments use ELF.  So, you can't easily
combine code from say Linux with code for DJGPP.

In other words, I would avoid COFF simply because tools for other
platforms don't produce compatible code, even though you likely
couldn't combine such object files (binary code) together, due to
different OS API's.

If you're using GNU or Linux tools, you probably want ELF.

If you're using Windows tools, you'll want PE or NE etc.
http://fileformats.archiveteam.org/wiki/Portable_Executable


So, maybe we should ask, what does an operating system need in an
executable format? ...  I.e., there could be more than one that are
sufficient but, there may be some that are superior.

Wikipedia has a page comparing many:
https://en.wikipedia.org/wiki/Comparison_of_executable_file_formats

The formats with the most "green-yes" features are ELF, LE, LX, PE,
PE32+, and Mach-O.

The column with the most "green-yes" support is "arbitrary sections".
Then, "symbol table" and "string table" are next in terms of
"green-yes" features, but not as widely supported.

It's clear that older formats like a.out, COFF, Amiga Hunk, CMD, DOS
COM, DOS MZ, were sufficient for their platforms, even though they
don't have support for the above features.


Rod Pemberton
--
Once upon a time, many decades ago in a place far away, humble people
sought their freedom, and lost. "Ideas are bulletproof."



Subject: Re: what is the greatest executable format in your point of view
From: Robert Wessel
Newsgroups: alt.lang.asm
Organization: Forte - www.forteinc.com
Date: Fri, 5 Jul 2019 15:12 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
From: robertwe...@yahoo.com (Robert Wessel)
Newsgroups: alt.lang.asm
Subject: Re: what is the greatest executable format in your point of view
Message-ID: <aspuhe9olbljlpkcudf6on38vsl2i45vb3@4ax.com>
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
User-Agent: ForteAgent/7.20.32.1218
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 20
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Fri, 05 Jul 2019 10:12:33 -0500
X-Received-Bytes: 1657
X-Received-Body-CRC: 2403903644
View all headers
On Wed, 3 Jul 2019 09:11:59 -0700 (PDT), Peter Cheung
<mcheung63@gmail.com> wrote:

Is it elf? pe? coff?
thx


There are things I'd change about all of them.  The being said, ELF is
the most modern one in widespread use, with PE, a variation on COFF
probably being the second place choice.  Note that both ELF and
PE/COFF are both object *and* executable file formas.

If you adopt a well known, and widely used, format, you decouple the
development of the various parts of your system.  You can write and
test code for the new system with existing compilers, or test your new
compilers on existing systems.

So the question is really what platform are you planning to host your
development work on?  If it's *nix, go with ELF, if it's Windows, use
PE.


Subject: Re: what is the greatest executable format in your point of view
From: Rick C. Hodgin
Newsgroups: alt.lang.asm
Date: Fri, 5 Jul 2019 15:40 UTC
References: 1
X-Received: by 2002:a37:8103:: with SMTP id c3mr3715039qkd.114.1562341222613;
Fri, 05 Jul 2019 08:40:22 -0700 (PDT)
X-Received: by 2002:a0d:e18a:: with SMTP id k132mr2587407ywe.240.1562341222448;
Fri, 05 Jul 2019 08:40:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m24no9601736qtm.0!news-out.google.com!g23ni258qtq.1!nntp.google.com!m24no9601729qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Fri, 5 Jul 2019 08:40:22 -0700 (PDT)
In-Reply-To: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=12.18.147.98; posting-account=BcpLkAoAAACbVwkzAAKP0XXOd-MDREpp
NNTP-Posting-Host: 12.18.147.98
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7477e88d-2d0c-4994-8533-ddc613c6b397@googlegroups.com>
Subject: Re: what is the greatest executable format in your point of view
From: rick.c.h...@gmail.com (Rick C. Hodgin)
Injection-Date: Fri, 05 Jul 2019 15:40:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1806
X-Received-Body-CRC: 2394409436
View all headers
On Wednesday, July 3, 2019 at 12:12:00 PM UTC-4, Peter Cheung wrote:
Is it elf? pe? coff?
thx

Since you are creating your own executable format, and plan to
create your own OS eventually, create your own format that makes
sense for your tools, and add-in external support for other
formats you'd like to support.

I would argue your linker should be able to link in all formats
though.  You'll want to be able to link in code generated from
other sources.

--
Rick C. Hodgin


Subject: Re: what is the greatest executable format in your point of view
From: Peter Cheung
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 08:08 UTC
References: 1 2
X-Received: by 2002:a05:620a:247:: with SMTP id q7mr10129244qkn.265.1562486914223;
Sun, 07 Jul 2019 01:08:34 -0700 (PDT)
X-Received: by 2002:a5b:308:: with SMTP id j8mr6197415ybp.2.1562486913824;
Sun, 07 Jul 2019 01:08:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!m24no2797294qtm.0!news-out.google.com!g23ni564qtq.1!nntp.google.com!m24no2797289qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 01:08:33 -0700 (PDT)
In-Reply-To: <aspuhe9olbljlpkcudf6on38vsl2i45vb3@4ax.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=219.76.25.98; posting-account=bv9fUwoAAAALZPMyH_uNDx4MtNzAsvy6
NNTP-Posting-Host: 219.76.25.98
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com> <aspuhe9olbljlpkcudf6on38vsl2i45vb3@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <137186dc-ea3f-4b3b-9e2d-ba010fc66420@googlegroups.com>
Subject: Re: what is the greatest executable format in your point of view
From: mcheun...@gmail.com (Peter Cheung)
Injection-Date: Sun, 07 Jul 2019 08:08:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 41
View all headers
robert...@yahoo.com於 2019年7月5日星期五 UTC+8下午11時12分23秒寫道:
On Wed, 3 Jul 2019 09:11:59 -0700 (PDT), Peter Cheung
<mcheung63@gmail.com> wrote:

Is it elf? pe? coff?
thx


There are things I'd change about all of them.  The being said, ELF is
the most modern one in widespread use, with PE, a variation on COFF
probably being the second place choice.  Note that both ELF and
PE/COFF are both object *and* executable file formas.

If you adopt a well known, and widely used, format, you decouple the
development of the various parts of your system.  You can write and
test code for the new system with existing compilers, or test your new
compilers on existing systems.

So the question is really what platform are you planning to host your
development work on?  If it's *nix, go with ELF, if it's Windows, use
PE.

For ELF, i feel comfortable, i did created a java library to parse the ELF file, not hard. One biggest thing i dislike is : DWARF debug format, it use a mechanism call "state machine" to encode all information, if you decoded one byte wrongly, all the later bytes will be decoded wrongly. And DWARF standard is quite large and sometime hard to understand.

Since i want to create my executable/linker format, below are the points we can pursue, pls extend the list if i miss something:

1. parsing speed, i think this is not important, since cpu is fast, parsing/decoding the file format, it is no difference if it takes 0.1 sec or 0.01 sec
2. small memory footprint of the parser, this also not important in my point of view, even mobile phone has few GB ram now
3. easy to understand and extend by other programmers, this is very important in my point of view

So, i am thinking to create a executable format in XML base. Is it stupid?


Subject: Re: what is the greatest executable format in your point of view
From: Rick C. Hodgin
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 08:45 UTC
References: 1 2 3
X-Received: by 2002:ac8:21f2:: with SMTP id 47mr9490331qtz.38.1562489106759;
Sun, 07 Jul 2019 01:45:06 -0700 (PDT)
X-Received: by 2002:a0d:e18a:: with SMTP id k132mr7357878ywe.240.1562489106477;
Sun, 07 Jul 2019 01:45:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!m24no2877737qtm.0!news-out.google.com!g23ni564qtq.1!nntp.google.com!m24no2877731qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 01:45:06 -0700 (PDT)
In-Reply-To: <137186dc-ea3f-4b3b-9e2d-ba010fc66420@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:800:c002:abc2:133:ec19:591e:dbf8;
posting-account=BcpLkAoAAACbVwkzAAKP0XXOd-MDREpp
NNTP-Posting-Host: 2601:800:c002:abc2:133:ec19:591e:dbf8
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
<aspuhe9olbljlpkcudf6on38vsl2i45vb3@4ax.com> <137186dc-ea3f-4b3b-9e2d-ba010fc66420@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <94c77af9-78e3-46f3-b44e-da9c4f2ac905@googlegroups.com>
Subject: Re: what is the greatest executable format in your point of view
From: rick.c.h...@gmail.com (Rick C. Hodgin)
Injection-Date: Sun, 07 Jul 2019 08:45:06 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 35
View all headers
On Sunday, July 7, 2019 at 4:08:34 AM UTC-4, Peter Cheung wrote:
Since i want to create my executable/linker format, below are the points we can pursue, pls extend the list if i miss something:

1. parsing speed, i think this is not important, since cpu is fast, parsing/decoding the file format, it is no difference if it takes 0.1 sec or 0.01 sec
2. small memory footprint of the parser, this also not important in my point of view, even mobile phone has few GB ram now

Agree with 1, 2.

3. easy to understatnd and extend by other programmers, this is very important in my point of view

3 is most important.

So, i am thinking to create a executable format in XML base. Is it stupid?

I think XML is not the best solution.  Standard block format
with ID or TYPE, which is an integer code instead of a tag name,
and then custom structures inside.

In C code:

    struct SBlock
    {
        uint32_t  length;
        uint16_t  type;

        /* Variable data of length-2 bytes here */
    };

Repeat that block for all parts of executable.  Use binary data
for some parts, additional struct data for others, maybe XML for
some parts.

I personally believe in binary + struct data for all parts.

--
Rick C. Hodgin


Subject: Re: what is the greatest executable format in your point of view
From: Peter Cheung
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 16:55 UTC
References: 1 2 3 4
X-Received: by 2002:a37:7cf:: with SMTP id 198mr11162415qkh.450.1562518509247;
Sun, 07 Jul 2019 09:55:09 -0700 (PDT)
X-Received: by 2002:a0d:d68a:: with SMTP id y132mr8388890ywd.187.1562518508760;
Sun, 07 Jul 2019 09:55:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!m24no3956741qtm.0!news-out.google.com!g23ni602qtq.1!nntp.google.com!m24no3956735qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sun, 7 Jul 2019 09:55:08 -0700 (PDT)
In-Reply-To: <94c77af9-78e3-46f3-b44e-da9c4f2ac905@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.202.209.162;
posting-account=bv9fUwoAAAALZPMyH_uNDx4MtNzAsvy6
NNTP-Posting-Host: 123.202.209.162
References: <90a0aa4f-c989-4f68-9c44-fc11ad5c2296@googlegroups.com>
<aspuhe9olbljlpkcudf6on38vsl2i45vb3@4ax.com> <137186dc-ea3f-4b3b-9e2d-ba010fc66420@googlegroups.com>
<94c77af9-78e3-46f3-b44e-da9c4f2ac905@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cda063f9-df7d-4978-9fa3-ee374acff8e0@googlegroups.com>
Subject: Re: what is the greatest executable format in your point of view
From: mcheun...@gmail.com (Peter Cheung)
Injection-Date: Sun, 07 Jul 2019 16:55:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Rick C. Hodgin於 2019年7月7日星期日 UTC+8下午4時45分07秒寫道:
On Sunday, July 7, 2019 at 4:08:34 AM UTC-4, Peter Cheung wrote:
Since i want to create my executable/linker format, below are the points we can pursue, pls extend the list if i miss something:

1. parsing speed, i think this is not important, since cpu is fast, parsing/decoding the file format, it is no difference if it takes 0.1 sec or 0..01 sec
2. small memory footprint of the parser, this also not important in my point of view, even mobile phone has few GB ram now

Agree with 1, 2.

3. easy to understatnd and extend by other programmers, this is very important in my point of view

3 is most important.

So, i am thinking to create a executable format in XML base. Is it stupid?

I think XML is not the best solution.  Standard block format
with ID or TYPE, which is an integer code instead of a tag name,
and then custom structures inside.

In C code:

    struct SBlock
    {
        uint32_t  length;
        uint16_t  type;

        /* Variable data of length-2 bytes here */
    };

Repeat that block for all parts of executable.  Use binary data
for some parts, additional struct data for others, maybe XML for
some parts.

I personally believe in binary + struct data for all parts.

--
Rick C. Hodgin

Seems good, thx


1
rocksolid light 0.7.2
clearneti2ptor