delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/01/04:29:54

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: i386pe.x: etext and end?
1 Oct 1998 04:29:54 -0700 :
Message-ID: <19981001034937.12395.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
References: <13839 DOT 16480 DOT 757084 DOT 83000 DOT cygnus DOT gnu-win32 AT hawaii>
Mime-Version: 1.0
To: DJ Delorie <dj AT delorie DOT com>
Cc: gnu-win32 AT cygnus DOT com

On 29-Sep-1998, DJ Delorie <dj AT delorie DOT com> wrote:
> end and etext are "special" so they don't have underscores
> to make sure they don't interfere with functions or variables
> your program may provide (ansi/posix compliance and all that).
> 
> However, you can access them using gcc extensions:
> 
> extern int end asm("end");
> 
> void *foo()
> {
>   return (void *)&end;
> }
> 
> However, since they're deprecated, there is *no* sanctioned
> way of getting at them.  You shouldn't be using them at all
> unless you absolutely can't avoid it.

Sure, "end" and "etext" are deprecated -- I assume this is
because it could cause name clashes on systems which don't
prefix ordinary C symbols with underscores.

But what about "__end__" and "__etext__"?
They're not deprecated, are they?

-- 
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3        |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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