From: Andrew Crabtree Message-Id: <199801151816.AA247868176@typhoon.rose.hp.com> Subject: Re: -g problem To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Thu, 15 Jan 1998 10:16:15 PST Cc: andrewc AT rosemail DOT rose DOT hp DOT com, djgpp-workers AT delorie DOT com In-Reply-To: ; from "Eli Zaretskii" at Jan 15, 98 1:06 pm Reply-To: andrewc AT rosemail DOT rose DOT hp DOT com Precedence: bulk > What exactly do you mean by ``bombs''? I think the error message > about duplicate symbols with -g is because you define functions, not > variables. Gas doesn't keep track of functions or variables differently though, does it? The error occurs from the assembler (this is what I meant by bombs, it just quits with an error). It also doesn't appear to be multiply defined, except for references in the debug data. But why does it occur ONLY if -g is specified? -gstabs does not exhibit this behaviour, nor does compiling without any -g or -gstabs. I realize I probably didn't send in the assembly code. Here's the output with -g /usr/tmp/cca24774.s: Assembler messages: /usr/tmp/cca24774.s:39: Fatal error: Symbol __start already defined. gcc2_compiled.: ___gnu_compiled_c: .text .def _start; .val start; .scl 2; .type 041; .endef .globl start start: .def .bf; .val .; .scl 101; .line 9; .endef pushl %ebp movl %esp,%ebp L1: movl %ebp,%esp popl %ebp ret .def .ef; .val .; .scl 101; .line 1; .endef .def _start; .val .; .scl -1; .endef .def __start; .val _start; .scl 2; .type 041; .endef .globl _start _start: .def .bf; .val .; .scl 101; .line 10; .endef pushl %ebp movl %esp,%ebp L2: movl %ebp,%esp popl %ebp ret .def .ef; .val .; .scl 101; .line 1; .endef .def __start; .val .; .scl -1; .endef .def ___start; .val __start; .scl 2; .type 041; .endef .globl __start __start: <<<<<<<<<<<<<<<<<<<<<< I don't quite understand why did you write e.g. > `extern void start() __asm__("start");' and what do you want this to > produce, but isn't this what you want: > > extern unsigned start __asm__("start"); Please .... You think I would write that. Its from the gcc sources :) Its also in the sources for all targets, and since the default CFLAGS are "-O2 -g" I assume other targets don't have this problem. > > BTW - Kenner released 2.8.0 for those who have been waiting... > Yep, I saw the announcement. The question is: who's gonna work on > porting it (and libstdc++ 2.8.0) to DJGPP? Uh - see above ;) Actually, gcc itself should be in pretty good shape. All my patches from the last year have been applied. After you work through some quirks in the make process everything should work ok, except for gcov, which I have never been able to get working. Haven't tried in almost 6 months now, but I don't think its changed much. There is still the fixincludes, and gcc uses header file problems, and also the target name scheme must be changed to match binutils. I also finally got the c++ libs to build so those should go OK too. The only thing I don't know about is how it will build under bash and a djgpp environment. I always bootstrap from unix. Given that 2.8.1 will probably be out within 2 weeks might as well wait though. Andy -- _______ ___________________________________________________________ / Andrew Crabtree / Workgroup Networks Division ____ ___ / Hewlett-Packard / / / / Roseville, CA __/ __/ _____/ 916/785-1675 / andrewc AT rosemail DOT rose DOT hp DOT com ___________ __/ _____________________________________________________