code coherency

Hi,

I would like to verify periodically the coherency of my code. My
hardware don’t have a memory protected by parity or ECC.

The solution I use with QNX4 is the following:

  • I compute a checksum of the code on the executable file products by
    the watcom linker.
  • I use a another process on the target to verify periodically the
    computed checksum, this process use the physical address of the code to
    do that.
    QNX4 provides functions to access the process informations ( to get
    the different segments used by a process ).

And now I would like to do the same thing with NTO and ELF executable
file.
Does QNX6 provide some functions to do that ? ( get the physical address
of the different sections of an ELF executable file … )


thanks
Phil.

pe <pelskens@tecatom.fr> wrote:

Hi,

I would like to verify periodically the coherency of my code. My
hardware don’t have a memory protected by parity or ECC.

The solution I use with QNX4 is the following:

  • I compute a checksum of the code on the executable file products by
    the watcom linker.
  • I use a another process on the target to verify periodically the
    computed checksum, this process use the physical address of the code to
    do that.
    QNX4 provides functions to access the process informations ( to get
    the different segments used by a process ).

And now I would like to do the same thing with NTO and ELF executable
file.
Does QNX6 provide some functions to do that ? ( get the physical address
of the different sections of an ELF executable file … )

Checkout the ELF standard
(http://staff.qnx.com/~cburgess/freestuff/elf.pdf) and /usr/include/sys/elf*.h
You should be able to read the load information from the elf header.


cburgess@qnx.com