delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/09/30/12:28:25

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200009301628.SAA28060@father.ludd.luth.se>
Subject: Re: djgpp: djgpp/src/libc/crt0/mcount.c
In-Reply-To: <2427-Sat30Sep2000142751+0300-eliz@is.elta.co.il> from Eli Zaretskii at "Sep 30, 2000 02:27:51 pm"
To: djgpp-workers AT delorie DOT com
Date: Sat, 30 Sep 2000 18:28:10 +0200 (MET DST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Eli Zaretskii:
> > Date: Fri, 29 Sep 2000 18:35:04 -0400
> > From: "cvs-ams AT delorie DOT com" <cvs AT delorie DOT com>
> >
> > *** djgpp/src/libc/crt0/mcount.c	1997/11/02 15:18:44	1.3
> > --- djgpp/src/libc/crt0/mcount.c	2000/09/29 22:35:00	1.4
> > *************** static int histlen;
> > *** 40,44 ****
> >   static MTAB *mtab=0;
> >   
> > ! extern int etext;
> >   
> >   /* called by functions.  Use the pointer it provides to cache
> > --- 40,44 ----
> >   static MTAB *mtab=0;
> >   
> > ! extern int etext __asm__("etext");
> 
> I might be missing something, but won't this cause the same pollution
> you wanted to avoid?  What if the application defines `etext'
> somewhere in its sources?

"extern int etext" generates the assembler symbol "_etext", just as if
the user used "etext".

With my change the assembler symbol "etext" will be generated which
the user can't generate without assembler code.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019