Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

own linking format

19 views
Skip to first unread message

Prroffessorr Fir Kenobi

unread,
Nov 18, 2016, 12:19:47 PM11/18/16
to
i consider making my own linking format (equivalent for .o/obj )

i think it would be cleaner to work on my own improved one then
making the converter for windows ones

i am not asking if this is good idea becouse i think nearly everybody will say this is bad idea - making yet another .obj format :: but it has an adventage my ovn may be clearer and it could be more pleasurable to work on it (finally
after making it all i could eventually get rid of it)

the question is how it should look like, as i said in another thread
i could use some easy convention to deniote blocks in file, 32 bit would be 4 ascii characters for making block signature then next 32 bit would be its
size, like

'head', 200, {192 bytes of header block}
'text', 3000, {2992 bytes of function bodies}
'data', 400, {392 bytes of preinitialised data}
'bss ', 100, {92 bytes of static empty arrays descriptions* }

'relo', 700, {692 bytes of relocation data} //??
'expo', 200, {192 bytes of export data} //??
'impo', 200, {192 bytes of import data} // ??

* im not quite sure how linkers store it, as an array of consecyutive
sizes, like {40000, 10000, 1000000} - it would mean 3 static arrays of
given sizes?

the question is what is absolutely needed and what can be skipped to make this format totally defined but much clear,

i would like to produce this as my own c2 compiler/a2 assembler
output (which will be in a role od static .o module which then by my
other tool would be converted for mingw compatible .o (32 bit, win mainly
designed to be linked with winapi environment)

some thoughts?

those 'relo','expo', and 'impo' parts are most obscure by now to me
(i must need to know what exactly putt there and how - some vision?)

i will think and read on this but some side hints could be helpfull maybe

Scott Lurndal

unread,
Nov 18, 2016, 12:55:27 PM11/18/16
to
Prroffessorr Fir Kenobi <profes...@gmail.com> writes:
>i consider making my own linking format (equivalent for .o/obj )
>
>i think it would be cleaner to work on my own improved one then
>making the converter for windows ones

Don't reinvent the wheel.

https://en.wikipedia.org/wiki/Executable_and_Linkable_Format

Paavo Helde

unread,
Nov 18, 2016, 6:34:43 PM11/18/16
to
On 18.11.2016 19:19, Prroffessorr Fir Kenobi wrote:
> i consider making my own linking format (equivalent for .o/obj )
>
> i think it would be cleaner to work on my own improved one then
> making the converter for windows ones
>
> i am not asking if this is good idea becouse i think nearly everybody will say this is bad idea - making yet another .obj format :: but it has an adventage my ovn may be clearer and it could be more pleasurable to work on it (finally
> after making it all i could eventually get rid of it)
>
> the question is how it should look like, as i said in another thread
> i could use some easy convention to deniote blocks in file, 32 bit would be 4 ascii characters for making block signature then next 32 bit would be its
> size, like

If you are making a new binary format today, then it should fully
support 64-bit. There is no reason to limit sizes to 32 bits.

0 new messages