Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

QNX Executable format

瀏覽次數:111 次
跳到第一則未讀訊息

karthick...@gmail.com

未讀,
2018年12月20日 上午10:10:242018/12/20
收件者:
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日 下午1:13:222018/12/20
收件者:
On Thu, 20 Dec 2018 07:10:24 -0800 (PST), karthick...@gmail.com
wrote:
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."

nospa...@efbe.prima.de

未讀,
2018年12月20日 下午1:33:442018/12/20
收件者:
Am 20.12.18 um 16:10 schrieb karthick...@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
Frank

karthick...@gmail.com

未讀,
2018年12月20日 晚上8:37:512018/12/20
收件者:
On Thursday, December 20, 2018 at 11:43:22 PM UTC+5:30, Paul S Person wrote:
> On Thu, 20 Dec 2018 07:10:24 -0800 (PST), Karthick Gururaj wrote:
>
> >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.

karthick...@gmail.com

未讀,
2018年12月20日 晚上8:39:362018/12/20
收件者:
On Friday, December 21, 2018 at 12:03:44 AM UTC+5:30, nospa...@efbe.prima.de wrote:
> Am 20.12.18 um 16:10 schrieb Karthick Gururaj:
> > 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日 中午12:20:312018/12/21
收件者:
On Fri, 21 Dec 2018 01:39:35 UTC, karthick...@gmail.com wrote:

Hi,

> 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 <ste...@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------

Steven Levine

未讀,
2018年12月21日 中午12:28:492018/12/21
收件者:
On Fri, 21 Dec 2018 01:39:35 UTC, karthick...@gmail.com wrote:

Hi,

> 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.

Paul S Person

未讀,
2018年12月21日 中午12:37:272018/12/21
收件者:
On Fri, 21 Dec 2018 17:27:21 +0000 (UTC), "Steven Levine"
<ste...@nomail.earthlink.net> wrote:

>On Fri, 21 Dec 2018 01:39:35 UTC, karthick...@gmail.com wrote:
>
>Hi,
>
>> 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.
>

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!

Paul S Person

未讀,
2018年12月21日 中午12:46:462018/12/21
收件者:
On Thu, 20 Dec 2018 17:37:49 -0800 (PST), karthick...@gmail.com
wrote:
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.

kart...@vayavyalabs.com

未讀,
2018年12月24日 凌晨2:56:042018/12/24
收件者:
On Friday, December 21, 2018 at 10:50:31 PM UTC+5:30, Steven Levine wrote:
> On Fri, 21 Dec 2018 01:39:35 UTC, Karthick Gururaj wrote:
>
> Hi,
>
> > 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.

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.

kart...@vayavyalabs.com

未讀,
2018年12月24日 凌晨3:03:102018/12/24
收件者:
On Friday, December 21, 2018 at 10:58:49 PM UTC+5:30, Steven Levine wrote:
> On Fri, 21 Dec 2018 01:39:35 UTC, Karthick Gururaj wrote:
>
> Hi,
>
> > Thanks! wdump is useful. Still looking at all the options.
>
> What version of QNX are you targeting?
QNX 4.25

>
> 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.
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.
0 則新訊息