Where can I find a description of the File Format used in QNX 4.25
executables?
Thanks,
Federico de Ceballos
Where can I find a description of the File Format used in QNX 4.25
executables?
Thanks,
Federico de Ceballos
Federico de Ceballos <federico.ceballos@unican.es> wrote:
Where can I find a description of the File Format used in QNX 4.25
executables?
Take a look at /usr/include/sys/lmf.h
What are you trying to accomplish? Depending on what it is,
I might be able to make more useful suggestions.
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
David Gibbs <dagibbs@qnx.com> wrote:
Where can I find a description of the File Format used in QNX 4.25
executables?Take a look at /usr/include/sys/lmf.h
Thanks for the pointer. The info is not very comprehensive but enough
for disassembling some sample files.
What are you trying to accomplish? Depending on what it is,
I might be able to make more useful suggestions.
I’m in the process of evaluating the suitability of QNX 4.24 for a
project and validating some third-party software. The target is a
RTP6800 system and I am working in a PC with Win2000 and QNX 6.1.
At the same time I’m thinking about writing a simple cross-compiler. To
do this I would need some information about:
Regards,
Federico de Ceballos
Federico de Ceballos <federico.ceballos@unican.es> wrote:
David Gibbs <> dagibbs@qnx.com> > wrote:
Where can I find a description of the File Format used in QNX 4.25
executables?Take a look at /usr/include/sys/lmf.h
Thanks for the pointer. The info is not very comprehensive but enough
for disassembling some sample files.
Yup, it is somewhat terse. Their is probably better info somewhere,
I’m just not exactly sure where to find it.
What are you trying to accomplish? Depending on what it is,
I might be able to make more useful suggestions.I’m in the process of evaluating the suitability of QNX 4.24 for a
project and validating some third-party software. The target is a
RTP6800 system and I am working in a PC with Win2000 and QNX 6.1.At the same time I’m thinking about writing a simple cross-compiler. To
do this I would need some information about:
- the information the system passes to a program when it starts.
- the codes and parameters of the system services available.
Hm… have you looked at Jean-Claude Michot’s port of gcc to build
QNX4 executables? Take a look at ww.teaser.fr/~jcmichot – that might
be a useful leg-up on building QNX4 executables from QNX6.
But, why are you looking at X-development from QNX6, rather than native
development under QNX4? It seems likely that the cost in time & energy
of setting up the X-development system will be greater than the cost of
a QNX4 dev seat.
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
David Gibbs <dagibbs@qnx.com> wrote:
At the same time I’m thinking about writing a simple cross-compiler.
To do this I would need some information about:
- the information the system passes to a program when it starts.
- the codes and parameters of the system services available.
Hm… have you looked at Jean-Claude Michot’s port of gcc to build
QNX4 executables? Take a look at ww.teaser.fr/~jcmichot – that might
be a useful leg-up on building QNX4 executables from QNX6.
As I see it, Jean-Claude Michot’s port uses parts from Watcom 10.6.
But, why are you looking at X-development from QNX6, rather than native
development under QNX4? It seems likely that the cost in time & energy
of setting up the X-development system will be greater than the cost of
a QNX4 dev seat.
It is not only the cost of the dev seat. If I used Watcom I would have to
rewrite the application in C. At this stage I would like to know whether
other options are open.
I already have the front-end and the code generation part. All I need is
the calling protocol to the OS. I believe this kind if information must
be available somewhere and that it cannot be more than a few pages long.
Thanks,
Federico de Ceballos
Federico de Ceballos <federico.ceballos@unican.es> wrote:
David Gibbs <> dagibbs@qnx.com> > wrote:
At the same time I’m thinking about writing a simple cross-compiler.
To do this I would need some information about:
- the information the system passes to a program when it starts.
- the codes and parameters of the system services available.
Hm… have you looked at Jean-Claude Michot’s port of gcc to build
QNX4 executables? Take a look at ww.teaser.fr/~jcmichot – that might
be a useful leg-up on building QNX4 executables from QNX6.As I see it, Jean-Claude Michot’s port uses parts from Watcom 10.6.
My understanding is that his stuff uses the system libraries from
the Watcom 10.6 distribution. He does all the compilation of the
code & the liking himself, but has generated his own system libraries.
But, why are you looking at X-development from QNX6, rather than native
development under QNX4? It seems likely that the cost in time & energy
of setting up the X-development system will be greater than the cost of
a QNX4 dev seat.It is not only the cost of the dev seat. If I used Watcom I would have to
rewrite the application in C. At this stage I would like to know whether
other options are open.
Ah, ok… hadn’t realized it was a non-C application. (I assume also
not C++.)
I already have the front-end and the code generation part. All I need is
the calling protocol to the OS. I believe this kind if information must
be available somewhere and that it cannot be more than a few pages long.
I’m not sure what you mean by the “calling protocol to the OS”. The kernel
has a (fairly small) set of kernel calls defined, I think <sys/kernel.h>
and <sys/wcc_kernel.h> should give you those, kernel.h defines them,
wcc_kernel.h gives the inline assembly to implement them. But, that
just gives you the kernel interface – QNX is a micro-kernel based
message-passing OS, so much of what might be a kernel interface elsewhere
is a message under QNX – e.g. write() builds a message and sends it
[Sendfd()] to the appropriate manner.
Depending on how complete a use of OS resources you need to make, figuing
out & generating all these messages from scratch would be a pain.
I think you’d probably be better to figure out how to call into the
various C libraries from your program in order to do that work.
You’d probably have to write/compose local language callable functions
that do some inline assembly to call into the library – but I don’t
know for sure. I’ve never actually tried to do that sort of thing.
Something that may help, though, is to realize that by default Watcom
passes parameters to routines using registers rather than on the stack –
this is a bit unusual, but all the normal system library routines expect
this behaviour. There is a set of stack-based calling convention libraries
also available (look for libname3s.lib in /usr/lib to find them) that would
probably be easier for you to setup to call into than the register based
ones.
Again, jcmichot’s port of the GNU compiler to QNX4 might be helpful as
a reference. Or, in fact, dropping him an email yourself and asking
him might also work.
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
David Gibbs" <dagibbs@qnx.com> wrote:
I’m not sure what you mean by the “calling protocol to the OS”. The
kernel
has a (fairly small) set of kernel calls defined, I think <sys/kernel.h
and <sys/wcc_kernel.h> should give you those, kernel.h defines them,
wcc_kernel.h gives the inline assembly to implement them. But, that
just gives you the kernel interface – QNX is a micro-kernel based
message-passing OS, so much of what might be a kernel interface elsewhere
is a message under QNX – e.g. write() builds a message and sends it
[Sendfd()] to the appropriate manner.
I wonder if you could send me a copy of those two include files.
Depending on how complete a use of OS resources you need to make, figuing
out & generating all these messages from scratch would be a pain.Again, jcmichot’s port of the GNU compiler to QNX4 might be helpful as
a reference. Or, in fact, dropping him an email yourself and asking
him might also work.
I’ll take a closer look at JC Michot’s work.
Thanks,
Federico de Ceballos
Federico de Ceballos <federico.ceballos@unican.es> wrote:
David Gibbs" <> dagibbs@qnx.com> > wrote:
I’m not sure what you mean by the “calling protocol to the OS”. The
kernel
has a (fairly small) set of kernel calls defined, I think <sys/kernel.h
and <sys/wcc_kernel.h> should give you those, kernel.h defines them,
wcc_kernel.h gives the inline assembly to implement them. But, that
just gives you the kernel interface – QNX is a micro-kernel based
message-passing OS, so much of what might be a kernel interface elsewhere
is a message under QNX – e.g. write() builds a message and sends it
[Sendfd()] to the appropriate manner.I wonder if you could send me a copy of those two include files.
If you have a QNX4 development system, they should be included as part
of it. If you don’t, I don’t think I’m supposed to distribute them.
Here are a couple of excerpts for illustration purposes though:
<sys/kernel.h>
#define Sendmx( a,b,c,d,e ) __sendmx( a,b,c,d,e )
extern int __sendmx(
int __pid,
unsigned __smsg_xparts,
unsigned __rmsg_xparts,
const struct _mxfer_entry *__smsg,
const struct _mxfer_entry *__rmsg );
<sys/wcc_kernel.h>
#pragma aux __sendmx =
“mov al,00h”
“clc”
“int 0f2h”
“jnc l1”
“call __kererr”
“l1:”
__parm [edx] [ah] [ch] [ebx] [esi]
__modify __exact [eax]
__value [eax]
;
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
David Gibbs <dagibbs@qnx.com> wrote:
Federico de Ceballos <> federico.ceballos@unican.es> > wrote:
Where can I find a description of the File Format used in QNX 4.25
executables?Take a look at /usr/include/sys/lmf.h
What are you trying to accomplish? Depending on what it is,
I might be able to make more useful suggestions.
I have a followup question, any QNX4 programs out there that will
give a record by record hex dump of an executable, source would
be a bonus. I tried playing with wdisasm, but
[thomas@node3]> wdisasm CrcGen -e
Out of Memory
We are forzen at 4.25 patch B.
TIA,
Tom