Discussion:
QNX Executable format
(too old to reply)
k***@gmail.com
2018-12-20 15:10:24 UTC
Permalink
Hello folks,

I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.

The binary doesn't seem to have an ELF header (I don't see an "ELF" magic bytes in header). I'm hoping someone here can point me to documentation/specification that I can use to understand the format.

I inspected 3 different executables and the first 64 bytes are as follows (question marks indicate the bytes that differ between the 3 executables):

00000000: 0000 3800 0000 9001 1600 8201 0000 0000 ..8.............
00000010: 0100 0100 0100 0000 0000 0000 0000 ???? ..............??
00000020: 0000 0080 0000 0010 0000 00a0 0000 0000 ................
00000030: 0000 0000 0000 ???? 0020 ???? 0000 ???? ......??. ??..??

The linker map file for the simple C program has the following:
WATCOM Linker Version 10.6
Copyright by WATCOM International Corp. 1985, 1996. All rights reserved.
Created on: 00/10/13 16:27:51
Executable Image: test.x
creating a QNX 386 executable

But googling for "QNX executable format" or "QNX 386 executable" didn't get me any relevant hits.

Any help/hints much appreciated!

Thanks
Karthick
Paul S Person
2018-12-20 18:13:16 UTC
Permalink
Post by k***@gmail.com
Hello folks,
I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.
The binary doesn't seem to have an ELF header (I don't see an "ELF" magic bytes in header). I'm hoping someone here can point me to documentation/specification that I can use to understand the format.
00000000: 0000 3800 0000 9001 1600 8201 0000 0000 ..8.............
00000010: 0100 0100 0100 0000 0000 0000 0000 ???? ..............??
00000020: 0000 0080 0000 0010 0000 00a0 0000 0000 ................
00000030: 0000 0000 0000 ???? 0020 ???? 0000 ???? ......??. ??..??
WATCOM Linker Version 10.6
Copyright by WATCOM International Corp. 1985, 1996. All rights reserved.
Created on: 00/10/13 16:27:51
Executable Image: test.x
creating a QNX 386 executable
But googling for "QNX executable format" or "QNX 386 executable" didn't get me any relevant hits.
Any help/hints much appreciated!
There used to be a "clibqnx" document (that would, presumably, be
"Open Watcom C Library for QNX" were it ever built). My records
indicate that it would build if anyone cared to try.

There may be licensing issues. The Japanese docs cannot be build
because of missing files, presumably proprietary files that could not
be provided when OW went public domain.

Googling "qnx" itself appears to bring up a home page, although
whether that is the same "qnx" as we have here is unknown.

My Watcom CDs do not appear to have it, but it might be hiding
somewhere, who can say?
--
"I begin to envy Petronius."
"I have envied him long since."
k***@gmail.com
2018-12-21 01:37:49 UTC
Permalink
Post by Paul S Person
Post by k***@gmail.com
Hello folks,
I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.
The binary doesn't seem to have an ELF header (I don't see an "ELF" magic bytes in header). I'm hoping someone here can point me to documentation/specification that I can use to understand the format.
[snip]
There used to be a "clibqnx" document (that would, presumably, be
"Open Watcom C Library for QNX" were it ever built). My records
indicate that it would build if anyone cared to try.
[snip]
Thanks for that reference!

Googling clibqnx got me to the document: http://watcom.markoverholser.com/manuals/1.5/clibqnx.pdf but that itself wasn't very helpful. Then I started checking other documents under http://watcom.markoverholser.com/manuals/1.5/ and found the cguide.pdf that has info useful information. The parent URL also has a "current" version that is still timestamped 2008 - I'll check those as well.
Paul S Person
2018-12-21 17:46:39 UTC
Permalink
Post by k***@gmail.com
Post by Paul S Person
Post by k***@gmail.com
Hello folks,
I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.
The binary doesn't seem to have an ELF header (I don't see an "ELF" magic bytes in header). I'm hoping someone here can point me to documentation/specification that I can use to understand the format.
[snip]
There used to be a "clibqnx" document (that would, presumably, be
"Open Watcom C Library for QNX" were it ever built). My records
indicate that it would build if anyone cared to try.
[snip]
Thanks for that reference!
Googling clibqnx got me to the document: http://watcom.markoverholser.com/manuals/1.5/clibqnx.pdf but that itself wasn't very helpful. Then I started checking other documents under http://watcom.markoverholser.com/manuals/1.5/ and found the cguide.pdf that has info useful information. The parent URL also has a "current" version that is still timestamped 2008 - I'll check those as well.
The current User's Guide does include "QNX" as a value for option -bt,
and indicates a predefined macro __QNX__ (which, along with __UNIX__,
is defined for QNX targets). The definition of __UNIX__ might say
something about the executable format; or it might not, I certainly
wouldn't know.
--
"I begin to envy Petronius."
"I have envied him long since."
n***@efbe.prima.de
2018-12-20 18:33:42 UTC
Permalink
Post by k***@gmail.com
Hello folks,
I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.
You could try the wdump utility. At least it mentions QNX

E:\own\binp\wdump.exe
Open Watcom Executable Image Dump Utility Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.

