summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2000-08-28 09:27:28 +0000
committerphantom <phantom@FreeBSD.org>2000-08-28 09:27:28 +0000
commitaadcb1fa9c335ec2f35d9c0c10cf65f737140ed0 (patch)
tree289b87a04521006a892555a092bbde7a02daaaea /share
parent06a2df14fe68ebff86d71bcf86e3293827602801 (diff)
downloadFreeBSD-src-aadcb1fa9c335ec2f35d9c0c10cf65f737140ed0.zip
FreeBSD-src-aadcb1fa9c335ec2f35d9c0c10cf65f737140ed0.tar.gz
Apply fixes from NetBSD to bring this manual page into reallity.
Inspired by: ru & 4.4BSD Design and Implementation Obtained from: NetBSD
Diffstat (limited to 'share')
-rw-r--r--share/man/man3/end.346
1 files changed, 30 insertions, 16 deletions
diff --git a/share/man/man3/end.3 b/share/man/man3/end.3
index a23713d..373d014 100644
--- a/share/man/man3/end.3
+++ b/share/man/man3/end.3
@@ -32,7 +32,7 @@
.\" @(#)end.3 6.4 (Berkeley) 1/24/94
.\" $FreeBSD$
.\"
-.Dd January 24, 1994
+.Dd August 28, 2000
.Dt END 3
.Os
.Sh NAME
@@ -45,24 +45,38 @@
.Vt extern etext;
.Vt extern edata;
.Sh DESCRIPTION
-The global variables
-.Va end , extext
+The globals
+.Va end , etext
and
.Va edata
-correspond to the
-the next address following the end
-of the text segment,
-the initialized data segment and the
-end of the data segment
-.Pq Tn BSS .
-These values are initially set at execution time
-by
-.Xr brk 2 .
+are program segment end addresses.
+.Pp
+.Va etext
+is the first address after the end of the text segment.
+.Pp
+.Va edata
+is the first address after the end of the initialized data segment.
+.Pp
+.Va end
+is the first address after the end of the data segment
+.Pq Tn BSS
+when the program is loaded. Use the
+.Xr sbrk 2
+.\".Fn sbrk 0
+system call with zero as its argument to find the current end of the
+data segment.
.Sh SEE ALSO
-.Xr brk 2 ,
-.Xr malloc 3
+.Xr sbrk 2 ,
+.Xr malloc 3 ,
+.Xr a.out 5
.Sh HISTORY
-A
+An
.Nm end
-manual appeared in
+manual page appeared in
.At v6 .
+.Sh BUGS
+Traditionally, no variable existed that pointed to the start of the
+text segment because the text segment always started at address
+zero. Although it is no longer valid to make this assumption, no
+variable similar to the ones documented above exists to point to the
+start of the text segment.
OpenPOWER on IntegriCloud