COFF

I though QNX4 format was COFF, but after looking up the COFF standard on the
web it seems the QNX4 format is not “standard”. Is there anywhere I could
find the specs of the QNX4 executable format as well as the format of the
…sym file generated by the watcom linker.

  • Mario

I was hoping that someone would answer this, because I have been
looking for the executable format also. The short, unsatisfactory
answer is the executable (“load module”) format is defined in the
header file lmf.h, but understanding how the members of the structure
are used is not always clear.

Bill Ghrist

“ghristwd” <ghristwd@westinghouse-dot-com.no-spam.invalid> wrote in message
news:d4te9k$jv5$1@inn.qnx.com

I was hoping that someone would answer this, because I have been
looking for the executable format also. The short, unsatisfactory
answer is the executable (“load module”) format is defined in the
header file lmf.h, but understanding how the members of the structure
are used is not always clear.

lmf.h, didn’t know about that, interesting. That’s a good start for me,
thanks

Bill Ghrist

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:d4tg2v$lej$1@inn.qnx.com

“ghristwd” <> ghristwd@westinghouse-dot-com.no-spam.invalid> > wrote in
message news:d4te9k$jv5$> 1@inn.qnx.com> …
I was hoping that someone would answer this, because I have been
looking for the executable format also. The short, unsatisfactory
answer is the executable (“load module”) format is defined in the
header file lmf.h, but understanding how the members of the structure
are used is not always clear.

lmf.h, didn’t know about that, interesting. That’s a good start for me,
thanks

I wrote a little program to parse it based on lmf.h but if the executable
was compile
with -g1 or -g2, after the LMF_EOF_REC things don’t make sense. The block
after EOF is of type 0x43 with a lenght of 7, and it gets worst after that.
I was expecit a COMMENT record or something along these lines.

Bill Ghrist

In article <d4tiht$nho$1@inn.qnx.com>,
Mario Charest postmaster@127.0.0.1 wrote:

I wrote a little program to parse it based on lmf.h but if the executable
was compile
with -g1 or -g2, after the LMF_EOF_REC things don’t make sense. The block
after EOF is of type 0x43 with a lenght of 7, and it gets worst after that.
I was expecit a COMMENT record or something along these lines.

The LMF_EOF_REC marks the end of the loader’s interest in the file.
Everything afterwards is essentially one big comment. In this case,
it’s the Watcom debugging information, which is the same no matter what
the executable format is - there’s a trailer at the end of the
file that told the debugger how big the information was so it knows
how far backwards it has to seek to find the start of the info.


Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

“Brian Stecher” <bstecher@qnx.com> wrote in message
news:d55ag5$atd$1@inn.qnx.com

In article <d4tiht$nho$> 1@inn.qnx.com> >,
Mario Charest postmaster@127.0.0.1 wrote:
I was expecit a COMMENT record or something along these lines.

The LMF_EOF_REC marks the end of the loader’s interest in the file.
Everything afterwards is essentially one big comment. In this case,
it’s the Watcom debugging information, which is the same no matter what
the executable format is - there’s a trailer at the end of the
file that told the debugger how big the information was so it knows
how far backwards it has to seek to find the start of the info.

In case you care: if you have PhAB resources in the file, too, they’re saved
in a _LMF_PHRESOURCE record immediately following the _LMF_EOF_REC record.