Usage: wdump [-?abdefipqrsx] [-A<num>] [-B<off>] [-D<opt>] [-S<num>] <file>
<file> is a DOS EXE file, a Windows or OS/2 executable or DLL,
a PharLap executable, NLM, a QNX executable,
an ELF executable, shared library or object file,
or a COFF object.
options:
-a causes all segment, resource and fixup info to be dumped
-A<segnum> like -a but only applies to segment <segnum>
-b causes binary dump of the entire file
-B<hexoff> causes binary dump beginning at offset in hex
-d causes debugging information to be dumped
-D<opts> controls debugging information to be dumped
a : show addr infomation
g : show global infomation
l : show locals (only if m specified)
m : show module informatiom
n : show line numbers (only if m specified)
t : show types (only if m specified)
x : show all information
-e causes executable information to be dumped as well
-f causes fixup information to be dumped
-i dump export information for PE DLLs
-p causes LE/LX page map to be dumped
-q quiet dump - don't write banner
-r causes more resource information to be dumped
-s causes segments' data to be dumped
-S<segnum> like -s but only applies to segment <segnum>
-x dump export information for NE/LX DLLs in .DEF format
Post by k***@gmail.com
The binary doesn't seem to have an ELF header (I don't see an "ELF" magic bytes in header). I'm hoping someone here can point me to documentation/specification that I can use to understand the format.
00000000: 0000 3800 0000 9001 1600 8201 0000 0000 ..8.............
00000010: 0100 0100 0100 0000 0000 0000 0000 ???? ..............??
00000020: 0000 0080 0000 0010 0000 00a0 0000 0000 ................
00000030: 0000 0000 0000 ???? 0020 ???? 0000 ???? ......??. ??..??
WATCOM Linker Version 10.6
Copyright by WATCOM International Corp. 1985, 1996. All rights reserved.
Created on: 00/10/13 16:27:51
Executable Image: test.x
creating a QNX 386 executable
But googling for "QNX executable format" or "QNX 386 executable" didn't get me any relevant hits.
Any help/hints much appreciated!
Thanks
Karthick
Frank
k***@gmail.com
2018-12-21 01:39:35 UTC
Permalink
Post by n***@efbe.prima.de
Post by k***@gmail.com
Hello folks,
I'm trying to decode a binary built with WATCOM Linker 10.6 for QNX 4.
You could try the wdump utility. At least it mentions QNX
E:\own\binp\wdump.exe
Open Watcom Executable Image Dump Utility Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
[snip]
Thanks! wdump is useful. Still looking at all the options.
Steven Levine
2018-12-21 17:19:03 UTC
Permalink
On Fri, 21 Dec 2018 01:39:35 UTC, ***@gmail.com wrote:

Hi,
Post by k***@gmail.com
Thanks! wdump is useful. Still looking at all the options.
Have you looked at:

bld\watcom\h\exeqnx.h

in the sources?

A quick browse of the source tree seems to indicate that most of the
QNX support is still in place.

Steven
--
---------------------------------------------------------------------
Steven Levine <***@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------
k***@vayavyalabs.com
2018-12-24 07:56:03 UTC
Permalink
Post by Steven Levine
Hi,
Post by k***@gmail.com
Thanks! wdump is useful. Still looking at all the options.
bld\watcom\h\exeqnx.h
in the sources?
A quick browse of the source tree seems to indicate that most of the
QNX support is still in place.
Thanks! Looking at the format in exeqnx.h, along with wdump source for QNX (bld\exedump\c\qnxexe.c) which includes the exeqnx.h gave me the required information.
Steven Levine
2018-12-21 17:27:21 UTC
Permalink
On Fri, 21 Dec 2018 01:39:35 UTC, ***@gmail.com wrote:

Hi,
Post by k***@gmail.com
Thanks! wdump is useful. Still looking at all the options.
What version of QNX are you targeting?

Bouncing around finds:


http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/sys_arch/dll.html

which mentions QNX ELF format executables. More details may be
available in other archived docs. This page is circa 2006 which IIRC
is similar in age to 10.6.

Steven
--
---------------------------------------------------------------------
Steven Levine <***@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------
Paul S Person
2018-12-21 17:37:21 UTC
Permalink
On Fri, 21 Dec 2018 17:27:21 +0000 (UTC), "Steven Levine"
Post by Steven Levine
Hi,
Post by k***@gmail.com
Thanks! wdump is useful. Still looking at all the options.
What version of QNX are you targeting?
http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/sys_arch/dll.html
which mentions QNX ELF format executables. More details may be
available in other archived docs. This page is circa 2006 which IIRC
is similar in age to 10.6.
Sadly, my records indicate I purchased/upgraded to:
Watcom 10.5 Dec 95
Watcom 10.6 Apr 96
Watcom 11.0 Mar 97
Watcom 11.0 Apr 98
Watcom 11.0 Jun 98
The last two are, presumably 11.0a and 11.0b (at least, I have two
CD-ROMs labled that way).

But the article may still be relevant!
--
"I begin to envy Petronius."
"I have envied him long since."
k***@vayavyalabs.com
2018-12-24 08:03:09 UTC
Permalink
Post by Steven Levine
Hi,
Post by k***@gmail.com
Thanks! wdump is useful. Still looking at all the options.
What version of QNX are you targeting?
QNX 4.25
Post by Steven Levine
http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/sys_arch/dll.html
which mentions QNX ELF format executables. More details may be
available in other archived docs. This page is circa 2006 which IIRC
is similar in age to 10.6.
Yes - I had seen that page earlier. While useful, it was firstly for QNX 6.3. Secondly, the file I have is in "QNX executable format" and not ELF.
Loading...