From: Martin Str|mberg 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Precedence: bulk According to Eli Zaretskii: > > Date: Fri, 29 Sep 2000 18:35:04 -0400 > > From: "cvs-ams 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