robert@psych.psy.uq.oz (Robert Dal Santo) (01/04/89)
I am sending this for a friend. Please reply to me via mail as I don't read this newgroup normally. ------------------------------ I've had the following (linker?) problem in bringing up the "spiff" system recently posted to the net. I'm running SCO XENIX version 2.2.1 on a PC/AT clone. The make runs fine, compiling all source files successfully (with two warnings which should have no bearing on this problem) and also (seemingly) linking all objects cleanly. However, although "hdr" and "file" both agree that the created "spiff" file is indeed an executable program, XENIX seems to interpret it as a shell script! I've had this problem before with medium to large size systems (usually procured from the net) where the shell comes back with line after line of "Cannot execute: <weird characters>" in a manner similar to this specific example. Does the shell examine a to-be-run file for a "magic" number before doing an exec(), or does it only try to interpret a file as a shell script AFTER failing an exec()? I've tried to run "spiff" with three different shells, with identical results. Is this a problem with the linker? Has it been fixed in a later version? (What IS the latest version, please?). I include below an editied script of the problem in action. I could not get spiff to work with a mixture of cc options: "-Ml", "-Mlt128", "-M2lt128", with or without -g, etc. Thanks for any help you can offer! P.S. Some months ago I had a problem in running "large" programs, which refused to run normally or with runbig. A solution was mailed by Ross Oliver at SCO Technical Support, advocating the use of the -Mt<num> argument. This solution works great - thanks very much for the help! For my interest, would someone be able to give me an idea of what -Mt does in more detail? The manual states that -Mt<num> "Causes all data items greater than <num> bytes to be allocated to a new data segment". Does this mean that using "-Mt128" (which is my default these days) creates a new segment for each separate structure greater than 128 bytes? How many segments can the kernel support in a running executable anyway? EXAMPLE "SCRIPT": Script started on Sun Jan 1 16:11:02 1989 $ make cc -DXENIX -DM_TERMCAP -M2lt128 -c spiff.c spiff.c cc -DXENIX -DM_TERMCAP -M2lt128 -c output.c output.c output.c(60) : warning 17: cast of int expression to far pointer compiler may report 1 statement not reached warning message for compare.c ---------------------------------- Robert Dal Santo Phone +61 7 377 4063 (International) Department of Psychology, ARPA: robert%psych.psy.uq.oz@uunet.uu.net University of Queensland, UUCP: ..!uunet!munnari!psych.psy.uq.oz!robert St Lucia, Brisbane, 4067 JANET: psych.psy.uq.oz!robert@ukc AUSTRALIA.