Re: [Geekos-devel] undefined reference to __bss_start
Status: Pre-Alpha
Brought to you by:
daveho
From: David H. <da...@cs...> - 2005-03-28 19:06:15
|
Ahmad Rizvi wrote: > Hi, > > I am trying to make project 0, where I get an 'undefined reference to > __bss_start': > > geekos/mem.o(.text+0x3bf): In function `Init_BSS': > ./src/geekos/mem.c:173: undefined reference to `__bss_start' > geekos/mem.o(.text+0x3c7):../src/geekos/mem.c:173: undefined reference > to `__bss_start' > make.exe: *** [geekos/kernel.exe] Error 1 > > My environment is: windows (im trying to make geekos work on win, and > i removed all errors except this one), and the djgpp compiler (it is > gcc for dos). The error is caused by the reference in mem.c: Note that djgpp has never been used for GeekOS development (that I know of). You may encounter issues booting the kernel. Also, it emits exes in a.out format, so the ELF loading project won't work quite as described. > > void Init_BSS(void) > { > extern char BSS_END, BSS_START; > /* Fill .bss with zeroes */ > memset(&BSS_START, '\0', &BSS_END - &BSS_START); > } > > I did a little search, and the variable BSS_START is not defined in > any src file. > I would like to know if the variable should be provided by the > compiler. It seems to be a mystery! > Please shed some light on the situation. Those symbols are defined in include/geekos/defs.h. You'll need to redefine them to whatever symbols are appropriate for djgpp. It may be the case that you can just use the ones defined for cygwin. -Dave |