delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/29/09:30:08

From: DJ Delorie <dj AT delorie DOT com>
Subject: Re: i386pe.x: etext and end?
29 Sep 1998 09:30:08 -0400 :
Message-ID: <3610E0E0.167E@delorie.com>
References: <13839 DOT 16480 DOT 757084 DOT 83000 DOT cygnus DOT gnu-win32 AT hawaii>
Mime-Version: 1.0
X-Mailer: Mozilla 3.0 (X11; I; IRIX 5.3 IP22)

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.

DJ

- Raw text -


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