Date: Tue, 20 Sep 1994 09:29:48 +0200 From: Stefan Eckart To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: strange linker behavior Hello, the following program behaves rather strange when compiled with the current (1.12m2) release of djgpp: #include int delay; main() { printf("%d\n",delay); } I would have expected to get a 0 as output, and in fact this was the case until v1.11m5. The current version prints a large negative number... For some reason the linker merges the .bss symbol 'delay' with a .text symbol 'delay' from the runtime library (libsrc/c/dos/delay.s) and printf displays the first for opcode bytes of delay()... Is this a) a programming bug (name clash between an global variable and function name)? b) a feature or bug of the binutils 2.4 linker? c) a bug in djgpp? I think it is a), but why did it work up to now and why don't I get a warning or error message? Any idea? Thanks, Stefan.