1 .\" Copyright (c) 2008, Linux Foundation, written by by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI
26 .\" all rights reserved.
27 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
29 .TH END 3 2008-07-17 "GNU" "Linux Programmer's Manual"
32 .\"O etext, edata, end \- end of program segments
33 etext, edata, end \- ¥×¥í¥°¥é¥à¥»¥°¥á¥ó¥È¤Î½ª¤ï¤ê
43 .\"O The addresses of these symbols indicate the end of various program
45 ¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Î¥¢¥É¥ì¥¹¤Ï³Æ¼ï¤Î¥×¥í¥°¥é¥à¥»¥°¥á¥ó¥È¤Î½ª¤ï¤ê¤ò¼¨¤¹¡£
48 .\"O This is the first address past the end of the text segment
49 .\"O (the program code).
50 ¥Æ¥¥¹¥È¥»¥°¥á¥ó¥È (¥×¥í¥°¥é¥à¤Î¥³¡¼¥É) ¤ÎËöÈø¤Î¼¡¤Î¥¢¥É¥ì¥¹¡£
53 .\"O This is the first address past the end of the
54 .\"O initialized data segment.
55 ½é´ü²½¤µ¤ì¤¿¥Ç¡¼¥¿¤Î¥»¥°¥á¥ó¥È¤ÎËöÈø¤Î¼¡¤Î¥¢¥É¥ì¥¹¡£
58 .\"O This is the first address past the end of the
59 .\"O uninitialized data segment (also known as the BSS segment).
60 ½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ç¡¼¥¿¤Î¥»¥°¥á¥ó¥È (BSS ¥»¥°¥á¥ó¥È¤È¤â¸À¤ï¤ì¤ë)
61 ¤ÎËöÈø¤Î¼¡¤Î¥¢¥É¥ì¥¹¡£
62 .\"O .SH CONFORMING TO
64 .\"O Although these symbols have long been provided on most UNIX systems,
65 .\"O they are not standardized; use with caution.
66 ¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤ÏĹǯ¤Û¤È¤ó¤É¤Î UNIX ¥·¥¹¥Æ¥à¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë¤¬¡¢
67 ɸ½à²½¤µ¤ì¤Æ¤Ï¤¤¤Ê¤¤¡£Ãí°Õ¤·¤Æ»È¤¦¤³¤È¡£
70 .\"O The program must explicitly declare these symbols;
71 .\"O they are not defined in any header file.
72 ¥×¥í¥°¥é¥à¤Ç¤Ï¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤ÏÌÀ¼¨Åª¤ËÀë¸À¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
73 ¤³¤ì¤é¤Ï¤É¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Ç¤âÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
75 .\"O On some systems the names of these symbols are preceded by underscores,
81 .\"O These symbols are also defined for programs compiled on Linux.
82 ¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Î̾Á°¤ÏÁ°¤Ë¥¢¥ó¥À¡¼¥¹¥³¥¢¤¬
88 Linux ¤Ç¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤¿¥×¥í¥°¥é¥à¤Ç¤Ï¡¢
89 ¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Ç¤âÄêµÁ¤µ¤ì¤ë¡£
91 .\"O At the start of program execution,
92 .\"O the program break will be somewhere near
94 .\"O (perhaps at the start of the following page).
95 .\"O However, the break will change as memory is allocated via
101 .\"O with an argument of zero to find the current value of the program break.
102 ¥×¥í¥°¥é¥à¤Î¼Â¹Ô³«»Ï»þ¤Ë¡¢¥×¥í¥°¥é¥à¡¦¥Ö¥ì¡¼¥¯¤Ï
104 ¤Î¶á¤¯¤Î¤É¤³¤« (¤ª¤½¤é¤¯¼¡¤Î¥Ú¡¼¥¸¤ÎÀèƬ) ¤Ë¤Ê¤ë¡£
109 ¤Ç¥á¥â¥ê¤¬³ä¤êÅö¤Æ¤é¤ì¤ë¤ËÏ¢¤ì¤Æ¡¢¥×¥í¥°¥é¥à¡¦¥Ö¥ì¡¼¥¯¤ÏÊѲ½¤·¤Æ¤¤¤¯¡£
110 °ú¤¿ô¤Ë 0 ¤ò»ØÄꤷ¤Æ
112 ¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤Ç¡¢¥×¥í¥°¥é¥à¡¦¥Ö¥ì¡¼¥¯¤Î¸½ºßÃͤòÃΤ뤳¤È¤¬¤Ç¤¤ë¡£
115 .\"O When run, the program below produces output such as the following:
116 ²¼µ¤Î¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤È¡¢¼¡¤Î¤è¤¦¤Ê½ÐÎϤ¬ÆÀ¤é¤ì¤ë¡£
122 program text (etext) 0x8048568
123 initialized data (edata) 0x804a01c
124 uninitialized data (end) 0x804a024
126 .\"O .SS Program source
127 .SS ¥×¥í¥°¥é¥à¤Î¥½¡¼¥¹
134 extern char etext, edata, end; /* The symbols must have some type,
135 or "gcc -Wall" complains */
138 main(int argc, char *argv[])
140 printf("First address past:\\n");
141 printf(" program text (etext) %10p\\n", &etext);
142 printf(" initialized data (edata) %10p\\n", &edata);
143 printf(" uninitialized data (end) %10p\\n", &end);