summaryrefslogtreecommitdiff
path: root/libc/manual/startup.texi
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-05-26 17:46:57 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-05-26 17:46:57 +0000
commitd8d5895e420d4976fca22b9bd9e1edc3094ebf30 (patch)
treef96c015c14ac0428150153ba98f7a681ff021931 /libc/manual/startup.texi
parent62eb53f68d92687a028f3c515489b30e3df1d979 (diff)
Merge changes between r18519 and r18730 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@18731 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/manual/startup.texi')
-rw-r--r--libc/manual/startup.texi30
1 files changed, 29 insertions, 1 deletions
diff --git a/libc/manual/startup.texi b/libc/manual/startup.texi
index ed75e7bdc..0420e9328 100644
--- a/libc/manual/startup.texi
+++ b/libc/manual/startup.texi
@@ -34,8 +34,9 @@ This chapter looks at program startup from the execee's point of view. To
see the event from the execor's point of view, see @ref{Executing a File}.
@menu
-* Program Arguments:: Parsing your program's command-line arguments.
+* Program Arguments:: Parsing your program's command-line arguments
* Environment Variables:: Less direct parameters affecting your program
+* Auxiliary Vector:: Least direct parameters affecting your program
* System Calls:: Requesting service from the system
* Program Termination:: Telling the system you're done; return status
@end menu
@@ -590,6 +591,33 @@ reordering of command line arguments by @code{getopt} and
@c !!! GNU also has COREFILE, CORESERVER, EXECSERVERS
@end table
+@node Auxiliary Vector
+@section Auxiliary Vector
+@cindex auxiliary vector
+
+When a program is executed, it receives information from the operating
+system about the environment in which it is operating. The form of this
+information is a table of key-value pairs, where the keys are from the
+set of @samp{AT_} values in @file{elf.h}. Some of the data is provided
+by the kernel for libc consumption, and may be obtained by ordinary
+interfaces, such as @code{sysconf}. However, on a platform-by-platform
+basis there may be information that is not available any other way.
+
+@subsection Definition of @code{getauxval}
+@comment sys/auxv.h
+@deftypefun {unsigned long int} getauxval (unsigned long int @var{type})
+This function is used to inquire about the entries in the auxiliary
+vector. The @var{type} argument should be one of the @samp{AT_} symbols
+defined in @file{elf.h}. If a matching entry is found, the value is
+returned; if the entry is not found, zero is returned.
+@end deftypefun
+
+For some platforms, the key @code{AT_HWCAP} is the easiest way to inquire
+about any instruction set extensions available at runtime. In this case,
+there will (of necessity) be a platform-specific set of @samp{HWCAP_}
+values masked together that describe the capabilities of the cpu on which
+the program is being executed.
+
@node System Calls
@section System Calls