This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-g problem
- To: egcs at cygnus dot com
- Subject: -g problem
- From: Andrew Crabtree <andrewc at typhoon dot rose dot hp dot com>
- Date: Wed, 14 Jan 1998 13:19:01 PST
- Reply-To: andrewc at rosemail dot rose dot hp dot com
GCC is generating incorrect debugging code when -g is used for
i586-go32-msdos. The following code (from libgcc1-test.c)
/* Provide functions that some versions of the linker use to default
the start address if -e symbol is not used, to avoid the warning
message saying the start address is defaulted. */
extern void start() __asm__("start");
extern void _start() __asm__("_start");
extern void __start() __asm__("__start");
void start() {}
void _start() {}
void __start() {}
Generates the following assembly if default CFLAGS are used (-O2 -g)
This crashes the assembler and halts the make process when building egcs with
/usr/tmp/cca05269.s: Assembler messages:
/usr/tmp/cca05269.s:500: Fatal error: Symbol _start already defined.
If -g is not specified things work OK, as well as if -gstabs is specified.
As always, any help appreciated.
Andy
.globl start
start:
.def .bf; .val .; .scl 101; .line 100; .endef
pushl %ebp
movl %esp,%ebp
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 101; .endef
pushl %ebp
movl %esp,%ebp
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 102; .endef
pushl %ebp
movl %esp,%ebp
movl %ebp,%esp
popl %ebp
ret
.def .ef; .val .; .scl 101; .line 1; .endef
.def ___start; .val .; .scl -1; .endef
.def _mainCRTStartup; .val _mainCRTStartup; .scl