From: Andrew Crabtree <andrewc@typhoon.rose.hp.com>
To: egcs@cygnus.com
Subject: -g problem
Date: Thu, 15 Jan 1998 16:30:00 -0000 [thread overview]
Message-ID: <199801142119.AA052762741@typhoon.rose.hp.com> (raw)
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
reply other threads:[~1998-01-15 16:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199801142119.AA052762741@typhoon.rose.hp.com \
--to=andrewc@typhoon.rose.hp.com \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).