www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/13/14:17:45

Date: Thu, 13 Apr 1995 19:05:35 +0000 (O)
From: Mahmoud Rafeh <MAHMOUD AT esic DOT eun DOT eg>
Subject: Re: Problem compiling Sicstus prolog
To: peter AT iqsoft DOT hu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> Hi
> 
>  We have a problem compiling SICStus prolog 2.1#9.
>  
>  While linking sp.o 
>  	_bss_start (saverest.o) 
>  is an undefined reference. 
>  
>  _bss_start is referred to in file Emulator/saverest.c:
>  line 535:
>      extern edata, _bss_start, _go32_info_block[];
>  line 538:
>      holes[h++].end = (char *)&_bss_start;
> 
>  This is a DJGPP specific code fragment so it is expected to compile
>  without problems and it did compile with a previous version of DJGPP
>  (nobody remembers which version it was).
>  
>  We use the following versions of C compiler components:
>  
>  	go32 1.12m3
>  	binutils 2.4
>  	gas 2.3
>  	gcc 2.6.0
>  	libg++-2.6.0
> 
>  Could anyone tell me how to substitute _bss_start?
>  
>  Any help would be appreciated.
>  
>  PETER Laszlo
>  =========================================================================
>  IQSOFT (Intelligent Software Co. Ltd.)		Email: peter AT iqsoft DOT hu
>  Budapest XIV. Teleki Blanka u. 15-17
>  HUNGARY 
>  =========================================================================

As the bss segement start can be referenced by edata, you can change the code
to the following:

    extern edata, _go32_info_block[];
    
    holes[h].begin = (char *)&edata;
    holes[h++].end = (char *)SP_ALIGN(&edata,0x1000); /* was &_bss_start */
    holes[h].begin = (char *)&_go32_info_block;
    holes[h++].end = (char *)&_go32_info_block+40;

This works fine for me.

--Mahmoud Rafeh
Central Lab of Agricultural Expert Systems
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019