From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Crabtree To: egcs@cygnus.com Subject: -g problem Date: Thu, 15 Jan 1998 16:30:00 -0000 Message-id: <199801142119.AA052762741@typhoon.rose.hp.com> X-SW-Source: 1998-01/msg00492.html 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