<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="color: rgb(33, 33, 33); font-size: 12pt;">>The Linux manual page of "end" says about the symbols as follows.</span><br>
</p>
<div style="color: rgb(33, 33, 33);">
<div>
<div dir="ltr">
<div>> </div>
<div>>  etext  This is the first address past the end of the text segment (the program code).</div>
<div>>  edata  This is the first address past the end of the initialized data segment.<br>
</div>
<div>> </div>
<div>>Is your implementation correct? Your implementation seems like this.</div>
<div>> </div>
<div>>  etext is the last address past the end of any writable segment</div>
<div>>  edata is the last address past the end of any initialized data segment</div>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">It is also said that "<span style="color: rgb(24, 24, 24); font-family: monospace, courier;">although these symbols have long been provided on most UNIX systems, </span><span style="color: rgb(24, 24, 24); font-family: monospace, courier;">they
 are not standardized; use with caution</span><span style="color: rgb(24, 24, 24); font-family: monospace, courier;">​".</span></div>
<div class="gmail_extra"><span style="color: rgb(24, 24, 24); font-family: monospace, courier;"></span><span style="color: rgb(24, 24, 24); font-family: monospace, courier;">Oracle description is a bit different:</span></div>
<div class="gmail_extra"><span style="color: rgb(24, 24, 24); font-family: monospace, courier;"><br>
</span></div>
<div class="gmail_extra"><span style="color: rgb(24, 24, 24); font-family: monospace, courier;"><a href="https://docs.oracle.com/cd/E53394_01/html/E54766/u-etext-3c.html">https://docs.oracle.com/cd/E53394_01/html/E54766/u-etext-3c.html</a><br>
</span><br>
</div>
<div class="gmail_extra"><dt style="font-weight: bold; padding: 5px 0px 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
<tt style="font-family: Monaco, Courier, 'Courier New', monospace; color: rgb(68, 68, 68);">_etext</tt></dt><dd style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
<p style="margin-top: 3px; margin-bottom: 17px;">The address of <tt style="font-family: Monaco, Courier, 'Courier New', monospace; color: rgb(68, 68, 68);">_etext</tt> is the first location after the last read-only loadable segment.</p>
</dd><dt style="font-weight: bold; padding: 5px 0px 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
<tt style="font-family: Monaco, Courier, 'Courier New', monospace; color: rgb(68, 68, 68);">_edata</tt></dt><dd style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">
<p style="margin-top: 3px; margin-bottom: 17px;">The address of <tt style="font-family: Monaco, Courier, 'Courier New', monospace; color: rgb(68, 68, 68);">_edata</tt> is the first location after the last read-write loadable segment.<br>
</p>
<p style="margin-top: 3px; margin-bottom: 17px;"><br>
</p>
I think my implementation is:<br>
</dd></div>
<div class="gmail_extra"><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">etext is the last address past the end of
<strong>last</strong> <strong>non</strong> writable segment</span><br>
</div>
<div class="gmail_extra"><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">edata is the last address past the end of
<span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
<strong>last</strong></span>​ initialized data segment</span><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">I believe my implementation equals to gold output now.<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">George.<br>
</div>
</div>
</div>
</body>
</html>