I'm making a stab at getting Sequent Dynix/PTX libraries running on
linux-ibcs2.

I've made a couple hacks to get it limping along in the feeblest
possible manner, but I'm a little confused as to what to do next.

So far, I've modified linux/coff.h to recognize PTX COFF binaries as
valid.  I've added a PTX personality to linux/personality.h, added
entries (which are no doubt wrong) to errmap.inc and callmap.inc, and
put in an appropriate comment string in in binfmt_coff.c

So far, so good.  The debug output from iBCS shows that it recognizes my
exectable, and gives it the PTX personality.  In fact, I can run a
little PTX program that just spins:

  main() { for(;;); }

But, if I try hello.c:

  main() { printf("hello, world\n"); }

I get a segfault.  'strace hello' gives me

  execve("./hello", ["./hello"], [/* 36 vars */]) = 0
  --- SIGSEGV (Segmentation fault) ---
  +++ killed by SIGSEGV +++

I'm stumped.  I get a segfault running this program, too:

  main() { exit(1); }

I used the SVR4 system call mapping for PTX (which isn't perfect, but
gets 'exit' right, at least), so I'm pretty sure there's something more
interesting going on then just a messed-up system call mapping.

Does anyone have any ideas what I should do next?  Is there any other
information I could give that would be helpful?

Reply via email to