public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -g problem
@ 1998-01-15 16:30 Andrew Crabtree
  0 siblings, 0 replies; only message in thread
From: Andrew Crabtree @ 1998-01-15 16:30 UTC (permalink / raw)
  To: egcs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-01-15 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-15 16:30 -g problem Andrew Crabtree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).