3.0.22

From Msim

(Difference between revisions)
Jump to: navigation, search
(Created page with "=== osf_sys_lseek === osf_sys_lseek does not return -1 when called on stdin, stdout or stderr on Tru64. Empirically, it appears to output the total number of characters printed f...")
m (moved 3.0.21 to 3.0.22: Interrupted version)
 
(One intermediate revision not shown)
Line 1: Line 1:
 +
== Trusted Platform Module ==
 +
Support for TPMs has been added. It is not set up by default. See the tpmsim website for details. Basic setup is as follows:
 +
Define TPM_THREAD in sim.h, sim-outorder.c, tpm.h and syscall.c
 +
Add "-lpthread" to OFLAGS in Makefile
 +
This only enables the code, other resources are needed.
 +
 +
 +
== elf loader ==
 +
Very basic elf loader support available. Does not handle dynamic libraries (No AUXV support yet).
 +
 +
== Signal Handling ==
 +
Some provisions for signal handling are available. They are disabled by default since they can permit the simulator to ignore various signals.
 +
=== osf_sys_lseek ===
=== osf_sys_lseek ===
osf_sys_lseek does not return -1 when called on stdin, stdout or stderr on Tru64. Empirically, it appears to output the total number of characters printed for the current session.<br>
osf_sys_lseek does not return -1 when called on stdin, stdout or stderr on Tru64. Empirically, it appears to output the total number of characters printed for the current session.<br>

Latest revision as of 17:23, 18 January 2016

Contents

Trusted Platform Module

Support for TPMs has been added. It is not set up by default. See the tpmsim website for details. Basic setup is as follows:

Define TPM_THREAD in sim.h, sim-outorder.c, tpm.h and syscall.c
Add "-lpthread" to OFLAGS in Makefile

This only enables the code, other resources are needed.


elf loader

Very basic elf loader support available. Does not handle dynamic libraries (No AUXV support yet).

Signal Handling

Some provisions for signal handling are available. They are disabled by default since they can permit the simulator to ignore various signals.

osf_sys_lseek

osf_sys_lseek does not return -1 when called on stdin, stdout or stderr on Tru64. Empirically, it appears to output the total number of characters printed for the current session.

#include <sys/types.h>
#include <unistd.h>
#include <iostream>

int main()
{
       cout << "Weeee!" << endl;
       for(int i=0;i<10;i++)
       {
               off_t sval = lseek(i,0,1);
               cout << i << ":  " << sval << endl;
       }
       return 0;
}

On a new session:

jloew@tru64:~/syscall$ ./a.out
Weeee!
0:  722
1:  730
2:  738
3:  -1
4:  -1
5:  -1
6:  -1
7:  -1
8:  -1
9:  -1

Second execution:

jloew@tru64:~/syscall$ ./a.out
Weeee!
0:  864
1:  872
2:  880
3:  -1
4:  -1
5:  -1
6:  -1
7:  -1
8:  -1
9:  -1

The difference is consistent (typing into the command prompt and deleting it will increase this counter).

Personal tools