1afe61c15SRodney W. Grimes.\" Copyright (c) 1986 2afe61c15SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3afe61c15SRodney W. Grimes.\" 4afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6afe61c15SRodney W. Grimes.\" are met: 7afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8afe61c15SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10afe61c15SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11afe61c15SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12*dda5b397SEitan Adler.\" 3. Neither the name of the University nor the names of its contributors 13afe61c15SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 14afe61c15SRodney W. Grimes.\" without specific prior written permission. 15afe61c15SRodney W. Grimes.\" 16afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19afe61c15SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26afe61c15SRodney W. Grimes.\" SUCH DAMAGE. 27afe61c15SRodney W. Grimes.\" 28b166438dSAlexey Zelkin.Dd August 28, 2000 29afe61c15SRodney W. Grimes.Dt END 3 30afe61c15SRodney W. Grimes.Os 31afe61c15SRodney W. Grimes.Sh NAME 32afe61c15SRodney W. Grimes.Nm end , 33afe61c15SRodney W. Grimes.Nm etext , 34afe61c15SRodney W. Grimes.Nm edata 35afe61c15SRodney W. Grimes.Nd end boundaries of image segments 36afe61c15SRodney W. Grimes.Sh SYNOPSIS 37afe61c15SRodney W. Grimes.Vt extern end ; 38afe61c15SRodney W. Grimes.Vt extern etext ; 39afe61c15SRodney W. Grimes.Vt extern edata ; 40afe61c15SRodney W. Grimes.Sh DESCRIPTION 41b166438dSAlexey ZelkinThe globals 42b166438dSAlexey Zelkin.Va end , etext 43afe61c15SRodney W. Grimesand 44afe61c15SRodney W. Grimes.Va edata 45b166438dSAlexey Zelkinare program segment end addresses. 46b166438dSAlexey Zelkin.Pp 47b166438dSAlexey Zelkin.Va etext 48b166438dSAlexey Zelkinis the first address after the end of the text segment. 49b166438dSAlexey Zelkin.Pp 50b166438dSAlexey Zelkin.Va edata 51b166438dSAlexey Zelkinis the first address after the end of the initialized data segment. 52b166438dSAlexey Zelkin.Pp 53b166438dSAlexey Zelkin.Va end 54b166438dSAlexey Zelkinis the first address after the end of the data segment 55b166438dSAlexey Zelkin.Pq Tn BSS 56b24e6a5aSSheldon Hearnwhen the program is loaded. 57b24e6a5aSSheldon HearnUse the 58b166438dSAlexey Zelkin.Xr sbrk 2 59b166438dSAlexey Zelkin.\".Fn sbrk 0 60b166438dSAlexey Zelkinsystem call with zero as its argument to find the current end of the 61b166438dSAlexey Zelkindata segment. 62afe61c15SRodney W. Grimes.Sh SEE ALSO 63b166438dSAlexey Zelkin.Xr sbrk 2 , 64b166438dSAlexey Zelkin.Xr malloc 3 , 65b166438dSAlexey Zelkin.Xr a.out 5 66afe61c15SRodney W. Grimes.Sh HISTORY 67b166438dSAlexey ZelkinAn 684b66483fSRuslan Ermilov.Nm 69b166438dSAlexey Zelkinmanual page appeared in 70afe61c15SRodney W. Grimes.At v6 . 71b166438dSAlexey Zelkin.Sh BUGS 72b166438dSAlexey ZelkinTraditionally, no variable existed that pointed to the start of the 73b24e6a5aSSheldon Hearntext segment because the text segment always started at address zero. 74b24e6a5aSSheldon HearnAlthough it is no longer valid to make this assumption, no 75b166438dSAlexey Zelkinvariable similar to the ones documented above exists to point to the 76b166438dSAlexey Zelkinstart of the text segment. 77