Article View: comp.unix.programmer
Article #1308Xenix Cross Development from 386 to 286
From: Dirk Otterbach PEM 0711/71 30 45
Date: Tue, 27 Nov 1990 09:54
Date: Tue, 27 Nov 1990 09:54
105 lines
3562 bytes
3562 bytes
I have the following problem:
I have to port a very large program from SCO XENIX/386 Rel. 2.3.3 to
SCO XENIX/286. As we don't have the right development system in-
stalled on the target (=286) machine, we do a cross compilation
on the 386 system.
With size of the program (1.5 MByte incl. debug information) the
compilation with the '-Zi -Od -Ml2 -Gt10' results in a runtime
stack overflow.
By enlarging the stack with '-F3000' the program wouldn't abort
but would produce wrong screen output and results. I think that's
still a stack size problem, but I can't enlarge stack size any
more without overflowing the default data segment.
Another try was to put the stack into an extra segment with the
flags '-Zi -Od -Ml -M2 -Au -ND GLOB_DAT -F 4000'. Now the program
would hang up at the first malloc call (see below).
Using the flags '-Zi -Od -Ml -M2 -Mt1' would result in further
problems. Now the linker has not enough memory for the segments.
I could overcome this problem using the link option '-SE 1024'.
Result: the program would hang even earlier at the 'access' call
(see below).
Does anybody know a solution? How can I manage to move the stack
into another segment than the default data segment?
Thanks in advance for any help
Dirk
/* -------------------------------------------------------------------- */
/* H A U P T P R O G R A M M */
/* -------------------------------------------------------------------- */
void main( argc, argv)
int argc;
char **argv;
{
int rc=RC_SUCCESS;
long cur_time;
own_pname = BENUTZERDIALOG;
/* Feststellen, ob Parameter uebergeben und entsprechend schalten */
parse(argc, argv);
.
.
.
/************************************************************************/
/* Modulname: parse_arg */
/************************************************************************/
int parse(int argc ,char **argv )
{
int rtn = RC_SUCCESS;
if( argc < 2 )
{
rtn = RC_FAIL;
strcpy(aktuelle_daten.defdatei,DEFDATEI);
return( rtn );
}
else
{
if( strlen( argv[1] ) > SIZE_NAME )
{
.. stuff deleted ..
}
else
{
if(!access(argv[1],0) == 0) <<<<<<<<<<<------ '-Zi -Od -Ml -M2 -Mt1'
{
.. stuff deleted ..
}
else
{
if(def_dat_kennung(argv[1]) == RC_SUCCESS )
{
.
.
/************************************************************************/
/* Funktionsname: def_dat_kennung */
/************************************************************************/
int def_dat_kennung( char *dateiname)
{
int rtn= RC_SUCCESS;
FILE *file;
char *buffer;
buffer=(char *)malloc(100); <<<<<<<<<<------- '-Zi -Od -Ml2 -Au -ND GLOBDAT'
if(( file=fopen( dateiname,"r")) != NULL)
{
.
.
--
Dirk Otterbach | PEM Tillmann Basien
do@pemstgt.PEM-Stuttgart.de | Programmentwicklung fuer Microcomputer
FAX +49-711-713047 | Vaihinger Str.49, PostBox 810165
Technical Details
Message-ID:
<1990Nov27.095401.13389@pemstgt.PEM-Stuttgart.de>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!apple!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!unido!pemstgt!doShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!apple!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!unido!pemstgt!do From: do@pemstgt.PEM-Stuttgart.de (Dirk Otterbach PEM 0711/71 30 45) Newsgroups: comp.unix.programmer Subject: Xenix Cross Development from 386 to 286 Message-ID: <1990Nov27.095401.13389@pemstgt.PEM-Stuttgart.de> Date: 27 Nov 90 09:54:01 GMT Distribution: comp Organization: PEM Tillmann Basien, Stuttgart, Germany Lines: 106