1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-09-28 04:06+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man3/dl_iterate_phdr.3:25
22 msgid "DL_ITERATE_PHDR"
26 #: build/C/man3/dl_iterate_phdr.3:25
32 #: build/C/man3/dl_iterate_phdr.3:25 build/C/man3/end.3:26 build/C/man8/ld.so.8:5 build/C/man8/ldconfig.8:22 build/C/man8/sln.8:25
38 #: build/C/man3/dl_iterate_phdr.3:25 build/C/man3/dlopen.3:35 build/C/man5/elf.5:35 build/C/man3/end.3:26 build/C/man8/ld.so.8:5 build/C/man8/ldconfig.8:22 build/C/man1/ldd.1:14 build/C/man7/rtld-audit.7:28 build/C/man8/sln.8:25
40 msgid "Linux Programmer's Manual"
44 #: build/C/man3/dl_iterate_phdr.3:26 build/C/man3/dlopen.3:36 build/C/man5/elf.5:36 build/C/man3/end.3:27 build/C/man8/ld.so.8:6 build/C/man8/ldconfig.8:23 build/C/man1/ldd.1:15 build/C/man7/rtld-audit.7:29 build/C/man8/sln.8:26
50 #: build/C/man3/dl_iterate_phdr.3:28
51 msgid "dl_iterate_phdr - walk through list of shared objects"
55 #: build/C/man3/dl_iterate_phdr.3:28 build/C/man3/dlopen.3:39 build/C/man5/elf.5:38 build/C/man3/end.3:29 build/C/man8/ld.so.8:8 build/C/man8/ldconfig.8:25 build/C/man1/ldd.1:17 build/C/man7/rtld-audit.7:31 build/C/man8/sln.8:28
61 #: build/C/man3/dl_iterate_phdr.3:32
64 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
65 "B<#include E<lt>link.hE<gt>>\n"
69 #: build/C/man3/dl_iterate_phdr.3:37
72 "B<int dl_iterate_phdr(>\n"
73 "B< int (*>I<callback>B<) (struct dl_phdr_info *>I<info>B<,>\n"
74 "B< size_t >I<size>B<, void *>I<data>B<,>\n"
75 "B< void *>I<data>B<;>\n"
79 #: build/C/man3/dl_iterate_phdr.3:38 build/C/man3/dlopen.3:51 build/C/man5/elf.5:43 build/C/man3/end.3:35 build/C/man8/ld.so.8:18 build/C/man8/ldconfig.8:54 build/C/man1/ldd.1:19 build/C/man7/rtld-audit.7:35 build/C/man8/sln.8:32
85 #: build/C/man3/dl_iterate_phdr.3:43
87 "The B<dl_iterate_phdr>() function allows an application to inquire at run "
88 "time to find out which shared objects it has loaded."
92 #: build/C/man3/dl_iterate_phdr.3:53
94 "The B<dl_iterate_phdr>() function walks through the list of an "
95 "application's shared objects and calls the function I<callback> once for "
96 "each object, until either all shared objects have been processed or "
97 "I<callback> returns a nonzero value."
101 #: build/C/man3/dl_iterate_phdr.3:70
103 "Each call to I<callback> receives three arguments: I<info>, which is a "
104 "pointer to a structure containing information about the shared object; "
105 "I<size>, which is the size of the structure pointed to by I<info>; and "
106 "I<data>, which is a copy of whatever value was passed by the calling program "
107 "as the second argument (also named I<data>) in the call to "
108 "B<dl_iterate_phdr>()."
112 #: build/C/man3/dl_iterate_phdr.3:74
113 msgid "The I<info> argument is a structure of the following type:"
117 #: build/C/man3/dl_iterate_phdr.3:86
120 "struct dl_phdr_info {\n"
121 " ElfW(Addr) dlpi_addr; /* Base address of object */\n"
122 " const char *dlpi_name; /* (Null-terminated) name of\n"
124 " const ElfW(Phdr) *dlpi_phdr; /* Pointer to array of\n"
125 " ELF program headers\n"
126 " for this object */\n"
127 " ElfW(Half) dlpi_phnum; /* # of items in I<dlpi_phdr> */\n"
132 #: build/C/man3/dl_iterate_phdr.3:98
134 "(The I<ElfW>() macro definition turns its argument into the name of an ELF "
135 "data type suitable for the hardware architecture. For example, on a 32-bit "
136 "platform, ElfW(Addr) yields the data type name Elf32_Addr. Further "
137 "information on these types can be found in the I<E<lt>elf.hE<gt>> and "
138 "I<E<lt>link.hE<gt>> header files.)"
142 #: build/C/man3/dl_iterate_phdr.3:109
144 "The I<dlpi_addr> field indicates the base address of the shared object "
145 "(i.e., the difference between the virtual memory address of the shared "
146 "object and the offset of that object in the file from which it was loaded). "
147 "The I<dlpi_name> field is a null-terminated string giving the pathname from "
148 "which the shared object was loaded."
152 #: build/C/man3/dl_iterate_phdr.3:124
154 "To understand the meaning of the I<dlpi_phdr> and I<dlpi_phnum> fields, we "
155 "need to be aware that an ELF shared object consists of a number of segments, "
156 "each of which has a corresponding program header describing the segment. "
157 "The I<dlpi_phdr> field is a pointer to an array of the program headers for "
158 "this shared object. The I<dlpi_phnum> field indicates the size of this "
163 #: build/C/man3/dl_iterate_phdr.3:126
164 msgid "These program headers are structures of the following form:"
168 #: build/C/man3/dl_iterate_phdr.3:139
172 " Elf32_Word p_type; /* Segment type */\n"
173 " Elf32_Off p_offset; /* Segment file offset */\n"
174 " Elf32_Addr p_vaddr; /* Segment virtual address */\n"
175 " Elf32_Addr p_paddr; /* Segment physical address */\n"
176 " Elf32_Word p_filesz; /* Segment size in file */\n"
177 " Elf32_Word p_memsz; /* Segment size in memory */\n"
178 " Elf32_Word p_flags; /* Segment flags */\n"
179 " Elf32_Word p_align; /* Segment alignment */\n"
184 #: build/C/man3/dl_iterate_phdr.3:145
186 "Note that we can calculate the location of a particular program header, "
187 "I<x>, in virtual memory using the formula:"
191 #: build/C/man3/dl_iterate_phdr.3:148
193 msgid " addr == info-E<gt>dlpi_addr + info-E<gt>dlpi_phdr[x].p_vaddr;\n"
197 #: build/C/man3/dl_iterate_phdr.3:149
203 #: build/C/man3/dl_iterate_phdr.3:154
205 "The B<dl_iterate_phdr>() function returns whatever value was returned by "
206 "the last call to I<callback>."
210 #: build/C/man3/dl_iterate_phdr.3:154
216 #: build/C/man3/dl_iterate_phdr.3:157
217 msgid "B<dl_iterate_phdr>() has been supported in glibc since version 2.2.4."
221 #: build/C/man3/dl_iterate_phdr.3:157 build/C/man3/dlopen.3:381 build/C/man3/end.3:50 build/C/man7/rtld-audit.7:461
223 msgid "CONFORMING TO"
227 #: build/C/man3/dl_iterate_phdr.3:161
229 "The B<dl_iterate_phdr>() function is Linux-specific and should be avoided "
230 "in portable applications."
234 #: build/C/man3/dl_iterate_phdr.3:161 build/C/man3/dlopen.3:446 build/C/man3/end.3:76 build/C/man7/rtld-audit.7:502
240 #: build/C/man3/dl_iterate_phdr.3:166
242 "The following program displays a list of pathnames of the shared objects it "
243 "has loaded. For each shared object, the program lists the virtual addresses "
244 "at which the object's ELF segments are loaded."
248 #: build/C/man3/dl_iterate_phdr.3:172
251 "#define _GNU_SOURCE\n"
252 "#include E<lt>link.hE<gt>\n"
253 "#include E<lt>stdlib.hE<gt>\n"
254 "#include E<lt>stdio.hE<gt>\n"
258 #: build/C/man3/dl_iterate_phdr.3:177
262 "callback(struct dl_phdr_info *info, size_t size, void *data)\n"
268 #: build/C/man3/dl_iterate_phdr.3:180
271 " printf(\"name=%s (%d segments)\\en\", info-E<gt>dlpi_name,\n"
272 " info-E<gt>dlpi_phnum);\n"
276 #: build/C/man3/dl_iterate_phdr.3:186
279 " for (j = 0; j E<lt> info-E<gt>dlpi_phnum; j++)\n"
280 " printf(\"\\et\\et header %2d: address=%10p\\en\", j,\n"
281 " (void *) (info-E<gt>dlpi_addr + "
282 "info-E<gt>dlpi_phdr[j].p_vaddr));\n"
288 #: build/C/man3/dl_iterate_phdr.3:191
292 "main(int argc, char *argv[])\n"
294 " dl_iterate_phdr(callback, NULL);\n"
298 #: build/C/man3/dl_iterate_phdr.3:194 build/C/man3/end.3:107
301 " exit(EXIT_SUCCESS);\n"
306 #: build/C/man3/dl_iterate_phdr.3:195 build/C/man3/dlopen.3:509 build/C/man5/elf.5:1939 build/C/man3/end.3:108 build/C/man8/ld.so.8:486 build/C/man8/ldconfig.8:175 build/C/man1/ldd.1:108 build/C/man7/rtld-audit.7:602 build/C/man8/sln.8:60
312 #: build/C/man3/dl_iterate_phdr.3:202
314 "B<ldd>(1), B<objdump>(1), B<readelf>(1), B<dlopen>(3), B<elf>(5), "
319 #: build/C/man3/dl_iterate_phdr.3:205
321 "I<Executable and Linking Format Specification>, available at various "
326 #: build/C/man3/dl_iterate_phdr.3:205 build/C/man3/dlopen.3:518 build/C/man5/elf.5:1963 build/C/man3/end.3:113 build/C/man8/ld.so.8:498 build/C/man8/ldconfig.8:178 build/C/man1/ldd.1:111 build/C/man7/rtld-audit.7:607 build/C/man8/sln.8:64
332 #: build/C/man3/dl_iterate_phdr.3:212 build/C/man3/dlopen.3:525 build/C/man5/elf.5:1970 build/C/man3/end.3:120 build/C/man8/ld.so.8:505 build/C/man8/ldconfig.8:185 build/C/man1/ldd.1:118 build/C/man7/rtld-audit.7:614 build/C/man8/sln.8:71
334 "This page is part of release 3.54 of the Linux I<man-pages> project. A "
335 "description of the project, and information about reporting bugs, can be "
336 "found at \\%http://www.kernel.org/doc/man-pages/."
340 #: build/C/man3/dlopen.3:35
346 #: build/C/man3/dlopen.3:35
352 #: build/C/man3/dlopen.3:35 build/C/man5/elf.5:35 build/C/man7/rtld-audit.7:28
358 #: build/C/man3/dlopen.3:39
360 "dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to "
361 "dynamic linking loader"
365 #: build/C/man3/dlopen.3:41
366 msgid "B<#include E<lt>dlfcn.hE<gt>>"
370 #: build/C/man3/dlopen.3:43
371 msgid "B<void *dlopen(const char *>I<filename>B<, int >I<flag>B<);>"
375 #: build/C/man3/dlopen.3:45
376 msgid "B<char *dlerror(void);>"
380 #: build/C/man3/dlopen.3:47
381 msgid "B<void *dlsym(void *>I<handle>B<, const char *>I<symbol>B<);>"
385 #: build/C/man3/dlopen.3:49
386 msgid "B<int dlclose(void *>I<handle>B<);>"
390 #: build/C/man3/dlopen.3:51
391 msgid "Link with I<-ldl>."
395 #: build/C/man3/dlopen.3:58
397 "The four functions B<dlopen>(), B<dlsym>(), B<dlclose>(), B<dlerror>() "
398 "implement the interface to the dynamic linking loader."
402 #: build/C/man3/dlopen.3:58
408 #: build/C/man3/dlopen.3:71
410 "The function B<dlerror>() returns a human readable string describing the "
411 "most recent error that occurred from B<dlopen>(), B<dlsym>() or "
412 "B<dlclose>() since the last call to B<dlerror>(). It returns NULL if no "
413 "errors have occurred since initialization or since it was last called."
417 #: build/C/man3/dlopen.3:71
423 #: build/C/man3/dlopen.3:89
425 "The function B<dlopen>() loads the dynamic library file named by the "
426 "null-terminated string I<filename> and returns an opaque \"handle\" for the "
427 "dynamic library. If I<filename> is NULL, then the returned handle is for "
428 "the main program. If I<filename> contains a slash (\"/\"), then it is "
429 "interpreted as a (relative or absolute) pathname. Otherwise, the dynamic "
430 "linker searches for the library as follows (see B<ld.so>(8) for further "
435 #: build/C/man3/dlopen.3:89 build/C/man3/dlopen.3:93 build/C/man3/dlopen.3:100 build/C/man3/dlopen.3:104 build/C/man3/dlopen.3:111 build/C/man8/ld.so.8:56 build/C/man8/ld.so.8:61 build/C/man8/ld.so.8:66 build/C/man8/ld.so.8:70 build/C/man8/ld.so.8:80
441 #: build/C/man3/dlopen.3:93
443 "(ELF only) If the executable file for the calling program contains a "
444 "DT_RPATH tag, and does not contain a DT_RUNPATH tag, then the directories "
445 "listed in the DT_RPATH tag are searched."
449 #: build/C/man3/dlopen.3:100
451 "If, at the time that the program was started, the environment variable "
452 "B<LD_LIBRARY_PATH> was defined to contain a colon-separated list of "
453 "directories, then these are searched. (As a security measure this variable "
454 "is ignored for set-user-ID and set-group-ID programs.)"
458 #: build/C/man3/dlopen.3:104
460 "(ELF only) If the executable file for the calling program contains a "
461 "DT_RUNPATH tag, then the directories listed in that tag are searched."
465 #: build/C/man3/dlopen.3:111
467 "The cache file I</etc/ld.so.cache> (maintained by B<ldconfig>(8)) is "
468 "checked to see whether it contains an entry for I<filename>."
472 #: build/C/man3/dlopen.3:117
473 msgid "The directories I</lib> and I</usr/lib> are searched (in that order)."
477 #: build/C/man3/dlopen.3:123
479 "If the library has dependencies on other shared libraries, then these are "
480 "also automatically loaded by the dynamic linker using the same rules. (This "
481 "process may occur recursively, if those libraries in turn have dependencies, "
486 #: build/C/man3/dlopen.3:126
487 msgid "One of the following two values must be included in I<flag>:"
491 #: build/C/man3/dlopen.3:126
497 #: build/C/man3/dlopen.3:134
499 "Perform lazy binding. Only resolve symbols as the code that references them "
500 "is executed. If the symbol is never referenced, then it is never resolved. "
501 "(Lazy binding is performed only for function references; references to "
502 "variables are always immediately bound when the library is loaded.)"
506 #: build/C/man3/dlopen.3:134
512 #: build/C/man3/dlopen.3:143
514 "If this value is specified, or the environment variable B<LD_BIND_NOW> is "
515 "set to a nonempty string, all undefined symbols in the library are resolved "
516 "before B<dlopen>() returns. If this cannot be done, an error is returned."
520 #: build/C/man3/dlopen.3:146
521 msgid "Zero or more of the following values may also be ORed in I<flag>:"
525 #: build/C/man3/dlopen.3:146
527 msgid "B<RTLD_GLOBAL>"
531 #: build/C/man3/dlopen.3:150
533 "The symbols defined by this library will be made available for symbol "
534 "resolution of subsequently loaded libraries."
538 #: build/C/man3/dlopen.3:150
540 msgid "B<RTLD_LOCAL>"
544 #: build/C/man3/dlopen.3:157
546 "This is the converse of B<RTLD_GLOBAL>, and the default if neither flag is "
547 "specified. Symbols defined in this library are not made available to "
548 "resolve references in subsequently loaded libraries."
552 #: build/C/man3/dlopen.3:157
554 msgid "B<RTLD_NODELETE> (since glibc 2.2)"
557 #. (But it is present on Solaris.)
559 #: build/C/man3/dlopen.3:167
561 "Do not unload the library during B<dlclose>(). Consequently, the library's "
562 "static variables are not reinitialized if the library is reloaded with "
563 "B<dlopen>() at a later time. This flag is not specified in POSIX.1-2001."
567 #: build/C/man3/dlopen.3:167
569 msgid "B<RTLD_NOLOAD> (since glibc 2.2)"
572 #. (But it is present on Solaris.)
574 #: build/C/man3/dlopen.3:182
576 "Don't load the library. This can be used to test if the library is already "
577 "resident (B<dlopen>() returns NULL if it is not, or the library's handle if "
578 "it is resident). This flag can also be used to promote the flags on a "
579 "library that is already loaded. For example, a library that was previously "
580 "loaded with B<RTLD_LOCAL> can be reopened with B<RTLD_NOLOAD\\ |\\ "
581 "RTLD_GLOBAL>. This flag is not specified in POSIX.1-2001."
585 #: build/C/man3/dlopen.3:182
587 msgid "B<RTLD_DEEPBIND> (since glibc 2.3.4)"
590 #. Inimitably described by UD in
591 #. http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
593 #: build/C/man3/dlopen.3:192
595 "Place the lookup scope of the symbols in this library ahead of the global "
596 "scope. This means that a self-contained library will use its own symbols in "
597 "preference to global symbols with the same name contained in libraries that "
598 "have already been loaded. This flag is not specified in POSIX.1-2001."
602 #: build/C/man3/dlopen.3:204
604 "If I<filename> is a NULL pointer, then the returned handle is for the main "
605 "program. When given to B<dlsym>(), this handle causes a search for a symbol "
606 "in the main program, followed by all shared libraries loaded at program "
607 "startup, and then all shared libraries loaded by B<dlopen>() with the flag "
612 #: build/C/man3/dlopen.3:214
614 "External references in the library are resolved using the libraries in that "
615 "library's dependency list and any other libraries previously opened with the "
616 "B<RTLD_GLOBAL> flag. If the executable was linked with the flag "
617 "\"-rdynamic\" (or, synonymously, \"--export-dynamic\"), then the global "
618 "symbols in the executable will also be used to resolve references in a "
619 "dynamically loaded library."
623 #: build/C/man3/dlopen.3:232
625 "If the same library is loaded again with B<dlopen>(), the same file handle "
626 "is returned. The dl library maintains reference counts for library handles, "
627 "so a dynamic library is not deallocated until B<dlclose>() has been called "
628 "on it as many times as B<dlopen>() has succeeded on it. The B<_init>() "
629 "routine, if present, is called only once. But a subsequent call with "
630 "B<RTLD_NOW> may force symbol resolution for a library earlier loaded with "
635 #: build/C/man3/dlopen.3:236
636 msgid "If B<dlopen>() fails for any reason, it returns NULL."
640 #: build/C/man3/dlopen.3:236
646 #: build/C/man3/dlopen.3:265
648 "The function B<dlsym>() takes a \"handle\" of a dynamic library returned by "
649 "B<dlopen>() and the null-terminated symbol name, returning the address "
650 "where that symbol is loaded into memory. If the symbol is not found, in the "
651 "specified library or any of the libraries that were automatically loaded by "
652 "B<dlopen>() when that library was loaded, B<dlsym>() returns NULL. (The "
653 "search performed by B<dlsym>() is breadth first through the dependency tree "
654 "of these libraries.) Since the value of the symbol could actually be NULL "
655 "(so that a NULL return from B<dlsym>() need not indicate an error), the "
656 "correct way to test for an error is to call B<dlerror>() to clear any old "
657 "error conditions, then call B<dlsym>(), and then call B<dlerror>() again, "
658 "saving its return value into a variable, and check whether this saved value "
663 #: build/C/man3/dlopen.3:277
665 "There are two special pseudo-handles, B<RTLD_DEFAULT> and B<RTLD_NEXT>. The "
666 "former will find the first occurrence of the desired symbol using the "
667 "default library search order. The latter will find the next occurrence of a "
668 "function in the search order after the current library. This allows one to "
669 "provide a wrapper around a function in another shared library."
673 #: build/C/man3/dlopen.3:277
679 #: build/C/man3/dlopen.3:284
681 "The function B<dlclose>() decrements the reference count on the dynamic "
682 "library handle I<handle>. If the reference count drops to zero and no other "
683 "loaded libraries use symbols in it, then the dynamic library is unloaded."
687 #: build/C/man3/dlopen.3:288
688 msgid "The function B<dlclose>() returns 0 on success, and nonzero on error."
692 #: build/C/man3/dlopen.3:288
694 msgid "The obsolete symbols _init() and _fini()"
698 #: build/C/man3/dlopen.3:306
700 "The linker recognizes special symbols B<_init> and B<_fini>. If a dynamic "
701 "library exports a routine named B<_init>(), then that code is executed after "
702 "the loading, before B<dlopen>() returns. If the dynamic library exports a "
703 "routine named B<_fini>(), then that routine is called just before the "
704 "library is unloaded. In case you need to avoid linking against the system "
705 "startup files, this can be done by using the B<gcc>(1) I<-nostartfiles> "
706 "command-line option."
709 #. void _init(void) __attribute__((constructor));
710 #. void _fini(void) __attribute__((destructor));
712 #: build/C/man3/dlopen.3:317
714 "Using these routines, or the gcc B<-nostartfiles> or B<-nostdlib> options, "
715 "is not recommended. Their use may result in undesired behavior, since the "
716 "constructor/destructor routines will not be executed (unless special "
717 "measures are taken)."
721 #: build/C/man3/dlopen.3:329
723 "Instead, libraries should export routines using the "
724 "B<__attribute__((constructor))> and B<__attribute__((destructor))> function "
725 "attributes. See the gcc info pages for information on these. Constructor "
726 "routines are executed before B<dlopen>() returns, and destructor routines "
727 "are executed before B<dlclose>() returns."
731 #: build/C/man3/dlopen.3:329
733 msgid "Glibc extensions: dladdr() and dlvsym()"
737 #: build/C/man3/dlopen.3:331
738 msgid "Glibc adds two functions not described by POSIX, with prototypes"
742 #: build/C/man3/dlopen.3:335
745 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
746 "B<#include E<lt>dlfcn.hE<gt>>\n"
750 #: build/C/man3/dlopen.3:337
752 msgid "B<int dladdr(void *>I<addr>B<, Dl_info *>I<info>B<);>\n"
756 #: build/C/man3/dlopen.3:339
759 "B<void *dlvsym(void *>I<handle>B<, char *>I<symbol>B<, char "
760 "*>I<version>B<);>\n"
764 #: build/C/man3/dlopen.3:348
766 "The function B<dladdr>() takes a function pointer and tries to resolve name "
767 "and file where it is located. Information is stored in the I<Dl_info> "
772 #: build/C/man3/dlopen.3:361
776 " const char *dli_fname; /* Pathname of shared object that\n"
777 " contains address */\n"
778 " void *dli_fbase; /* Address at which shared object\n"
780 " const char *dli_sname; /* Name of nearest symbol with address\n"
781 " lower than I<addr> */\n"
782 " void *dli_saddr; /* Exact address of symbol named\n"
783 " in I<dli_sname> */\n"
788 #: build/C/man3/dlopen.3:371
790 "If no symbol matching I<addr> could be found, then I<dli_sname> and "
791 "I<dli_saddr> are set to NULL."
795 #: build/C/man3/dlopen.3:374
796 msgid "B<dladdr>() returns 0 on error, and nonzero on success."
800 #: build/C/man3/dlopen.3:381
802 "The function B<dlvsym>(), provided by glibc since version 2.1, does the same "
803 "as B<dlsym>() but takes a version string as an additional argument."
807 #: build/C/man3/dlopen.3:388
809 "POSIX.1-2001 describes B<dlclose>(), B<dlerror>(), B<dlopen>(), and "
814 #: build/C/man3/dlopen.3:388 build/C/man5/elf.5:1912 build/C/man3/end.3:53 build/C/man8/ld.so.8:480 build/C/man1/ldd.1:74 build/C/man7/rtld-audit.7:467
820 #. The string returned by
822 #. should not be modified.
823 #. Some systems give the prototype as
826 #. .B "const char *dlerror(void);"
829 #: build/C/man3/dlopen.3:407
831 "The symbols B<RTLD_DEFAULT> and B<RTLD_NEXT> are defined by "
832 "I<E<lt>dlfcn.hE<gt>> only when B<_GNU_SOURCE> was defined before including "
837 #: build/C/man3/dlopen.3:412
839 "Since glibc 2.2.3, B<atexit>(3) can be used to register an exit handler "
840 "that is automatically called when a library is unloaded."
844 #: build/C/man3/dlopen.3:412
850 #: build/C/man3/dlopen.3:418
852 "The dlopen interface standard comes from SunOS. That system also has "
853 "B<dladdr>(), but not B<dlvsym>()."
857 #: build/C/man3/dlopen.3:418 build/C/man1/ldd.1:91 build/C/man7/rtld-audit.7:492
863 #: build/C/man3/dlopen.3:430
865 "Sometimes, the function pointers you pass to B<dladdr>() may surprise you. "
866 "On some architectures (notably i386 and x86_64), I<dli_fname> and "
867 "I<dli_fbase> may end up pointing back at the object from which you called "
868 "B<dladdr>(), even if the function used as an argument should come from a "
869 "dynamically linked library."
873 #: build/C/man3/dlopen.3:446
875 "The problem is that the function pointer will still be resolved at compile "
876 "time, but merely point to the I<plt> (Procedure Linkage Table) section of "
877 "the original object (which dispatches the call after asking the dynamic "
878 "linker to resolve the symbol). To work around this, you can try to compile "
879 "the code to be position-independent: then, the compiler cannot prepare the "
880 "pointer at compile time anymore and today's B<gcc>(1) will generate code "
881 "that just loads the final symbol address from the I<got> (Global Offset "
882 "Table) at run time before passing it to B<dladdr>()."
886 #: build/C/man3/dlopen.3:448
887 msgid "Load the math library, and print the cosine of 2.0:"
891 #: build/C/man3/dlopen.3:453
894 "#include E<lt>stdio.hE<gt>\n"
895 "#include E<lt>stdlib.hE<gt>\n"
896 "#include E<lt>dlfcn.hE<gt>\n"
900 #: build/C/man3/dlopen.3:460
904 "main(int argc, char **argv)\n"
907 " double (*cosine)(double);\n"
912 #: build/C/man3/dlopen.3:466
915 " handle = dlopen(\"libm.so\", RTLD_LAZY);\n"
917 " fprintf(stderr, \"%s\\en\", dlerror());\n"
918 " exit(EXIT_FAILURE);\n"
923 #: build/C/man3/dlopen.3:468
925 msgid " dlerror(); /* Clear any existing error */\n"
929 #: build/C/man3/dlopen.3:475
932 " /* Writing: cosine = (double (*)(double)) dlsym(handle, \"cos\");\n"
933 " would seem more natural, but the C99 standard leaves\n"
934 " casting from \"void *\" to a function pointer undefined.\n"
935 " The assignment used below is the POSIX.1-2003 (Technical\n"
936 " Corrigendum 1) workaround; see the Rationale for the\n"
937 " POSIX specification of dlsym(). */\n"
940 #. But in fact "gcc -O2 -Wall" will complain about the preceding cast.
942 #: build/C/man3/dlopen.3:478
944 msgid " *(void **) (&cosine) = dlsym(handle, \"cos\");\n"
948 #: build/C/man3/dlopen.3:483
951 " if ((error = dlerror()) != NULL) {\n"
952 " fprintf(stderr, \"%s\\en\", error);\n"
953 " exit(EXIT_FAILURE);\n"
958 #: build/C/man3/dlopen.3:488
961 " printf(\"%f\\en\", (*cosine)(2.0));\n"
962 " dlclose(handle);\n"
963 " exit(EXIT_SUCCESS);\n"
968 #: build/C/man3/dlopen.3:492
970 "If this program were in a file named \"foo.c\", you would build the program "
971 "with the following command:"
975 #: build/C/man3/dlopen.3:495
977 msgid " gcc -rdynamic -o foo foo.c -ldl\n"
981 #: build/C/man3/dlopen.3:505
983 "Libraries exporting B<_init>() and B<_fini>() will want to be compiled as "
984 "follows, using I<bar.c> as the example name:"
988 #: build/C/man3/dlopen.3:508
990 msgid " gcc -shared -nostartfiles -o bar bar.c\n"
994 #: build/C/man3/dlopen.3:516
996 "B<ld>(1), B<ldd>(1), B<dl_iterate_phdr>(3), B<rtld-audit>(7), B<ld.so>(8), "
1001 #: build/C/man3/dlopen.3:518
1002 msgid "ld.so info pages, gcc info pages, ld info pages"
1006 #: build/C/man5/elf.5:35
1012 #: build/C/man5/elf.5:35
1018 #: build/C/man5/elf.5:38
1019 msgid "elf - format of Executable and Linking Format (ELF) files"
1022 #. .B #include <elf_abi.h>
1024 #: build/C/man5/elf.5:42
1026 msgid "B<#include E<lt>elf.hE<gt>>\n"
1030 #: build/C/man5/elf.5:50
1032 "The header file I<E<lt>elf.hE<gt>> defines the format of ELF executable "
1033 "binary files. Amongst these files are normal executable files, relocatable "
1034 "object files, core files and shared libraries."
1038 #: build/C/man5/elf.5:59
1040 "An executable file using the ELF file format consists of an ELF header, "
1041 "followed by a program header table or a section header table, or both. The "
1042 "ELF header is always at offset zero of the file. The program header table "
1043 "and the section header table's offset in the file are defined in the ELF "
1044 "header. The two tables describe the rest of the particularities of the "
1048 #. Applications which wish to process ELF binary files for their native
1049 #. architecture only should include
1051 #. in their source code.
1052 #. These applications should need to refer to
1053 #. all the types and structures by their generic names
1055 #. and to the macros by
1057 #. Applications written this way can be compiled on any architecture,
1058 #. regardless of whether the host is 32-bit or 64-bit.
1060 #. Should an application need to process ELF files of an unknown
1061 #. architecture, then the application needs to explicitly use either
1065 #. type and structure names.
1066 #. Likewise, the macros need to be identified by
1072 #: build/C/man5/elf.5:86
1074 "This header file describes the above mentioned headers as C structures and "
1075 "also includes structures for dynamic sections, relocation sections and "
1080 #: build/C/man5/elf.5:98
1082 "The following types are used for N-bit architectures (N=32,64, I<ElfN> "
1083 "stands for I<Elf32> or I<Elf64>, I<uintN_t> stands for I<uint32_t> or "
1087 #. Elf32_Size Unsigned object size
1089 #: build/C/man5/elf.5:112
1092 "ElfN_Addr Unsigned program address, uintN_t\n"
1093 "ElfN_Off Unsigned file offset, uintN_t\n"
1094 "ElfN_Section Unsigned section index, uint16_t\n"
1095 "ElfN_Versym Unsigned version symbol information, uint16_t\n"
1096 "Elf_Byte unsigned char\n"
1097 "ElfN_Half uint16_t\n"
1098 "ElfN_Sword int32_t\n"
1099 "ElfN_Word uint32_t\n"
1100 "ElfN_Sxword int64_t\n"
1101 "ElfN_Xword uint64_t\n"
1105 #: build/C/man5/elf.5:127
1107 "(Note: The *BSD terminology is a bit different. There I<Elf64_Half> is "
1108 "twice as large as I<Elf32_Half>, and I<Elf64Quarter> is used for "
1109 "I<uint16_t>. In order to avoid confusion these types are replaced by "
1110 "explicit ones in the below.)"
1114 #: build/C/man5/elf.5:134
1116 "All data structures that the file format defines follow the \"natural\" size "
1117 "and alignment guidelines for the relevant class. If necessary, data "
1118 "structures contain explicit padding to ensure 4-byte alignment for 4-byte "
1119 "objects, to force structure sizes to a multiple of 4, etc."
1123 #: build/C/man5/elf.5:139
1124 msgid "The ELF header is described by the type I<Elf32_Ehdr> or I<Elf64_Ehdr>:"
1128 #: build/C/man5/elf.5:143
1130 msgid "#define EI_NIDENT 16\n"
1134 #: build/C/man5/elf.5:160
1137 "typedef struct {\n"
1138 " unsigned char e_ident[EI_NIDENT];\n"
1139 " uint16_t e_type;\n"
1140 " uint16_t e_machine;\n"
1141 " uint32_t e_version;\n"
1142 " ElfN_Addr e_entry;\n"
1143 " ElfN_Off e_phoff;\n"
1144 " ElfN_Off e_shoff;\n"
1145 " uint32_t e_flags;\n"
1146 " uint16_t e_ehsize;\n"
1147 " uint16_t e_phentsize;\n"
1148 " uint16_t e_phnum;\n"
1149 " uint16_t e_shentsize;\n"
1150 " uint16_t e_shnum;\n"
1151 " uint16_t e_shstrndx;\n"
1155 #. .Bl -tag -width "e_phentsize"
1157 #: build/C/man5/elf.5:165
1158 msgid "The fields have the following meanings:"
1162 #: build/C/man5/elf.5:165
1168 #: build/C/man5/elf.5:175
1170 "This array of bytes specifies to interpret the file, independent of the "
1171 "processor or the file's remaining contents. Within this array everything is "
1172 "named by macros, which start with the prefix B<EI_> and may contain values "
1173 "which start with the prefix B<ELF>. The following macros are defined:"
1177 #: build/C/man5/elf.5:177
1183 #: build/C/man5/elf.5:183
1185 "The first byte of the magic number. It must be filled with B<ELFMAG0>. (0: "
1190 #: build/C/man5/elf.5:183
1196 #: build/C/man5/elf.5:189
1198 "The second byte of the magic number. It must be filled with B<ELFMAG1>. "
1203 #: build/C/man5/elf.5:189
1209 #: build/C/man5/elf.5:195
1211 "The third byte of the magic number. It must be filled with B<ELFMAG2>. (2: "
1216 #: build/C/man5/elf.5:195
1222 #: build/C/man5/elf.5:201
1224 "The fourth byte of the magic number. It must be filled with B<ELFMAG3>. "
1229 #: build/C/man5/elf.5:201
1235 #: build/C/man5/elf.5:204
1236 msgid "The fifth byte identifies the architecture for this binary:"
1240 #: build/C/man5/elf.5:206
1242 msgid "B<ELFCLASSNONE>"
1246 #: build/C/man5/elf.5:210
1247 msgid "This class is invalid."
1251 #: build/C/man5/elf.5:210
1253 msgid "B<ELFCLASS32>"
1257 #: build/C/man5/elf.5:215
1259 "This defines the 32-bit architecture. It supports machines with files and "
1260 "virtual address spaces up to 4 Gigabytes."
1264 #: build/C/man5/elf.5:215
1266 msgid "B<ELFCLASS64>"
1270 #: build/C/man5/elf.5:218
1271 msgid "This defines the 64-bit architecture."
1275 #: build/C/man5/elf.5:221
1280 #. .Bl -tag -width "ELFDATA2LSB" -compact
1282 #: build/C/man5/elf.5:227
1284 "The sixth byte specifies the data encoding of the processor-specific data in "
1285 "the file. Currently these encodings are supported:"
1289 #: build/C/man5/elf.5:228
1291 msgid "B<ELFDATANONE>"
1295 #: build/C/man5/elf.5:232
1296 msgid "Unknown data format."
1300 #: build/C/man5/elf.5:232
1302 msgid "B<ELFDATA2LSB>"
1306 #: build/C/man5/elf.5:235
1307 msgid "Two's complement, little-endian."
1311 #: build/C/man5/elf.5:235
1313 msgid "B<ELFDATA2MSB>"
1317 #: build/C/man5/elf.5:238
1318 msgid "Two's complement, big-endian."
1322 #: build/C/man5/elf.5:241
1324 msgid "B<EI_VERSION>"
1327 #. .Bl -tag -width "EV_CURRENT" -compact
1329 #: build/C/man5/elf.5:246
1330 msgid "The seventh byte is the version number of the ELF specification:"
1334 #: build/C/man5/elf.5:247 build/C/man5/elf.5:501
1340 #: build/C/man5/elf.5:250 build/C/man5/elf.5:505
1341 msgid "Invalid version."
1345 #: build/C/man5/elf.5:250 build/C/man5/elf.5:505
1347 msgid "B<EV_CURRENT>"
1352 #: build/C/man5/elf.5:253 build/C/man5/elf.5:509
1353 msgid "Current version."
1357 #: build/C/man5/elf.5:256
1362 #. .Bl -tag -width "ELFOSABI_STANDALONE" -compact
1364 #: build/C/man5/elf.5:265
1366 "The eighth byte identifies the operating system and ABI to which the object "
1367 "is targeted. Some fields in other ELF structures have flags and values that "
1368 "have platform-specific meanings; the interpretation of those fields is "
1369 "determined by the value of this byte. E.g.:"
1373 #: build/C/man5/elf.5:266
1375 msgid "B<ELFOSABI_NONE>"
1380 #: build/C/man5/elf.5:271
1381 msgid "Same as ELFOSABI_SYSV"
1385 #: build/C/man5/elf.5:271
1387 msgid "B<ELFOSABI_SYSV>"
1391 #. synonym: ELFOSABI_NONE
1393 #: build/C/man5/elf.5:276
1394 msgid "UNIX System V ABI."
1398 #: build/C/man5/elf.5:276
1400 msgid "B<ELFOSABI_HPUX>"
1405 #: build/C/man5/elf.5:280
1410 #: build/C/man5/elf.5:280
1412 msgid "B<ELFOSABI_NETBSD>"
1417 #: build/C/man5/elf.5:284
1422 #: build/C/man5/elf.5:284
1424 msgid "B<ELFOSABI_LINUX>"
1429 #. .BR ELFOSABI_HURD
1433 #. .BR ELFOSABI_86OPEN
1434 #. 86Open Common IA32 ABI.
1437 #: build/C/man5/elf.5:296
1442 #: build/C/man5/elf.5:296
1444 msgid "B<ELFOSABI_SOLARIS>"
1449 #. .BR ELFOSABI_MONTEREY
1450 #. Monterey project ABI.
1455 #: build/C/man5/elf.5:306
1456 msgid "Solaris ABI."
1460 #: build/C/man5/elf.5:306
1462 msgid "B<ELFOSABI_IRIX>"
1467 #: build/C/man5/elf.5:310
1472 #: build/C/man5/elf.5:310
1474 msgid "B<ELFOSABI_FREEBSD>"
1479 #: build/C/man5/elf.5:314
1480 msgid "FreeBSD ABI."
1484 #: build/C/man5/elf.5:314
1486 msgid "B<ELFOSABI_TRU64>"
1495 #: build/C/man5/elf.5:322
1496 msgid "TRU64 UNIX ABI."
1500 #: build/C/man5/elf.5:322
1502 msgid "B<ELFOSABI_ARM>"
1507 #: build/C/man5/elf.5:326
1508 msgid "ARM architecture ABI."
1512 #: build/C/man5/elf.5:326
1514 msgid "B<ELFOSABI_STANDALONE>"
1520 #: build/C/man5/elf.5:331
1521 msgid "Stand-alone (embedded) ABI."
1525 #: build/C/man5/elf.5:333
1527 msgid "B<EI_ABIVERSION>"
1531 #: build/C/man5/elf.5:343
1533 "The ninth byte identifies the version of the ABI to which the object is "
1534 "targeted. This field is used to distinguish among incompatible versions of "
1535 "an ABI. The interpretation of this version number is dependent on the ABI "
1536 "identified by the B<EI_OSABI> field. Applications conforming to this "
1537 "specification use the value 0."
1541 #: build/C/man5/elf.5:343
1546 #. As reported by Yuri Kozlov and confirmed by Mike Frysinger, EI_BRAND is
1547 #. not in GABI (http://www.sco.com/developers/gabi/latest/ch4.eheader.html)
1548 #. It looks to be a BSDism
1551 #. Start of architecture identification.
1553 #: build/C/man5/elf.5:359
1555 "Start of padding. These bytes are reserved and set to zero. Programs which "
1556 "read them should ignore them. The value for B<EI_PAD> will change in the "
1557 "future if currently unused bytes are given meanings."
1561 #: build/C/man5/elf.5:359
1563 msgid "B<EI_NIDENT>"
1568 #: build/C/man5/elf.5:365
1569 msgid "The size of the I<e_ident> array."
1573 #: build/C/man5/elf.5:366
1579 #: build/C/man5/elf.5:369
1580 msgid "This member of the structure identifies the object file type:"
1584 #: build/C/man5/elf.5:371
1590 #: build/C/man5/elf.5:375
1591 msgid "An unknown type."
1595 #: build/C/man5/elf.5:375
1601 #: build/C/man5/elf.5:378
1602 msgid "A relocatable file."
1606 #: build/C/man5/elf.5:378
1612 #: build/C/man5/elf.5:381
1613 msgid "An executable file."
1617 #: build/C/man5/elf.5:381
1623 #: build/C/man5/elf.5:384
1624 msgid "A shared object."
1628 #: build/C/man5/elf.5:384
1634 #: build/C/man5/elf.5:387
1635 msgid "A core file."
1639 #: build/C/man5/elf.5:390
1641 msgid "I<e_machine>"
1645 #: build/C/man5/elf.5:394
1647 "This member specifies the required architecture for an individual file. "
1652 #: build/C/man5/elf.5:396
1659 #: build/C/man5/elf.5:401
1660 msgid "An unknown machine."
1664 #: build/C/man5/elf.5:401
1671 #: build/C/man5/elf.5:405
1672 msgid "AT&T WE 32100."
1676 #: build/C/man5/elf.5:405
1683 #: build/C/man5/elf.5:409
1684 msgid "Sun Microsystems SPARC."
1688 #: build/C/man5/elf.5:409
1695 #: build/C/man5/elf.5:413
1696 msgid "Intel 80386."
1700 #: build/C/man5/elf.5:413
1707 #: build/C/man5/elf.5:417
1708 msgid "Motorola 68000."
1712 #: build/C/man5/elf.5:417
1723 #: build/C/man5/elf.5:425
1724 msgid "Motorola 88000."
1728 #: build/C/man5/elf.5:425
1735 #: build/C/man5/elf.5:429
1736 msgid "Intel 80860."
1740 #: build/C/man5/elf.5:429
1749 #. .BR EM_MIPS_RS4_BE
1750 #. MIPS RS4000 (big-endian only). Deprecated.
1752 #. EM_MIPS_RS3_LE (MIPS R3000 little-endian)
1755 #: build/C/man5/elf.5:441
1756 msgid "MIPS RS3000 (big-endian only)."
1760 #: build/C/man5/elf.5:441
1762 msgid "B<EM_PARISC>"
1767 #: build/C/man5/elf.5:445
1772 #: build/C/man5/elf.5:445
1774 msgid "B<EM_SPARC32PLUS>"
1779 #: build/C/man5/elf.5:449
1780 msgid "SPARC with enhanced instruction set."
1784 #: build/C/man5/elf.5:449
1791 #: build/C/man5/elf.5:453
1796 #: build/C/man5/elf.5:453
1803 #: build/C/man5/elf.5:457
1804 msgid "PowerPC 64-bit."
1808 #: build/C/man5/elf.5:457
1815 #: build/C/man5/elf.5:461
1820 #: build/C/man5/elf.5:461
1827 #: build/C/man5/elf.5:465
1828 msgid "Advanced RISC Machines"
1832 #: build/C/man5/elf.5:465
1839 #: build/C/man5/elf.5:469
1840 msgid "Renesas SuperH"
1844 #: build/C/man5/elf.5:469
1846 msgid "B<EM_SPARCV9>"
1851 #: build/C/man5/elf.5:473
1852 msgid "SPARC v9 64-bit."
1856 #: build/C/man5/elf.5:473
1863 #: build/C/man5/elf.5:477
1864 msgid "Intel Itanium"
1868 #: build/C/man5/elf.5:477
1870 msgid "B<EM_X86_64>"
1875 #: build/C/man5/elf.5:481
1880 #: build/C/man5/elf.5:481
1890 #. Compaq [DEC] Alpha.
1893 #. Compaq [DEC] Alpha with enhanced instruction set.
1895 #: build/C/man5/elf.5:493
1900 #: build/C/man5/elf.5:496
1902 msgid "I<e_version>"
1905 #. .Bl -tag -width "EV_CURRENT" -compact
1907 #: build/C/man5/elf.5:500
1908 msgid "This member identifies the file version:"
1912 #: build/C/man5/elf.5:511
1918 #: build/C/man5/elf.5:517
1920 "This member gives the virtual address to which the system first transfers "
1921 "control, thus starting the process. If the file has no associated entry "
1922 "point, this member holds zero."
1926 #: build/C/man5/elf.5:517
1932 #: build/C/man5/elf.5:522
1934 "This member holds the program header table's file offset in bytes. If the "
1935 "file has no program header table, this member holds zero."
1939 #: build/C/man5/elf.5:522
1945 #: build/C/man5/elf.5:527
1947 "This member holds the section header table's file offset in bytes. If the "
1948 "file has no section header table this member holds zero."
1952 #: build/C/man5/elf.5:527
1958 #: build/C/man5/elf.5:532
1960 "This member holds processor-specific flags associated with the file. Flag "
1961 "names take the form EF_`machine_flag'. Currently no flags have been "
1966 #: build/C/man5/elf.5:532
1972 #: build/C/man5/elf.5:535
1973 msgid "This member holds the ELF header's size in bytes."
1977 #: build/C/man5/elf.5:535
1979 msgid "I<e_phentsize>"
1983 #: build/C/man5/elf.5:539
1985 "This member holds the size in bytes of one entry in the file's program "
1986 "header table; all entries are the same size."
1990 #: build/C/man5/elf.5:539
1996 #: build/C/man5/elf.5:552
1998 "This member holds the number of entries in the program header table. Thus "
1999 "the product of I<e_phentsize> and I<e_phnum> gives the table's size in "
2000 "bytes. If a file has no program header, I<e_phnum> holds the value zero."
2003 #. This is a Linux extension, added in Linux 2.6.34.
2004 #. .Bl -tag -width "PN_XNUM"
2006 #: build/C/man5/elf.5:566
2008 "If the number of entries in the program header table is larger than or equal "
2009 "to B<PN_XNUM> (0xffff), this member holds B<PN_XNUM> (0xffff) and the real "
2010 "number of entries in the program header table is held in the I<sh_info> "
2011 "member of the initial entry in section header table. Otherwise, the "
2012 "I<sh_info> member of the initial entry contains the value zero."
2016 #: build/C/man5/elf.5:567
2022 #: build/C/man5/elf.5:572
2024 "This is defined as 0xffff, the largest number I<e_phnum> can have, "
2025 "specifying where the actual number of program headers is assigned."
2029 #: build/C/man5/elf.5:576
2031 msgid "I<e_shentsize>"
2035 #: build/C/man5/elf.5:581
2037 "This member holds a sections header's size in bytes. A section header is "
2038 "one entry in the section header table; all entries are the same size."
2042 #: build/C/man5/elf.5:581
2048 #: build/C/man5/elf.5:594
2050 "This member holds the number of entries in the section header table. Thus "
2051 "the product of I<e_shentsize> and I<e_shnum> gives the section header "
2052 "table's size in bytes. If a file has no section header table, I<e_shnum> "
2053 "holds the value of zero."
2057 #: build/C/man5/elf.5:606
2059 "If the number of entries in the section header table is larger than or equal "
2060 "to B<SHN_LORESERVE> (0xff00), I<e_shnum> holds the value zero and the real "
2061 "number of entries in the section header table is held in the I<sh_size> "
2062 "member of the initial entry in section header table. Otherwise, the "
2063 "I<sh_size> member of the initial entry in the section header table holds the "
2068 #: build/C/man5/elf.5:606
2070 msgid "I<e_shstrndx>"
2074 #: build/C/man5/elf.5:613
2076 "This member holds the section header table index of the entry associated "
2077 "with the section name string table. If the file has no section name string "
2078 "table, this member holds the value B<SHN_UNDEF>."
2082 #: build/C/man5/elf.5:625
2084 "If the index of section name string table section is larger than or equal to "
2085 "B<SHN_LORESERVE> (0xff00), this member holds B<SHN_XINDEX> (0xffff) and the "
2086 "real index of the section name string table section is held in the "
2087 "I<sh_link> member of the initial entry in section header table. Otherwise, "
2088 "the I<sh_link> member of the initial entry in section header table contains "
2093 #: build/C/man5/elf.5:627 build/C/man5/elf.5:914
2095 msgid "B<SHN_UNDEF>"
2099 #: build/C/man5/elf.5:636
2101 "This value marks an undefined, missing, irrelevant, or otherwise meaningless "
2102 "section reference. For example, a symbol \"defined\" relative to section "
2103 "number B<SHN_UNDEF> is an undefined symbol."
2107 #: build/C/man5/elf.5:636 build/C/man5/elf.5:918
2109 msgid "B<SHN_LORESERVE>"
2113 #: build/C/man5/elf.5:639 build/C/man5/elf.5:921
2114 msgid "This value specifies the lower bound of the range of reserved indices."
2118 #: build/C/man5/elf.5:639 build/C/man5/elf.5:921
2120 msgid "B<SHN_LOPROC>"
2124 #: build/C/man5/elf.5:644 build/C/man5/elf.5:926
2126 "Values greater than or equal to B<SHN_HIPROC> are reserved for "
2127 "processor-specific semantics."
2131 #: build/C/man5/elf.5:644 build/C/man5/elf.5:926
2133 msgid "B<SHN_HIPROC>"
2137 #: build/C/man5/elf.5:649 build/C/man5/elf.5:931
2139 "Values less than or equal to B<SHN_LOPROC> are reserved for "
2140 "processor-specific semantics."
2144 #: build/C/man5/elf.5:649 build/C/man5/elf.5:931
2150 #: build/C/man5/elf.5:656
2152 "This value specifies absolute values for the corresponding reference. For "
2153 "example, symbols defined relative to section number B<SHN_ABS> have absolute "
2154 "values and are not affected by relocation."
2158 #: build/C/man5/elf.5:656 build/C/man5/elf.5:938
2160 msgid "B<SHN_COMMON>"
2164 #: build/C/man5/elf.5:660
2166 "Symbols defined relative to this section are common symbols, such as Fortran "
2167 "COMMON or unallocated C external variables."
2171 #: build/C/man5/elf.5:660 build/C/man5/elf.5:942
2173 msgid "B<SHN_HIRESERVE>"
2177 #: build/C/man5/elf.5:673
2179 "This value specifies the upper bound of the range of reserved indices "
2180 "between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, inclusive; the values do not "
2181 "reference the section header table. That is, the section header table does "
2182 "I<not> contain entries for the reserved indices."
2186 #: build/C/man5/elf.5:695
2188 "An executable or shared object file's program header table is an array of "
2189 "structures, each describing a segment or other information the system needs "
2190 "to prepare the program for execution. An object file I<segment> contains "
2191 "one or more I<sections>. Program headers are meaningful only for executable "
2192 "and shared object files. A file specifies its own program header size with "
2193 "the ELF header's I<e_phentsize> and I<e_phnum> members. The ELF program "
2194 "header is described by the type I<Elf32_Phdr> or I<Elf64_Phdr> depending on "
2199 #: build/C/man5/elf.5:708
2202 "typedef struct {\n"
2203 " uint32_t p_type;\n"
2204 " Elf32_Off p_offset;\n"
2205 " Elf32_Addr p_vaddr;\n"
2206 " Elf32_Addr p_paddr;\n"
2207 " uint32_t p_filesz;\n"
2208 " uint32_t p_memsz;\n"
2209 " uint32_t p_flags;\n"
2210 " uint32_t p_align;\n"
2215 #: build/C/man5/elf.5:723
2218 "typedef struct {\n"
2219 " uint32_t p_type;\n"
2220 " uint32_t p_flags;\n"
2221 " Elf64_Off p_offset;\n"
2222 " Elf64_Addr p_vaddr;\n"
2223 " Elf64_Addr p_paddr;\n"
2224 " uint64_t p_filesz;\n"
2225 " uint64_t p_memsz;\n"
2226 " uint64_t p_align;\n"
2230 #. .Bl -tag -width "p_offset"
2232 #: build/C/man5/elf.5:731
2234 "The main difference between the 32-bit and the 64-bit program header lies in "
2235 "the location of the I<p_flags> member in the total struct."
2239 #: build/C/man5/elf.5:731
2244 #. .Bl -tag -width "PT_DYNAMIC"
2246 #: build/C/man5/elf.5:736
2248 "This member of the Phdr struct tells what kind of segment this array element "
2249 "describes or how to interpret the array element's information."
2253 #: build/C/man5/elf.5:737
2259 #: build/C/man5/elf.5:741
2261 "The array element is unused and the other members' values are undefined. "
2262 "This lets the program header have ignored entries."
2266 #: build/C/man5/elf.5:741
2272 #: build/C/man5/elf.5:762
2274 "The array element specifies a loadable segment, described by I<p_filesz> and "
2275 "I<p_memsz>. The bytes from the file are mapped to the beginning of the "
2276 "memory segment. If the segment's memory size I<p_memsz> is larger than the "
2277 "file size I<p_filesz>, the \"extra\" bytes are defined to hold the value 0 "
2278 "and to follow the segment's initialized area. The file size may not be "
2279 "larger than the memory size. Loadable segment entries in the program header "
2280 "table appear in ascending order, sorted on the I<p_vaddr> member."
2284 #: build/C/man5/elf.5:762
2286 msgid "B<PT_DYNAMIC>"
2290 #: build/C/man5/elf.5:765
2291 msgid "The array element specifies dynamic linking information."
2295 #: build/C/man5/elf.5:765
2297 msgid "B<PT_INTERP>"
2301 #: build/C/man5/elf.5:773
2303 "The array element specifies the location and size of a null-terminated "
2304 "pathname to invoke as an interpreter. This segment type is meaningful only "
2305 "for executable files (though it may occur for shared objects). However it "
2306 "may not occur more than once in a file. If it is present, it must precede "
2307 "any loadable segment entry."
2311 #: build/C/man5/elf.5:773
2317 #: build/C/man5/elf.5:776
2318 msgid "The array element specifies the location and size for auxiliary information."
2322 #: build/C/man5/elf.5:776
2328 #: build/C/man5/elf.5:781
2330 "This segment type is reserved but has unspecified semantics. Programs that "
2331 "contain an array element of this type do not conform to the ABI."
2335 #: build/C/man5/elf.5:781
2341 #: build/C/man5/elf.5:790
2343 "The array element, if present, specifies the location and size of the "
2344 "program header table itself, both in the file and in the memory image of the "
2345 "program. This segment type may not occur more than once in a file. "
2346 "Moreover, it may occur only if the program header table is part of the "
2347 "memory image of the program. If it is present, it must precede any loadable "
2352 #: build/C/man5/elf.5:790
2354 msgid "B<PT_LOPROC>"
2358 #: build/C/man5/elf.5:795
2360 "Values greater than or equal to B<PT_HIPROC> are reserved for "
2361 "processor-specific semantics."
2365 #: build/C/man5/elf.5:795
2367 msgid "B<PT_HIPROC>"
2371 #: build/C/man5/elf.5:800
2373 "Values less than or equal to B<PT_LOPROC> are reserved for "
2374 "processor-specific semantics."
2378 #: build/C/man5/elf.5:800
2380 msgid "B<PT_GNU_STACK>"
2385 #: build/C/man5/elf.5:807
2387 "GNU extension which is used by the Linux kernel to control the state of the "
2388 "stack via the flags set in the I<p_flags> member."
2392 #: build/C/man5/elf.5:808
2398 #: build/C/man5/elf.5:812
2400 "This member holds the offset from the beginning of the file at which the "
2401 "first byte of the segment resides."
2405 #: build/C/man5/elf.5:812
2411 #: build/C/man5/elf.5:816
2413 "This member holds the virtual address at which the first byte of the segment "
2414 "resides in memory."
2418 #: build/C/man5/elf.5:816
2424 #: build/C/man5/elf.5:824
2426 "On systems for which physical addressing is relevant, this member is "
2427 "reserved for the segment's physical address. Under BSD this member is not "
2428 "used and must be zero."
2432 #: build/C/man5/elf.5:824
2438 #: build/C/man5/elf.5:828
2440 "This member holds the number of bytes in the file image of the segment. It "
2445 #: build/C/man5/elf.5:828
2451 #: build/C/man5/elf.5:832
2453 "This member holds the number of bytes in the memory image of the segment. "
2458 #: build/C/man5/elf.5:832
2463 #. .Bl -tag -width "PF_X" -compact
2465 #: build/C/man5/elf.5:836
2466 msgid "This member holds a bit mask of flags relevant to the segment:"
2470 #: build/C/man5/elf.5:837
2476 #: build/C/man5/elf.5:841
2477 msgid "An executable segment."
2481 #: build/C/man5/elf.5:841
2487 #: build/C/man5/elf.5:844
2488 msgid "A writable segment."
2492 #: build/C/man5/elf.5:844
2498 #: build/C/man5/elf.5:847
2499 msgid "A readable segment."
2503 #: build/C/man5/elf.5:860
2505 "A text segment commonly has the flags B<PF_X> and B<PF_R>. A data segment "
2506 "commonly has B<PF_X>, B<PF_W> and B<PF_R>."
2510 #: build/C/man5/elf.5:860
2517 #: build/C/man5/elf.5:879
2519 "This member holds the value to which the segments are aligned in memory and "
2520 "in the file. Loadable process segments must have congruent values for "
2521 "I<p_vaddr> and I<p_offset>, modulo the page size. Values of zero and one "
2522 "mean no alignment is required. Otherwise, I<p_align> should be a positive, "
2523 "integral power of two, and I<p_vaddr> should equal I<p_offset>, modulo "
2528 #: build/C/man5/elf.5:896
2530 "A file's section header table lets one locate all the file's sections. The "
2531 "section header table is an array of I<Elf32_Shdr> or I<Elf64_Shdr> "
2532 "structures. The ELF header's I<e_shoff> member gives the byte offset from "
2533 "the beginning of the file to the section header table. I<e_shnum> holds the "
2534 "number of entries the section header table contains. I<e_shentsize> holds "
2535 "the size in bytes of each entry."
2538 #. .Bl -tag -width "SHN_LORESERVE"
2540 #: build/C/man5/elf.5:913
2542 "A section header table index is a subscript into this array. Some section "
2543 "header table indices are reserved: the initial entry and the indices between "
2544 "B<SHN_LORESERVE> and B<SHN_HIRESERVE>. The initial entry is used in ELF "
2545 "extensions for I<e_phnum>, I<e_shnum> and I<e_strndx>; in other cases, each "
2546 "field in the initial entry is set to zero. An object file does not have "
2547 "sections for these special indices:"
2551 #: build/C/man5/elf.5:918
2553 "This value marks an undefined, missing, irrelevant or otherwise meaningless "
2554 "section reference."
2558 #: build/C/man5/elf.5:938
2560 "This value specifies the absolute value for the corresponding reference. "
2561 "For example, a symbol defined relative to section number B<SHN_ABS> has an "
2562 "absolute value and is not affected by relocation."
2566 #: build/C/man5/elf.5:942
2568 "Symbols defined relative to this section are common symbols, such as FORTRAN "
2569 "COMMON or unallocated C external variables."
2573 #: build/C/man5/elf.5:953
2575 "This value specifies the upper bound of the range of reserved indices. The "
2576 "system reserves indices between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, "
2577 "inclusive. The section header table does not contain entries for the "
2582 #: build/C/man5/elf.5:957
2583 msgid "The section header has the following structure:"
2587 #: build/C/man5/elf.5:972
2590 "typedef struct {\n"
2591 " uint32_t sh_name;\n"
2592 " uint32_t sh_type;\n"
2593 " uint32_t sh_flags;\n"
2594 " Elf32_Addr sh_addr;\n"
2595 " Elf32_Off sh_offset;\n"
2596 " uint32_t sh_size;\n"
2597 " uint32_t sh_link;\n"
2598 " uint32_t sh_info;\n"
2599 " uint32_t sh_addralign;\n"
2600 " uint32_t sh_entsize;\n"
2605 #: build/C/man5/elf.5:989
2608 "typedef struct {\n"
2609 " uint32_t sh_name;\n"
2610 " uint32_t sh_type;\n"
2611 " uint64_t sh_flags;\n"
2612 " Elf64_Addr sh_addr;\n"
2613 " Elf64_Off sh_offset;\n"
2614 " uint64_t sh_size;\n"
2615 " uint32_t sh_link;\n"
2616 " uint32_t sh_info;\n"
2617 " uint64_t sh_addralign;\n"
2618 " uint64_t sh_entsize;\n"
2622 #. .Bl -tag -width "sh_addralign"
2624 #: build/C/man5/elf.5:994
2625 msgid "No real differences exist between the 32-bit and 64-bit section headers."
2629 #: build/C/man5/elf.5:994
2635 #: build/C/man5/elf.5:1000
2637 "This member specifies the name of the section. Its value is an index into "
2638 "the section header string table section, giving the location of a "
2639 "null-terminated string."
2643 #: build/C/man5/elf.5:1000
2648 #. .Bl -tag -width "SHT_PROGBITS"
2650 #: build/C/man5/elf.5:1004
2651 msgid "This member categorizes the section's contents and semantics."
2655 #: build/C/man5/elf.5:1005
2661 #: build/C/man5/elf.5:1012
2663 "This value marks the section header as inactive. It does not have an "
2664 "associated section. Other members of the section header have undefined "
2669 #: build/C/man5/elf.5:1012
2671 msgid "B<SHT_PROGBITS>"
2675 #: build/C/man5/elf.5:1016
2677 "This section holds information defined by the program, whose format and "
2678 "meaning are determined solely by the program."
2682 #: build/C/man5/elf.5:1016
2684 msgid "B<SHT_SYMTAB>"
2688 #: build/C/man5/elf.5:1029
2690 "This section holds a symbol table. Typically, B<SHT_SYMTAB> provides "
2691 "symbols for link editing, though it may also be used for dynamic linking. "
2692 "As a complete symbol table, it may contain many symbols unnecessary for "
2693 "dynamic linking. An object file can also contain a B<SHT_DYNSYM> section."
2697 #: build/C/man5/elf.5:1029
2699 msgid "B<SHT_STRTAB>"
2703 #: build/C/man5/elf.5:1034
2705 "This section holds a string table. An object file may have multiple string "
2710 #: build/C/man5/elf.5:1034
2716 #: build/C/man5/elf.5:1042
2718 "This section holds relocation entries with explicit addends, such as type "
2719 "I<Elf32_Rela> for the 32-bit class of object files. An object may have "
2720 "multiple relocation sections."
2724 #: build/C/man5/elf.5:1042
2730 #: build/C/man5/elf.5:1049
2732 "This section holds a symbol hash table. An object participating in dynamic "
2733 "linking must contain a symbol hash table. An object file may have only one "
2738 #: build/C/man5/elf.5:1049
2740 msgid "B<SHT_DYNAMIC>"
2744 #: build/C/man5/elf.5:1054
2746 "This section holds information for dynamic linking. An object file may have "
2747 "only one dynamic section."
2751 #: build/C/man5/elf.5:1054
2757 #: build/C/man5/elf.5:1057
2758 msgid "This section holds information that marks the file in some way."
2762 #: build/C/man5/elf.5:1057
2764 msgid "B<SHT_NOBITS>"
2768 #: build/C/man5/elf.5:1065
2770 "A section of this type occupies no space in the file but otherwise resembles "
2771 "B<SHT_PROGBITS>. Although this section contains no bytes, the I<sh_offset> "
2772 "member contains the conceptual file offset."
2776 #: build/C/man5/elf.5:1065
2782 #: build/C/man5/elf.5:1073
2784 "This section holds relocation offsets without explicit addends, such as type "
2785 "I<Elf32_Rel> for the 32-bit class of object files. An object file may have "
2786 "multiple relocation sections."
2790 #: build/C/man5/elf.5:1073
2792 msgid "B<SHT_SHLIB>"
2796 #: build/C/man5/elf.5:1076
2797 msgid "This section is reserved but has unspecified semantics."
2801 #: build/C/man5/elf.5:1076
2803 msgid "B<SHT_DYNSYM>"
2807 #: build/C/man5/elf.5:1083
2809 "This section holds a minimal set of dynamic linking symbols. An object file "
2810 "can also contain a B<SHT_SYMTAB> section."
2814 #: build/C/man5/elf.5:1083
2816 msgid "B<SHT_LOPROC>"
2820 #: build/C/man5/elf.5:1088
2822 "This value up to and including B<SHT_HIPROC> is reserved for "
2823 "processor-specific semantics."
2827 #: build/C/man5/elf.5:1088
2829 msgid "B<SHT_HIPROC>"
2833 #: build/C/man5/elf.5:1093
2835 "This value down to and including B<SHT_LOPROC> is reserved for "
2836 "processor-specific semantics."
2840 #: build/C/man5/elf.5:1093
2842 msgid "B<SHT_LOUSER>"
2846 #: build/C/man5/elf.5:1097
2848 "This value specifies the lower bound of the range of indices reserved for "
2849 "application programs."
2853 #: build/C/man5/elf.5:1097
2855 msgid "B<SHT_HIUSER>"
2860 #: build/C/man5/elf.5:1108
2862 "This value specifies the upper bound of the range of indices reserved for "
2863 "application programs. Section types between B<SHT_LOUSER> and B<SHT_HIUSER> "
2864 "may be used by the application, without conflicting with current or future "
2865 "system-defined section types."
2869 #: build/C/man5/elf.5:1109
2874 #. .Bl -tag -width "SHF_EXECINSTR" -compact
2876 #: build/C/man5/elf.5:1122
2878 "Sections support one-bit flags that describe miscellaneous attributes. If a "
2879 "flag bit is set in I<sh_flags>, the attribute is \"on\" for the section. "
2880 "Otherwise, the attribute is \"off\" or does not apply. Undefined attributes "
2885 #: build/C/man5/elf.5:1123
2887 msgid "B<SHF_WRITE>"
2891 #: build/C/man5/elf.5:1127
2892 msgid "This section contains data that should be writable during process execution."
2896 #: build/C/man5/elf.5:1127
2898 msgid "B<SHF_ALLOC>"
2902 #: build/C/man5/elf.5:1134
2904 "This section occupies memory during process execution. Some control "
2905 "sections do not reside in the memory image of an object file. This "
2906 "attribute is off for those sections."
2910 #: build/C/man5/elf.5:1134
2912 msgid "B<SHF_EXECINSTR>"
2916 #: build/C/man5/elf.5:1137
2917 msgid "This section contains executable machine instructions."
2921 #: build/C/man5/elf.5:1137
2923 msgid "B<SHF_MASKPROC>"
2927 #: build/C/man5/elf.5:1141
2929 "All bits included in this mask are reserved for processor-specific "
2934 #: build/C/man5/elf.5:1143
2940 #: build/C/man5/elf.5:1148
2942 "If this section appears in the memory image of a process, this member holds "
2943 "the address at which the section's first byte should reside. Otherwise, the "
2944 "member contains zero."
2948 #: build/C/man5/elf.5:1148
2950 msgid "I<sh_offset>"
2954 #: build/C/man5/elf.5:1157
2956 "This member's value holds the byte offset from the beginning of the file to "
2957 "the first byte in the section. One section type, B<SHT_NOBITS>, occupies no "
2958 "space in the file, and its I<sh_offset> member locates the conceptual "
2959 "placement in the file."
2963 #: build/C/man5/elf.5:1157
2969 #: build/C/man5/elf.5:1169
2971 "This member holds the section's size in bytes. Unless the section type is "
2972 "B<SHT_NOBITS>, the section occupies I<sh_size> bytes in the file. A section "
2973 "of type B<SHT_NOBITS> may have a nonzero size, but it occupies no space in "
2978 #: build/C/man5/elf.5:1169
2984 #: build/C/man5/elf.5:1173
2986 "This member holds a section header table index link, whose interpretation "
2987 "depends on the section type."
2991 #: build/C/man5/elf.5:1173
2997 #: build/C/man5/elf.5:1177
2999 "This member holds extra information, whose interpretation depends on the "
3004 #: build/C/man5/elf.5:1177
3006 msgid "I<sh_addralign>"
3010 #: build/C/man5/elf.5:1190
3012 "Some sections have address alignment constraints. If a section holds a "
3013 "doubleword, the system must ensure doubleword alignment for the entire "
3014 "section. That is, the value of I<sh_addr> must be congruent to zero, modulo "
3015 "the value of I<sh_addralign>. Only zero and positive integral powers of two "
3016 "are allowed. Values of zero or one mean the section has no alignment "
3021 #: build/C/man5/elf.5:1190
3023 msgid "I<sh_entsize>"
3028 #: build/C/man5/elf.5:1197
3030 "Some sections hold a table of fixed-sized entries, such as a symbol table. "
3031 "For such a section, this member gives the size in bytes for each entry. "
3032 "This member contains zero if the section does not hold a table of fixed-size "
3036 #. .Bl -tag -width ".shstrtab"
3038 #: build/C/man5/elf.5:1200
3039 msgid "Various sections hold program and control information:"
3043 #: build/C/man5/elf.5:1200
3049 #: build/C/man5/elf.5:1212
3051 "This section holds uninitialized data that contributes to the program's "
3052 "memory image. By definition, the system initializes the data with zeros "
3053 "when the program begins to run. This section is of type B<SHT_NOBITS>. The "
3054 "attribute types are B<SHF_ALLOC> and B<SHF_WRITE>."
3058 #: build/C/man5/elf.5:1212
3064 #: build/C/man5/elf.5:1218
3066 "This section holds version control information. This section is of type "
3067 "B<SHT_PROGBITS>. No attribute types are used."
3071 #: build/C/man5/elf.5:1218
3077 #: build/C/man5/elf.5:1227
3079 "This section holds initialized pointers to the C++ constructor functions. "
3080 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3081 "B<SHF_ALLOC> and B<SHF_WRITE>."
3085 #: build/C/man5/elf.5:1227
3091 #: build/C/man5/elf.5:1237 build/C/man5/elf.5:1247
3093 "This section holds initialized data that contribute to the program's memory "
3094 "image. This section is of type B<SHT_PROGBITS>. The attribute types are "
3095 "B<SHF_ALLOC> and B<SHF_WRITE>."
3099 #: build/C/man5/elf.5:1237
3105 #: build/C/man5/elf.5:1247
3111 #: build/C/man5/elf.5:1255
3113 "This section holds information for symbolic debugging. The contents are "
3114 "unspecified. This section is of type B<SHT_PROGBITS>. No attribute types "
3119 #: build/C/man5/elf.5:1255
3125 #: build/C/man5/elf.5:1264
3127 "This section holds initialized pointers to the C++ destructor functions. "
3128 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3129 "B<SHF_ALLOC> and B<SHF_WRITE>."
3133 #: build/C/man5/elf.5:1264
3139 #: build/C/man5/elf.5:1277
3141 "This section holds dynamic linking information. The section's attributes "
3142 "will include the B<SHF_ALLOC> bit. Whether the B<SHF_WRITE> bit is set is "
3143 "processor-specific. This section is of type B<SHT_DYNAMIC>. See the "
3148 #: build/C/man5/elf.5:1277
3154 #: build/C/man5/elf.5:1285
3156 "This section holds strings needed for dynamic linking, most commonly the "
3157 "strings that represent the names associated with symbol table entries. This "
3158 "section is of type B<SHT_STRTAB>. The attribute type used is B<SHF_ALLOC>."
3162 #: build/C/man5/elf.5:1285
3168 #: build/C/man5/elf.5:1292
3170 "This section holds the dynamic linking symbol table. This section is of "
3171 "type B<SHT_DYNSYM>. The attribute used is B<SHF_ALLOC>."
3175 #: build/C/man5/elf.5:1292
3181 #: build/C/man5/elf.5:1304
3183 "This section holds executable instructions that contribute to the process "
3184 "termination code. When a program exits normally the system arranges to "
3185 "execute the code in this section. This section is of type B<SHT_PROGBITS>. "
3186 "The attributes used are B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3190 #: build/C/man5/elf.5:1304
3192 msgid "I<.gnu.version>"
3196 #: build/C/man5/elf.5:1313
3198 "This section holds the version symbol table, an array of I<ElfN_Half> "
3199 "elements. This section is of type B<SHT_GNU_versym>. The attribute type "
3200 "used is B<SHF_ALLOC>."
3204 #: build/C/man5/elf.5:1313
3206 msgid "I<.gnu.version_d>"
3210 #: build/C/man5/elf.5:1322
3212 "This section holds the version symbol definitions, a table of I<ElfN_Verdef> "
3213 "structures. This section is of type B<SHT_GNU_verdef>. The attribute type "
3214 "used is B<SHF_ALLOC>."
3218 #: build/C/man5/elf.5:1322
3220 msgid "I<.gnu.version_r>"
3224 #: build/C/man5/elf.5:1332
3226 "This section holds the version symbol needed elements, a table of "
3227 "I<ElfN_Verneed> structures. This section is of type B<SHT_GNU_versym>. The "
3228 "attribute type used is B<SHF_ALLOC>."
3232 #: build/C/man5/elf.5:1332
3238 #: build/C/man5/elf.5:1338
3240 "This section holds the global offset table. This section is of type "
3241 "B<SHT_PROGBITS>. The attributes are processor specific."
3245 #: build/C/man5/elf.5:1338
3251 #: build/C/man5/elf.5:1345
3253 "This section holds a symbol hash table. This section is of type "
3254 "B<SHT_HASH>. The attribute used is B<SHF_ALLOC>."
3258 #: build/C/man5/elf.5:1345
3264 #: build/C/man5/elf.5:1357
3266 "This section holds executable instructions that contribute to the process "
3267 "initialization code. When a program starts to run the system arranges to "
3268 "execute the code in this section before calling the main program entry "
3269 "point. This section is of type B<SHT_PROGBITS>. The attributes used are "
3270 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3274 #: build/C/man5/elf.5:1357
3280 #: build/C/man5/elf.5:1368
3282 "This section holds the pathname of a program interpreter. If the file has a "
3283 "loadable segment that includes the section, the section's attributes will "
3284 "include the B<SHF_ALLOC> bit. Otherwise, that bit will be off. This "
3285 "section is of type B<SHT_PROGBITS>."
3289 #: build/C/man5/elf.5:1368
3295 #: build/C/man5/elf.5:1376
3297 "This section holds line number information for symbolic debugging, which "
3298 "describes the correspondence between the program source and the machine "
3299 "code. The contents are unspecified. This section is of type "
3300 "B<SHT_PROGBITS>. No attribute types are used."
3304 #: build/C/man5/elf.5:1376
3310 #: build/C/man5/elf.5:1389
3312 "This section holds information in the \"Note Section\" format. This section "
3313 "is of type B<SHT_NOTE>. No attribute types are used. OpenBSD native "
3314 "executables usually contain a I<.note.openbsd.ident> section to identify "
3315 "themselves, for the kernel to bypass any compatibility ELF binary emulation "
3316 "tests when loading the file."
3320 #: build/C/man5/elf.5:1389
3322 msgid "I<.note.GNU-stack>"
3326 #: build/C/man5/elf.5:1398
3328 "This section is used in Linux object files for declaring stack attributes. "
3329 "This section is of type B<SHT_PROGBITS>. The only attribute used is "
3330 "B<SHF_EXECINSTR>. This indicates to the GNU linker that the object file "
3331 "requires an executable stack."
3335 #: build/C/man5/elf.5:1398
3341 #: build/C/man5/elf.5:1404
3343 "This section holds the procedure linkage table. This section is of type "
3344 "B<SHT_PROGBITS>. The attributes are processor specific."
3348 #: build/C/man5/elf.5:1404
3354 #: build/C/man5/elf.5:1423
3356 "This section holds relocation information as described below. If the file "
3357 "has a loadable segment that includes relocation, the section's attributes "
3358 "will include the B<SHF_ALLOC> bit. Otherwise the bit will be off. By "
3359 "convention, \"NAME\" is supplied by the section to which the relocations "
3360 "apply. Thus a relocation section for B<.text> normally would have the name "
3361 "B<.rel.text>. This section is of type B<SHT_REL>."
3365 #: build/C/man5/elf.5:1423
3367 msgid "I<.relaNAME>"
3371 #: build/C/man5/elf.5:1442
3373 "This section holds relocation information as described below. If the file "
3374 "has a loadable segment that includes relocation, the section's attributes "
3375 "will include the B<SHF_ALLOC> bit. Otherwise the bit will be off. By "
3376 "convention, \"NAME\" is supplied by the section to which the relocations "
3377 "apply. Thus a relocation section for B<.text> normally would have the name "
3378 "B<.rela.text>. This section is of type B<SHT_RELA>."
3382 #: build/C/man5/elf.5:1442
3388 #: build/C/man5/elf.5:1450 build/C/man5/elf.5:1458
3390 "This section holds read-only data that typically contributes to a "
3391 "nonwritable segment in the process image. This section is of type "
3392 "B<SHT_PROGBITS>. The attribute used is B<SHF_ALLOC>."
3396 #: build/C/man5/elf.5:1450
3402 #: build/C/man5/elf.5:1458
3404 msgid "I<.shstrtab>"
3408 #: build/C/man5/elf.5:1464
3410 "This section holds section names. This section is of type B<SHT_STRTAB>. "
3411 "No attribute types are used."
3415 #: build/C/man5/elf.5:1464
3421 #: build/C/man5/elf.5:1476
3423 "This section holds strings, most commonly the strings that represent the "
3424 "names associated with symbol table entries. If the file has a loadable "
3425 "segment that includes the symbol string table, the section's attributes will "
3426 "include the B<SHF_ALLOC> bit. Otherwise the bit will be off. This section "
3427 "is of type B<SHT_STRTAB>."
3431 #: build/C/man5/elf.5:1476
3437 #: build/C/man5/elf.5:1487
3439 "This section holds a symbol table. If the file has a loadable segment that "
3440 "includes the symbol table, the section's attributes will include the "
3441 "B<SHF_ALLOC> bit. Otherwise the bit will be off. This section is of type "
3446 #: build/C/man5/elf.5:1487
3453 #: build/C/man5/elf.5:1499
3455 "This section holds the \"text\", or executable instructions, of a program. "
3456 "This section is of type B<SHT_PROGBITS>. The attributes used are "
3457 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3461 #: build/C/man5/elf.5:1510
3463 "String table sections hold null-terminated character sequences, commonly "
3464 "called strings. The object file uses these strings to represent symbol and "
3465 "section names. One references a string as an index into the string table "
3466 "section. The first byte, which is index zero, is defined to hold a null "
3467 "byte (\\(aq\\e0\\(aq). Similarly, a string table's last byte is defined to "
3468 "hold a null byte, ensuring null termination for all strings."
3472 #: build/C/man5/elf.5:1515
3474 "An object file's symbol table holds information needed to locate and "
3475 "relocate a program's symbolic definitions and references. A symbol table "
3476 "index is a subscript into this array."
3480 #: build/C/man5/elf.5:1526
3483 "typedef struct {\n"
3484 " uint32_t st_name;\n"
3485 " Elf32_Addr st_value;\n"
3486 " uint32_t st_size;\n"
3487 " unsigned char st_info;\n"
3488 " unsigned char st_other;\n"
3489 " uint16_t st_shndx;\n"
3494 #: build/C/man5/elf.5:1539
3497 "typedef struct {\n"
3498 " uint32_t st_name;\n"
3499 " unsigned char st_info;\n"
3500 " unsigned char st_other;\n"
3501 " uint16_t st_shndx;\n"
3502 " Elf64_Addr st_value;\n"
3503 " uint64_t st_size;\n"
3507 #. .Bl -tag -width "st_value"
3509 #: build/C/man5/elf.5:1545
3511 "The 32-bit and 64-bit versions have the same members, just in a different "
3516 #: build/C/man5/elf.5:1545
3522 #: build/C/man5/elf.5:1553
3524 "This member holds an index into the object file's symbol string table, which "
3525 "holds character representations of the symbol names. If the value is "
3526 "nonzero, it represents a string table index that gives the symbol name. "
3527 "Otherwise, the symbol table has no name."
3531 #: build/C/man5/elf.5:1553
3537 #: build/C/man5/elf.5:1556
3538 msgid "This member gives the value of the associated symbol."
3542 #: build/C/man5/elf.5:1556
3548 #: build/C/man5/elf.5:1561
3550 "Many symbols have associated sizes. This member holds zero if the symbol "
3551 "has no size or an unknown size."
3555 #: build/C/man5/elf.5:1561
3560 #. .Bl -tag -width "STT_SECTION"
3562 #: build/C/man5/elf.5:1565
3563 msgid "This member specifies the symbol's type and binding attributes:"
3567 #: build/C/man5/elf.5:1566
3569 msgid "B<STT_NOTYPE>"
3573 #: build/C/man5/elf.5:1569
3574 msgid "The symbol's type is not defined."
3578 #: build/C/man5/elf.5:1569
3580 msgid "B<STT_OBJECT>"
3584 #: build/C/man5/elf.5:1572
3585 msgid "The symbol is associated with a data object."
3589 #: build/C/man5/elf.5:1572
3595 #: build/C/man5/elf.5:1575
3596 msgid "The symbol is associated with a function or other executable code."
3600 #: build/C/man5/elf.5:1575
3602 msgid "B<STT_SECTION>"
3606 #: build/C/man5/elf.5:1582
3608 "The symbol is associated with a section. Symbol table entries of this type "
3609 "exist primarily for relocation and normally have B<STB_LOCAL> bindings."
3613 #: build/C/man5/elf.5:1582
3619 #: build/C/man5/elf.5:1593
3621 "By convention, the symbol's name gives the name of the source file "
3622 "associated with the object file. A file symbol has B<STB_LOCAL> bindings, "
3623 "its section index is B<SHN_ABS>, and it precedes the other B<STB_LOCAL> "
3624 "symbols of the file, if it is present."
3628 #: build/C/man5/elf.5:1593
3630 msgid "B<STT_LOPROC>"
3634 #: build/C/man5/elf.5:1598
3636 "This value up to and including B<STT_HIPROC> is reserved for "
3637 "processor-specific semantics."
3641 #: build/C/man5/elf.5:1598
3643 msgid "B<STT_HIPROC>"
3647 #. .Bl -tag -width "STB_GLOBAL"
3649 #: build/C/man5/elf.5:1605
3651 "This value down to and including B<STT_LOPROC> is reserved for "
3652 "processor-specific semantics."
3656 #: build/C/man5/elf.5:1605
3658 msgid "B<STB_LOCAL>"
3662 #: build/C/man5/elf.5:1611
3664 "Local symbols are not visible outside the object file containing their "
3665 "definition. Local symbols of the same name may exist in multiple files "
3666 "without interfering with each other."
3670 #: build/C/man5/elf.5:1611
3672 msgid "B<STB_GLOBAL>"
3676 #: build/C/man5/elf.5:1617
3678 "Global symbols are visible to all object files being combined. One file's "
3679 "definition of a global symbol will satisfy another file's undefined "
3680 "reference to the same symbol."
3684 #: build/C/man5/elf.5:1617
3690 #: build/C/man5/elf.5:1621
3692 "Weak symbols resemble global symbols, but their definitions have lower "
3697 #: build/C/man5/elf.5:1621
3699 msgid "B<STB_LOPROC>"
3703 #: build/C/man5/elf.5:1626
3705 "This value up to and including B<STB_HIPROC> is reserved for "
3706 "processor-specific semantics."
3710 #: build/C/man5/elf.5:1626
3712 msgid "B<STB_HIPROC>"
3716 #: build/C/man5/elf.5:1631
3718 "This value down to and including B<STB_LOPROC> is reserved for "
3719 "processor-specific semantics."
3723 #: build/C/man5/elf.5:1633
3724 msgid "There are macros for packing and unpacking the binding and type fields:"
3728 #: build/C/man5/elf.5:1640
3730 "B<ELF32_ST_BIND>(info) or B<ELF64_ST_BIND>(info) extract a binding from an "
3735 #: build/C/man5/elf.5:1644
3736 msgid "B<ELF32_ST_TYPE>(info) or B<ELF64_ST_TYPE>(info)"
3740 #: build/C/man5/elf.5:1648
3741 msgid "extract a type from an I<st_info> value."
3745 #: build/C/man5/elf.5:1652
3746 msgid "B<ELF32_ST_INFO>(bind, type) or B<ELF64_ST_INFO>(bind, type)"
3750 #: build/C/man5/elf.5:1656
3751 msgid "convert a binding and a type into an I<st_info> value."
3755 #: build/C/man5/elf.5:1658
3760 #. .Bl -tag -width "STV_PROTECTED"
3762 #: build/C/man5/elf.5:1662
3763 msgid "This member defines the symbol visibility."
3767 #: build/C/man5/elf.5:1663
3769 msgid "B<STV_DEFAULT>"
3773 #: build/C/man5/elf.5:1667
3774 msgid "Default symbol visibility rules."
3778 #: build/C/man5/elf.5:1667
3780 msgid "B<STV_INTERNAL>"
3784 #: build/C/man5/elf.5:1670
3785 msgid "Processor-specific hidden class."
3789 #: build/C/man5/elf.5:1670
3791 msgid "B<STV_HIDDEN>"
3795 #: build/C/man5/elf.5:1673
3796 msgid "Symbol is unavailable in other modules."
3800 #: build/C/man5/elf.5:1673
3802 msgid "B<STV_PROTECTED>"
3806 #: build/C/man5/elf.5:1676
3807 msgid "Not preemptible, not exported."
3811 #: build/C/man5/elf.5:1679
3812 msgid "There are macros for extracting the visibility type:"
3816 #: build/C/man5/elf.5:1683
3817 msgid "B<ELF32_ST_VISIBILITY>(other) or B<ELF64_ST_VISIBILITY>(other)"
3821 #: build/C/man5/elf.5:1685
3828 #: build/C/man5/elf.5:1693
3830 "Every symbol table entry is \"defined\" in relation to some section. This "
3831 "member holds the relevant section header table index."
3835 #: build/C/man5/elf.5:1701
3837 "Relocation is the process of connecting symbolic references with symbolic "
3838 "definitions. Relocatable files must have information that describes how to "
3839 "modify their section contents, thus allowing executable and shared object "
3840 "files to hold the right information for a process's program image. "
3841 "Relocation entries are these data."
3845 #: build/C/man5/elf.5:1703
3846 msgid "Relocation structures that do not need an addend:"
3850 #: build/C/man5/elf.5:1710
3853 "typedef struct {\n"
3854 " Elf32_Addr r_offset;\n"
3855 " uint32_t r_info;\n"
3860 #: build/C/man5/elf.5:1719
3863 "typedef struct {\n"
3864 " Elf64_Addr r_offset;\n"
3865 " uint64_t r_info;\n"
3870 #: build/C/man5/elf.5:1723
3871 msgid "Relocation structures that need an addend:"
3875 #: build/C/man5/elf.5:1731
3878 "typedef struct {\n"
3879 " Elf32_Addr r_offset;\n"
3880 " uint32_t r_info;\n"
3881 " int32_t r_addend;\n"
3886 #: build/C/man5/elf.5:1741
3889 "typedef struct {\n"
3890 " Elf64_Addr r_offset;\n"
3891 " uint64_t r_info;\n"
3892 " int64_t r_addend;\n"
3897 #: build/C/man5/elf.5:1744
3903 #: build/C/man5/elf.5:1752
3905 "This member gives the location at which to apply the relocation action. For "
3906 "a relocatable file, the value is the byte offset from the beginning of the "
3907 "section to the storage unit affected by the relocation. For an executable "
3908 "file or shared object, the value is the virtual address of the storage unit "
3909 "affected by the relocation."
3913 #: build/C/man5/elf.5:1752
3919 #: build/C/man5/elf.5:1767
3921 "This member gives both the symbol table index with respect to which the "
3922 "relocation must be made and the type of relocation to apply. Relocation "
3923 "types are processor specific. When the text refers to a relocation entry's "
3924 "relocation type or symbol table index, it means the result of applying "
3925 "B<ELF[32|64]_R_TYPE> or B<ELF[32|64]_R_SYM>, respectively, to the entry's "
3930 #: build/C/man5/elf.5:1767
3937 #: build/C/man5/elf.5:1772
3939 "This member specifies a constant addend used to compute the value to be "
3940 "stored into the relocatable field."
3944 #: build/C/man5/elf.5:1777
3946 "The .dynamic section contains a series of structures that hold relevant "
3947 "dynamic linking information. The d_tag member controls the interpretation "
3952 #: build/C/man5/elf.5:1788
3955 "typedef struct {\n"
3956 " Elf32_Sword d_tag;\n"
3958 " Elf32_Word d_val;\n"
3959 " Elf32_Addr d_ptr;\n"
3962 "extern Elf32_Dyn _DYNAMIC[];\n"
3966 #: build/C/man5/elf.5:1801
3969 "typedef struct {\n"
3970 " Elf64_Sxword d_tag;\n"
3972 " Elf64_Xword d_val;\n"
3973 " Elf64_Addr d_ptr;\n"
3976 "extern Elf64_Dyn _DYNAMIC[];\n"
3980 #: build/C/man5/elf.5:1804
3985 #. .Bl -tag -width "DT_SYMBOLIC"
3987 #: build/C/man5/elf.5:1808
3988 msgid "This member may have any of the following values:"
3992 #: build/C/man5/elf.5:1809
3998 #: build/C/man5/elf.5:1812
3999 msgid "Marks end of dynamic section"
4003 #: build/C/man5/elf.5:1812
4005 msgid "B<DT_NEEDED>"
4009 #: build/C/man5/elf.5:1815
4010 msgid "String table offset to name of a needed library"
4014 #: build/C/man5/elf.5:1815
4016 msgid "B<DT_PLTRELSZ>"
4020 #: build/C/man5/elf.5:1818
4021 msgid "Size in bytes of PLT relocs"
4025 #: build/C/man5/elf.5:1818
4027 msgid "B<DT_PLTGOT>"
4031 #: build/C/man5/elf.5:1821
4032 msgid "Address of PLT and/or GOT"
4036 #: build/C/man5/elf.5:1821
4042 #: build/C/man5/elf.5:1824
4043 msgid "Address of symbol hash table"
4047 #: build/C/man5/elf.5:1824
4049 msgid "B<DT_STRTAB>"
4053 #: build/C/man5/elf.5:1827
4054 msgid "Address of string table"
4058 #: build/C/man5/elf.5:1827
4060 msgid "B<DT_SYMTAB>"
4064 #: build/C/man5/elf.5:1830
4065 msgid "Address of symbol table"
4069 #: build/C/man5/elf.5:1830
4075 #: build/C/man5/elf.5:1833
4076 msgid "Address of Rela relocs table"
4080 #: build/C/man5/elf.5:1833
4082 msgid "B<DT_RELASZ>"
4086 #: build/C/man5/elf.5:1836
4087 msgid "Size in bytes of Rela table"
4091 #: build/C/man5/elf.5:1836
4093 msgid "B<DT_RELAENT>"
4097 #: build/C/man5/elf.5:1839
4098 msgid "Size in bytes of a Rela table entry"
4102 #: build/C/man5/elf.5:1839
4108 #: build/C/man5/elf.5:1842
4109 msgid "Size in bytes of string table"
4113 #: build/C/man5/elf.5:1842
4115 msgid "B<DT_SYMENT>"
4119 #: build/C/man5/elf.5:1845
4120 msgid "Size in bytes of a symbol table entry"
4124 #: build/C/man5/elf.5:1845
4130 #: build/C/man5/elf.5:1848
4131 msgid "Address of the initialization function"
4135 #: build/C/man5/elf.5:1848
4141 #: build/C/man5/elf.5:1851
4142 msgid "Address of the termination function"
4146 #: build/C/man5/elf.5:1851
4148 msgid "B<DT_SONAME>"
4152 #: build/C/man5/elf.5:1854
4153 msgid "String table offset to name of shared object"
4157 #: build/C/man5/elf.5:1854
4163 #: build/C/man5/elf.5:1857
4164 msgid "String table offset to library search path (deprecated)"
4168 #: build/C/man5/elf.5:1857
4170 msgid "B<DT_SYMBOLIC>"
4174 #: build/C/man5/elf.5:1860
4175 msgid "Alert linker to search this shared object before the executable for symbols"
4179 #: build/C/man5/elf.5:1860
4185 #: build/C/man5/elf.5:1863
4186 msgid "Address of Rel relocs table"
4190 #: build/C/man5/elf.5:1863
4196 #: build/C/man5/elf.5:1866
4197 msgid "Size in bytes of Rel table"
4201 #: build/C/man5/elf.5:1866
4203 msgid "B<DT_RELENT>"
4207 #: build/C/man5/elf.5:1869
4208 msgid "Size in bytes of a Rel table entry"
4212 #: build/C/man5/elf.5:1869
4214 msgid "B<DT_PLTREL>"
4218 #: build/C/man5/elf.5:1872
4219 msgid "Type of reloc the PLT refers (Rela or Rel)"
4223 #: build/C/man5/elf.5:1872
4229 #: build/C/man5/elf.5:1875
4230 msgid "Undefined use for debugging"
4234 #: build/C/man5/elf.5:1875
4236 msgid "B<DT_TEXTREL>"
4240 #: build/C/man5/elf.5:1878
4241 msgid "Absence of this indicates no relocs should apply to a nonwritable segment"
4245 #: build/C/man5/elf.5:1878
4247 msgid "B<DT_JMPREL>"
4251 #: build/C/man5/elf.5:1881
4252 msgid "Address of reloc entries solely for the PLT"
4256 #: build/C/man5/elf.5:1881
4258 msgid "B<DT_BIND_NOW>"
4262 #: build/C/man5/elf.5:1885
4264 "Instruct dynamic linker to process all relocs before transferring control to "
4269 #: build/C/man5/elf.5:1885
4271 msgid "B<DT_RUNPATH>"
4275 #: build/C/man5/elf.5:1888
4276 msgid "String table offset to library search path"
4280 #: build/C/man5/elf.5:1888
4282 msgid "B<DT_LOPROC>"
4286 #: build/C/man5/elf.5:1891
4287 msgid "Start of processor-specific semantics"
4291 #: build/C/man5/elf.5:1891
4293 msgid "B<DT_HIPROC>"
4297 #: build/C/man5/elf.5:1894
4298 msgid "End of processor-specific semantics"
4302 #: build/C/man5/elf.5:1896
4308 #: build/C/man5/elf.5:1899
4309 msgid "This member represents integer values with various interpretations."
4313 #: build/C/man5/elf.5:1899
4319 #: build/C/man5/elf.5:1907
4321 "This member represents program virtual addresses. When interpreting these "
4322 "addresses, the actual address should be computed based on the original file "
4323 "value and memory base address. Files do not contain relocation entries to "
4324 "fixup these addresses."
4328 #: build/C/man5/elf.5:1907
4335 #: build/C/man5/elf.5:1912
4337 "Array containing all the dynamic structures in the .dynamic section. This "
4338 "is automatically populated by the linker."
4342 #. ELF support first appeared in
4344 #. although not all supported platforms use it as the native
4345 #. binary file format.
4347 #: build/C/man5/elf.5:1921
4348 msgid "ELF first appeared in System V. The ELF format is an adopted standard."
4352 #. The original version of this manual page was written by
4353 #. .An Jeroen Ruigrok van der Werven
4354 #. .Aq asmodai@FreeBSD.org
4355 #. with inspiration from BSDi's
4360 #: build/C/man5/elf.5:1939
4362 "The extensions for I<e_phnum>, I<e_shnum> and I<e_strndx> respectively are "
4363 "Linux extensions. Sun, BSD and AMD64 also support them; for further "
4364 "information, look under SEE ALSO."
4368 #: build/C/man5/elf.5:1946
4369 msgid "B<as>(1), B<gdb>(1), B<ld>(1), B<objdump>(1), B<execve>(2), B<core>(5)"
4373 #: build/C/man5/elf.5:1949
4374 msgid "Hewlett-Packard, I<Elf-64 Object File Format>."
4378 #: build/C/man5/elf.5:1952
4379 msgid "Santa Cruz Operation, I<System V Application Binary Interface>."
4383 #: build/C/man5/elf.5:1956
4385 "UNIX System Laboratories, \"Object Files\", I<Executable and Linking Format "
4390 #: build/C/man5/elf.5:1959
4391 msgid "Sun Microsystems, I<Linker and Libraries Guide>."
4395 #: build/C/man5/elf.5:1962
4397 "AMD64 ABI Draft, I<System V Application Binary Interface AMD64 Architecture "
4398 "Processor Supplement>."
4402 #: build/C/man3/end.3:26
4408 #: build/C/man3/end.3:26
4414 #: build/C/man3/end.3:29
4415 msgid "etext, edata, end - end of program segments"
4419 #: build/C/man3/end.3:34
4422 "B<extern>I< etext>B<;>\n"
4423 "B<extern>I< edata>B<;>\n"
4424 "B<extern>I< end>B<;>\n"
4428 #: build/C/man3/end.3:38
4429 msgid "The addresses of these symbols indicate the end of various program segments:"
4433 #: build/C/man3/end.3:38
4439 #: build/C/man3/end.3:42
4441 "This is the first address past the end of the text segment (the program "
4446 #: build/C/man3/end.3:42
4452 #: build/C/man3/end.3:46
4453 msgid "This is the first address past the end of the initialized data segment."
4457 #: build/C/man3/end.3:46
4463 #: build/C/man3/end.3:50
4465 "This is the first address past the end of the uninitialized data segment "
4466 "(also known as the BSS segment)."
4470 #: build/C/man3/end.3:53
4472 "Although these symbols have long been provided on most UNIX systems, they "
4473 "are not standardized; use with caution."
4477 #: build/C/man3/end.3:56
4479 "The program must explicitly declare these symbols; they are not defined in "
4484 #: build/C/man3/end.3:64
4486 "On some systems the names of these symbols are preceded by underscores, "
4487 "thus: I<_etext>, I<_edata>, and I<_end>. These symbols are also defined for "
4488 "programs compiled on Linux."
4492 #: build/C/man3/end.3:76
4494 "At the start of program execution, the program break will be somewhere near "
4495 "I<&end> (perhaps at the start of the following page). However, the break "
4496 "will change as memory is allocated via B<brk>(2) or B<malloc>(3). Use "
4497 "B<sbrk>(2) with an argument of zero to find the current value of the "
4502 #: build/C/man3/end.3:78
4503 msgid "When run, the program below produces output such as the following:"
4507 #: build/C/man3/end.3:86
4511 "First address past:\n"
4512 " program text (etext) 0x8048568\n"
4513 " initialized data (edata) 0x804a01c\n"
4514 " uninitialized data (end) 0x804a024\n"
4518 #: build/C/man3/end.3:88
4520 msgid "Program source"
4524 #: build/C/man3/end.3:93
4527 "#include E<lt>stdio.hE<gt>\n"
4528 "#include E<lt>stdlib.hE<gt>\n"
4532 #: build/C/man3/end.3:96
4535 "extern char etext, edata, end; /* The symbols must have some type,\n"
4536 " or \"gcc -Wall\" complains */\n"
4540 #: build/C/man3/end.3:104
4544 "main(int argc, char *argv[])\n"
4546 " printf(\"First address past:\\en\");\n"
4547 " printf(\" program text (etext) %10p\\en\", &etext);\n"
4548 " printf(\" initialized data (edata) %10p\\en\", &edata);\n"
4549 " printf(\" uninitialized data (end) %10p\\en\", &end);\n"
4553 #: build/C/man3/end.3:113
4554 msgid "B<objdump>(1), B<readelf>(1), B<sbrk>(2), B<elf>(5)"
4558 #: build/C/man8/ld.so.8:5
4564 #: build/C/man8/ld.so.8:5
4570 #: build/C/man8/ld.so.8:8
4571 msgid "ld.so, ld-linux.so* - dynamic linker/loader"
4575 #: build/C/man8/ld.so.8:15
4577 "The dynamic linker can be run either indirectly by running some dynamically "
4578 "linked program or library (in which case no command-line options to the "
4579 "dynamic linker can be passed and, in the ELF case, the dynamic linker which "
4580 "is stored in the B<.interp> section of the program is executed) or directly "
4585 #: build/C/man8/ld.so.8:18
4586 msgid "I</lib/ld-linux.so.*> [OPTIONS] [PROGRAM [ARGUMENTS]]"
4590 #: build/C/man8/ld.so.8:25
4592 "The programs B<ld.so> and B<ld-linux.so*> find and load the shared libraries "
4593 "needed by a program, prepare the program to run, and then run it."
4597 #: build/C/man8/ld.so.8:32
4599 "Linux binaries require dynamic linking (linking at run time) unless the "
4600 "B<-static> option was given to B<ld>(1) during compilation."
4604 #: build/C/man8/ld.so.8:45
4606 "The program B<ld.so> handles a.out binaries, a format used long ago; "
4607 "B<ld-linux.so*> handles ELF (I</lib/ld-linux.so.1> for libc5, "
4608 "I</lib/ld-linux.so.2> for glibc2), which everybody has been using for years "
4609 "now. Otherwise both have the same behavior, and use the same support files "
4610 "and programs B<ldd>(1), B<ldconfig>(8) and I</etc/ld.so.conf>."
4614 #: build/C/man8/ld.so.8:53
4616 "When resolving library dependencies, the dynamic linker first inspects each "
4617 "dependency string to see if it contains a slash (this can occur if a library "
4618 "pathname containing slashes was specified at link time). If a slash is "
4619 "found, then the dependency string is interpreted as a (relative or absolute) "
4620 "pathname, and the library is loaded using that pathname."
4624 #: build/C/man8/ld.so.8:56
4626 "If a library dependency does not contain a slash, then it is searched for in "
4627 "the following order:"
4631 #: build/C/man8/ld.so.8:61
4633 "(ELF only) Using the directories specified in the DT_RPATH dynamic section "
4634 "attribute of the binary if present and DT_RUNPATH attribute does not exist. "
4635 "Use of DT_RPATH is deprecated."
4639 #: build/C/man8/ld.so.8:66
4641 "Using the environment variable B<LD_LIBRARY_PATH>. Except if the executable "
4642 "is a set-user-ID/set-group-ID binary, in which case it is ignored."
4646 #: build/C/man8/ld.so.8:70
4648 "(ELF only) Using the directories specified in the DT_RUNPATH dynamic section "
4649 "attribute of the binary if present."
4653 #: build/C/man8/ld.so.8:80
4655 "From the cache file I</etc/ld.so.cache>, which contains a compiled list of "
4656 "candidate libraries previously found in the augmented library path. If, "
4657 "however, the binary was linked with the B<-z nodeflib> linker option, "
4658 "libraries in the default library paths are skipped. Libraries installed in "
4659 "hardware capability directories (see below) are preferred to other "
4664 #: build/C/man8/ld.so.8:88
4666 "In the default path I</lib>, and then I</usr/lib>. If the binary was linked "
4667 "with the B<-z nodeflib> linker option, this step is skipped."
4671 #: build/C/man8/ld.so.8:88
4673 msgid "Rpath token expansion"
4677 #: build/C/man8/ld.so.8:92
4679 "B<ld.so> understands certain strings in an rpath specification (DT_RPATH or "
4680 "DT_RUNPATH); those strings are substituted as follows"
4684 #: build/C/man8/ld.so.8:92
4686 msgid "I<$ORIGIN> (or equivalently I<${ORIGIN}>)"
4690 #: build/C/man8/ld.so.8:99
4692 "This expands to the directory containing the application executable. Thus, "
4693 "an application located in I<somedir/app> could be compiled with"
4697 #: build/C/man8/ld.so.8:101
4699 msgid " gcc -Wl,-rpath,\\(aq$ORIGIN/../lib\\(aq\n"
4703 #: build/C/man8/ld.so.8:111
4705 "so that it finds an associated shared library in I<somedir/lib> no matter "
4706 "where I<somedir> is located in the directory hierarchy. This facilitates "
4707 "the creation of \"turn-key\" applications that do not need to be installed "
4708 "into special directories, but can instead be unpacked into any directory and "
4709 "still find their own shared libraries."
4713 #: build/C/man8/ld.so.8:111
4715 msgid "I<$LIB> (or equivalently I<${LIB}>)"
4719 #: build/C/man8/ld.so.8:123
4721 "This expands to I<lib> or I<lib64> depending on the architecture (e.g., on "
4722 "x86-64, it expands to I<lib64> and on x86-32, it expands to I<lib>)."
4726 #: build/C/man8/ld.so.8:123
4728 msgid "I<$PLATFORM> (or equivalently I<${PLATFORM}>)"
4731 #. To get an idea of the places that $PLATFORM would match,
4732 #. look at the output of the following:
4735 #. LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
4737 #. ld.so lets names be abbreviated, so $O will work for $ORIGIN;
4740 #: build/C/man8/ld.so.8:141
4742 "This expands to a string corresponding to the processor type of the host "
4743 "system (e.g., \"x86_64\"). On some architectures, the Linux kernel doesn't "
4744 "provide a platform string to the dynamic linker. The value of this string "
4745 "is taken from the B<AT_PLATFORM> value in the auxiliary vector (see "
4750 #: build/C/man8/ld.so.8:141 build/C/man8/ldconfig.8:100 build/C/man1/ldd.1:51
4756 #: build/C/man8/ld.so.8:142
4762 #: build/C/man8/ld.so.8:145
4763 msgid "List all dependencies and how they are resolved."
4767 #: build/C/man8/ld.so.8:145
4773 #: build/C/man8/ld.so.8:149
4775 "Verify that program is dynamically linked and this dynamic linker can handle "
4780 #: build/C/man8/ld.so.8:149
4782 msgid "B<--library-path PATH>"
4786 #: build/C/man8/ld.so.8:154
4788 "Use PATH instead of B<LD_LIBRARY_PATH> environment variable setting (see "
4793 #: build/C/man8/ld.so.8:154
4795 msgid "B<--inhibit-rpath LIST>"
4799 #: build/C/man8/ld.so.8:160
4801 "Ignore RPATH and RUNPATH information in object names in LIST. This option "
4802 "is ignored if B<ld.so> is set-user-ID or set-group-ID."
4806 #: build/C/man8/ld.so.8:160
4808 msgid "B<--audit LIST>"
4812 #: build/C/man8/ld.so.8:163
4813 msgid "Use objects named in LIST as auditors."
4817 #: build/C/man8/ld.so.8:163
4819 msgid "HARDWARE CAPABILITIES"
4823 #: build/C/man8/ld.so.8:174
4825 "Some libraries are compiled using hardware-specific instructions which do "
4826 "not exist on every CPU. Such libraries should be installed in directories "
4827 "whose names define the required hardware capabilities, such as "
4828 "I</usr/lib/sse2/>. The dynamic linker checks these directories against the "
4829 "hardware of the machine and selects the most suitable version of a given "
4830 "library. Hardware capability directories can be cascaded to combine CPU "
4831 "features. The list of supported hardware capability names depends on the "
4832 "CPU. The following names are currently recognized:"
4836 #: build/C/man8/ld.so.8:174
4842 #: build/C/man8/ld.so.8:177
4843 msgid "ev4, ev5, ev56, ev6, ev67"
4847 #: build/C/man8/ld.so.8:177
4853 #: build/C/man8/ld.so.8:180
4854 msgid "loongson2e, loongson2f, octeon, octeon2"
4858 #: build/C/man8/ld.so.8:180
4864 #: build/C/man8/ld.so.8:185
4866 "4xxmac, altivec, arch_2_05, arch_2_06, booke, cellbe, dfp, efpdouble, "
4867 "efpsingle, fpu, ic_snoop, mmu, notb, pa6t, power4, power5, power5+, power6x, "
4868 "ppc32, ppc601, ppc64, smt, spe, ucache, vsx"
4872 #: build/C/man8/ld.so.8:185
4878 #: build/C/man8/ld.so.8:188
4879 msgid "flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2"
4883 #: build/C/man8/ld.so.8:188
4889 #: build/C/man8/ld.so.8:192
4891 "dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle, z900, "
4892 "z990, z9-109, z10, zarch"
4896 #: build/C/man8/ld.so.8:192
4898 msgid "B<x86 (32-bit only)>"
4902 #: build/C/man8/ld.so.8:196
4904 "acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca, "
4905 "mmx, mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm"
4909 #: build/C/man8/ld.so.8:196
4915 #: build/C/man8/ld.so.8:198
4916 msgid "There are four important environment variables."
4920 #: build/C/man8/ld.so.8:198
4922 msgid "B<LD_ASSUME_KERNEL>"
4926 #: build/C/man8/ld.so.8:211
4928 "(glibc since 2.2.3) Each shared library can inform the dynamic linker of "
4929 "the minimum kernel ABI version that it requires. (This requirement is "
4930 "encoded in an ELF note section that is viewable via I<readelf\\ -n> as a "
4931 "section labeled B<NT_GNU_ABI_TAG>.) At run time, the dynamic linker "
4932 "determines the ABI version of the running kernel and will reject loading "
4933 "shared libraries that specify minimum ABI versions that exceed that ABI "
4938 #: build/C/man8/ld.so.8:220
4940 "B<LD_ASSUME_KERNEL> can be used to cause the dynamic linker to assume that "
4941 "it is running on a system with a different kernel ABI version. For example, "
4942 "the following command line causes the dynamic linker to assume it is running "
4943 "on Linux 2.2.5 when loading the shared libraries required by I<myprog>:"
4947 #: build/C/man8/ld.so.8:224
4949 msgid "$ B<LD_ASSUME_KERNEL=2.2.5 ./myprog>\n"
4953 #: build/C/man8/ld.so.8:241
4955 "On systems that provide multiple versions of a shared library (in different "
4956 "directories in the search path) that have different minimum kernel ABI "
4957 "version requirements, B<LD_ASSUME_KERNEL> can be used to select the version "
4958 "of the library that is used (dependent on the directory search order). "
4959 "Historically, the most common use of the B<LD_ASSUME_KERNEL> feature was to "
4960 "manually select the older LinuxThreads POSIX threads implementation on "
4961 "systems that provided both LinuxThreads and NPTL (which latter was typically "
4962 "the default on such systems); see B<pthreads>(7)."
4966 #: build/C/man8/ld.so.8:241 build/C/man8/ld.so.8:322
4968 msgid "B<LD_BIND_NOT>"
4972 #: build/C/man8/ld.so.8:246
4974 "(glibc since 2.2) Don't update the Global Offset Table (GOT) and Procedure "
4975 "Linkage Table (PLT) when resolving a symbol."
4979 #: build/C/man8/ld.so.8:246
4981 msgid "B<LD_BIND_NOW>"
4985 #: build/C/man8/ld.so.8:254
4987 "(libc5; glibc since 2.1.1) If set to a nonempty string, causes the dynamic "
4988 "linker to resolve all symbols at program startup instead of deferring "
4989 "function call resolution to the point when they are first referenced. This "
4990 "is useful when using a debugger."
4994 #: build/C/man8/ld.so.8:254
4996 msgid "B<LD_LIBRARY_PATH>"
5000 #: build/C/man8/ld.so.8:262
5002 "A colon-separated list of directories in which to search for ELF libraries "
5003 "at execution-time. Similar to the B<PATH> environment variable. Ignored in "
5004 "set-user-ID and set-group-ID programs."
5008 #: build/C/man8/ld.so.8:262
5010 msgid "B<LD_PRELOAD>"
5014 #: build/C/man8/ld.so.8:273
5016 "A list of additional, user-specified, ELF shared libraries to be loaded "
5017 "before all others. The items of the list can be separated by spaces or "
5018 "colons. This can be used to selectively override functions in other shared "
5019 "libraries. The libraries are searched for using the rules given under "
5020 "DESCRIPTION. For set-user-ID/set-group-ID ELF binaries, preload pathnames "
5021 "containing slashes are ignored, and libraries in the standard search "
5022 "directories are loaded only if the set-user-ID permission bit is enabled on "
5027 #: build/C/man8/ld.so.8:273
5029 msgid "B<LD_TRACE_LOADED_OBJECTS>"
5033 #: build/C/man8/ld.so.8:280
5035 "(ELF only) If set to a nonempty string, causes the program to list its "
5036 "dynamic library dependencies, as if run by B<ldd>(1), instead of running "
5041 #: build/C/man8/ld.so.8:283
5043 "Then there are lots of more or less obscure variables, many obsolete or only "
5048 #: build/C/man8/ld.so.8:283
5050 msgid "B<LD_AOUT_LIBRARY_PATH>"
5054 #: build/C/man8/ld.so.8:291
5056 "(libc5) Version of B<LD_LIBRARY_PATH> for a.out binaries only. Old "
5057 "versions of ld-linux.so.1 also supported B<LD_ELF_LIBRARY_PATH>."
5061 #: build/C/man8/ld.so.8:291
5063 msgid "B<LD_AOUT_PRELOAD>"
5067 #: build/C/man8/ld.so.8:299
5069 "(libc5) Version of B<LD_PRELOAD> for a.out binaries only. Old versions of "
5070 "ld-linux.so.1 also supported B<LD_ELF_PRELOAD>."
5074 #: build/C/man8/ld.so.8:299
5080 #: build/C/man8/ld.so.8:309
5082 "(glibc since 2.4) A colon-separated list of user-specified, ELF shared "
5083 "objects to be loaded before all others in a separate linker namespace (i.e., "
5084 "one that does not intrude upon the normal symbol bindings that would occur "
5085 "in the process). These libraries can be used to audit the operation of the "
5086 "dynamic linker. B<LD_AUDIT> is ignored for set-user-ID/set-group-ID "
5091 #: build/C/man8/ld.so.8:322
5093 "The dynamic linker will notify the audit libraries at so-called auditing "
5094 "checkpoints\\(emfor example, loading a new library, resolving a symbol, or "
5095 "calling a symbol from another shared object\\(emby calling an appropriate "
5096 "function within the audit library. For details, see B<rtld-audit>(7). The "
5097 "auditing interface is largely compatible with that provided on Solaris, as "
5098 "described in its I<Linker and Libraries Guide>, in the chapter I<Runtime "
5099 "Linker Auditing Interface>."
5103 #: build/C/man8/ld.so.8:327
5105 "(glibc since 2.1.95) Do not update the GOT (global offset table) and PLT "
5106 "(procedure linkage table) after resolving a symbol."
5110 #: build/C/man8/ld.so.8:327
5116 #: build/C/man8/ld.so.8:340
5118 "(glibc since 2.1) Output verbose debugging information about the dynamic "
5119 "linker. If set to B<all> prints all debugging information it has, if set to "
5120 "B<help> prints a help message about which categories can be specified in "
5121 "this environment variable. Since glibc 2.3.4, B<LD_DEBUG> is ignored for "
5122 "set-user-ID/set-group-ID binaries."
5126 #: build/C/man8/ld.so.8:340
5128 msgid "B<LD_DEBUG_OUTPUT>"
5132 #: build/C/man8/ld.so.8:349
5134 "(glibc since 2.1) File in which B<LD_DEBUG> output should be written. The "
5135 "default is standard output. B<LD_DEBUG_OUTPUT> is ignored for "
5136 "set-user-ID/set-group-ID binaries."
5140 #: build/C/man8/ld.so.8:349
5142 msgid "B<LD_DYNAMIC_WEAK>"
5146 #: build/C/man8/ld.so.8:356
5148 "(glibc since 2.1.91) Allow weak symbols to be overridden (reverting to old "
5149 "glibc behavior). For security reasons, since glibc 2.3.4, "
5150 "B<LD_DYNAMIC_WEAK> is ignored for set-user-ID/set-group-ID binaries."
5154 #: build/C/man8/ld.so.8:356
5156 msgid "B<LD_HWCAP_MASK>"
5160 #: build/C/man8/ld.so.8:360
5161 msgid "(glibc since 2.1) Mask for hardware capabilities."
5165 #: build/C/man8/ld.so.8:360
5167 msgid "B<LD_KEEPDIR>"
5171 #: build/C/man8/ld.so.8:365
5173 "(a.out only)(libc5) Don't ignore the directory in the names of a.out "
5174 "libraries to be loaded. Use of this option is strongly discouraged."
5178 #: build/C/man8/ld.so.8:365
5180 msgid "B<LD_NOWARN>"
5184 #: build/C/man8/ld.so.8:370
5186 "(a.out only)(libc5) Suppress warnings about a.out libraries with "
5187 "incompatible minor version numbers."
5191 #: build/C/man8/ld.so.8:370
5193 msgid "B<LD_ORIGIN_PATH>"
5196 #. Only used if $ORIGIN can't be determined by normal means
5197 #. (from the origin path saved at load time, or from /proc/self/exe)?
5199 #: build/C/man8/ld.so.8:379
5201 "(glibc since 2.1) Path where the binary is found (for non-set-user-ID "
5202 "programs). For security reasons, since glibc 2.4, B<LD_ORIGIN_PATH> is "
5203 "ignored for set-user-ID/set-group-ID binaries."
5207 #: build/C/man8/ld.so.8:379
5209 msgid "B<LD_POINTER_GUARD>"
5213 #: build/C/man8/ld.so.8:391
5215 "(glibc since 2.4) Set to 0 to disable pointer guarding. Any other value "
5216 "enables pointer guarding, which is also the default. Pointer guarding is a "
5217 "security mechanism whereby some pointers to code stored in writable program "
5218 "memory (return addresses saved by B<setjmp>(3) or function pointers used by "
5219 "various glibc internals) are mangled semi-randomly to make it more difficult "
5220 "for an attacker to hijack the pointers for use in the event of a buffer "
5221 "overrun or stack-smashing attack."
5225 #: build/C/man8/ld.so.8:391
5227 msgid "B<LD_PROFILE>"
5231 #: build/C/man8/ld.so.8:398
5233 "(glibc since 2.1) Shared object to be profiled, specified either as a "
5234 "pathname or a soname. Profiling output is written to the file whose name "
5235 "is: \"I<$LD_PROFILE_OUTPUT>/I<$LD_PROFILE>.profile\"."
5239 #: build/C/man8/ld.so.8:398
5241 msgid "B<LD_PROFILE_OUTPUT>"
5245 #: build/C/man8/ld.so.8:411
5247 "(glibc since 2.1) Directory where B<LD_PROFILE> output should be written. "
5248 "If this variable is not defined, or is defined as an empty string, then the "
5249 "default is I</var/tmp>. B<LD_PROFILE_OUTPUT> is ignored for set-user-ID and "
5250 "set-group-ID programs, which always use I</var/profile>."
5254 #: build/C/man8/ld.so.8:411
5256 msgid "B<LD_SHOW_AUXV>"
5260 #. Document LD_TRACE_PRELINKING (e.g.: LD_TRACE_PRELINKING=libx1.so ./prog)
5262 #. Also enables DL_DEBUG_PRELINK
5264 #: build/C/man8/ld.so.8:422
5266 "(glibc since 2.1) Show auxiliary array passed up from the kernel. For "
5267 "security reasons, since glibc 2.3.5, B<LD_SHOW_AUXV> is ignored for "
5268 "set-user-ID/set-group-ID binaries."
5272 #: build/C/man8/ld.so.8:422
5274 msgid "B<LD_USE_LOAD_BIAS>"
5277 #. http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
5278 #. Subject: [PATCH] Support LD_USE_LOAD_BIAS
5281 #: build/C/man8/ld.so.8:441
5283 "By default (i.e., if this variable is not defined) executables and "
5284 "prelinked shared objects will honor base addresses of their dependent "
5285 "libraries and (nonprelinked) position-independent executables (PIEs) and "
5286 "other shared objects will not honor them. If B<LD_USE_LOAD_BIAS> is defined "
5287 "wit the value, both executables and PIEs will honor the base addresses. If "
5288 "B<LD_USE_LOAD_BIAS> is defined with the value 0, neither executables nor "
5289 "PIEs will honor the base addresses. This variable is ignored by set-user-ID "
5290 "and set-group-ID programs."
5294 #: build/C/man8/ld.so.8:441
5296 msgid "B<LD_VERBOSE>"
5300 #: build/C/man8/ld.so.8:449
5302 "(glibc since 2.1) If set to a nonempty string, output symbol versioning "
5303 "information about the program if the B<LD_TRACE_LOADED_OBJECTS> environment "
5304 "variable has been set."
5308 #: build/C/man8/ld.so.8:449
5314 #: build/C/man8/ld.so.8:453
5316 "(ELF only)(glibc since 2.1.3) If set to a nonempty string, warn about "
5317 "unresolved symbols."
5321 #: build/C/man8/ld.so.8:453
5323 msgid "B<LDD_ARGV0>"
5327 #: build/C/man8/ld.so.8:460
5328 msgid "(libc5) I<argv>[0] to be used by B<ldd>(1) when none is present."
5332 #: build/C/man8/ld.so.8:460 build/C/man8/ldconfig.8:156
5338 #: build/C/man8/ld.so.8:462 build/C/man8/ldconfig.8:158
5340 msgid "I</lib/ld.so>"
5344 #: build/C/man8/ld.so.8:465
5345 msgid "a.out dynamic linker/loader"
5349 #: build/C/man8/ld.so.8:465
5351 msgid "I</lib/ld-linux.so.>{I<1>,I<2>}"
5355 #: build/C/man8/ld.so.8:468
5356 msgid "ELF dynamic linker/loader"
5360 #: build/C/man8/ld.so.8:468 build/C/man8/ldconfig.8:165
5362 msgid "I</etc/ld.so.cache>"
5366 #: build/C/man8/ld.so.8:472
5368 "File containing a compiled list of directories in which to search for "
5369 "libraries and an ordered list of candidate libraries."
5373 #: build/C/man8/ld.so.8:472
5375 msgid "I</etc/ld.so.preload>"
5379 #: build/C/man8/ld.so.8:476
5381 "File containing a whitespace-separated list of ELF shared libraries to be "
5382 "loaded before the program."
5386 #: build/C/man8/ld.so.8:476
5392 #: build/C/man8/ld.so.8:479
5393 msgid "shared libraries"
5397 #: build/C/man8/ld.so.8:486
5399 "The B<ld.so> functionality is available for executables compiled using libc "
5400 "version 4.4.3 or greater. ELF functionality is available since Linux 1.1.52 "
5405 #. ld.so: David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
5406 #. Torvalds, Lars Wirzenius and Mitch D'Souza
5407 #. ld-linux.so: Roland McGrath, Ulrich Drepper and others.
5409 #. In the above, (libc5) stands for David Engel's ld.so/ld-linux.so.
5411 #: build/C/man8/ld.so.8:498
5412 msgid "B<ldd>(1), B<getauxval>(3), B<rtld-audit>(7), B<ldconfig>(8), B<sln>(8)"
5416 #: build/C/man8/ldconfig.8:22
5422 #: build/C/man8/ldconfig.8:22
5428 #: build/C/man8/ldconfig.8:25
5429 msgid "ldconfig - configure dynamic linker run-time bindings"
5433 #: build/C/man8/ldconfig.8:40
5435 "B</sbin/ldconfig> [ B<-nNvXV> ] [ B<-f\\ conf> ] [ B<-C\\ cache> ] [ B<-r\\ "
5436 "root> ] I<directory>\\ ..."
5440 #: build/C/man8/ldconfig.8:49
5441 msgid "B</sbin/ldconfig> B<-l> [ B<-v> ] I<library>\\ ..."
5445 #: build/C/man8/ldconfig.8:54
5446 msgid "B</sbin/ldconfig> B<-p>"
5450 #: build/C/man8/ldconfig.8:71
5452 "B<ldconfig> creates the necessary links and cache to the most recent shared "
5453 "libraries found in the directories specified on the command line, in the "
5454 "file I</etc/ld.so.conf>, and in the trusted directories (I</lib> and "
5455 "I</usr/lib>). The cache is used by the run-time linker, I<ld.so> or "
5456 "I<ld-linux.so>. B<ldconfig> checks the header and filenames of the "
5457 "libraries it encounters when determining which versions should have their "
5461 #. The following sentence looks suspect
5462 #. (perhaps historical cruft) -- MTK, Jul 2005
5463 #. Therefore, when making dynamic libraries,
5464 #. it is wise to explicitly link against libc (use \-lc).
5466 #: build/C/man8/ldconfig.8:79
5468 "B<ldconfig> will attempt to deduce the type of ELF libs (i.e., libc5 or "
5469 "libc6/glibc) based on what C libs, if any, the library was linked against."
5473 #: build/C/man8/ldconfig.8:100
5475 "Some existing libs do not contain enough information to allow the deduction "
5476 "of their type. Therefore, the I</etc/ld.so.conf> file format allows the "
5477 "specification of an expected type. This is used I<only> for those ELF libs "
5478 "which we can not work out. The format is \"dirname=TYPE\", where TYPE can "
5479 "be libc4, libc5, or libc6. (This syntax also works on the command line.) "
5480 "Spaces are I<not> allowed. Also see the B<-p> option. B<ldconfig> should "
5481 "normally be run by the superuser as it may require write permission on some "
5482 "root owned directories and files."
5486 #: build/C/man8/ldconfig.8:101
5492 #: build/C/man8/ldconfig.8:107
5494 "Verbose mode. Print current version number, the name of each directory as "
5495 "it is scanned, and any links that are created. Overrides quiet mode."
5499 #: build/C/man8/ldconfig.8:107
5505 #: build/C/man8/ldconfig.8:118
5507 "Only process directories specified on the command line. Don't process the "
5508 "trusted directories (I</lib> and I</usr/lib>) nor those specified in "
5509 "I</etc/ld.so.conf>. Implies B<-N>."
5513 #: build/C/man8/ldconfig.8:118
5519 #: build/C/man8/ldconfig.8:124
5521 "Don't rebuild the cache. Unless B<-X> is also specified, links are still "
5526 #: build/C/man8/ldconfig.8:124
5532 #: build/C/man8/ldconfig.8:130
5534 "Don't update links. Unless B<-N> is also specified, the cache is still "
5539 #: build/C/man8/ldconfig.8:130
5545 #: build/C/man8/ldconfig.8:136
5546 msgid "Use B<conf> instead of I</etc/ld.so.conf>."
5550 #: build/C/man8/ldconfig.8:136
5556 #: build/C/man8/ldconfig.8:142
5557 msgid "Use B<cache> instead of I</etc/ld.so.cache>."
5561 #: build/C/man8/ldconfig.8:142
5567 #: build/C/man8/ldconfig.8:147
5568 msgid "Change to and use I<root> as the root directory."
5572 #: build/C/man8/ldconfig.8:147
5578 #: build/C/man8/ldconfig.8:152
5580 "Library mode. Manually link individual libraries. Intended for use by "
5585 #: build/C/man8/ldconfig.8:152
5591 #: build/C/man8/ldconfig.8:156
5593 "Print the lists of directories and candidate libraries stored in the current "
5598 #: build/C/man8/ldconfig.8:161
5599 msgid "run-time linker/loader"
5603 #: build/C/man8/ldconfig.8:161
5605 msgid "I</etc/ld.so.conf>"
5609 #: build/C/man8/ldconfig.8:165
5611 "File containing a list of colon, space, tab, newline, or comma-separated "
5612 "directories in which to search for libraries."
5616 #: build/C/man8/ldconfig.8:174
5618 "File containing an ordered list of libraries found in the directories "
5619 "specified in I</etc/ld.so.conf>, as well as those found in I</lib> and "
5624 #: build/C/man8/ldconfig.8:178
5625 msgid "B<ldd>(1), B<ld.so>(8)"
5629 #: build/C/man1/ldd.1:14
5635 #: build/C/man1/ldd.1:14
5641 #: build/C/man1/ldd.1:17
5642 msgid "ldd - print shared library dependencies"
5646 #: build/C/man1/ldd.1:19
5647 msgid "B<ldd> [OPTION]... FILE..."
5651 #: build/C/man1/ldd.1:23
5653 "B<ldd> prints the shared libraries required by each program or shared "
5654 "library specified on the command line."
5658 #: build/C/man1/ldd.1:23
5663 #. Mainline glibc's ldd allows this possibility (the line
5664 #. try_trace "$file"
5665 #. in glibc 2.15, for example), but many distro versions of
5666 #. ldd seem to remove that code path from the script.
5668 #: build/C/man1/ldd.1:49
5670 "In the usual case, B<ldd> invokes the standard dynamic linker (see "
5671 "B<ld.so>(8)) with the B<LD_TRACE_LOADED_OBJECTS> environment variable set "
5672 "to 1, which causes the linker to display the library dependencies. Be "
5673 "aware, however, that in some circumstances, some versions of B<ldd> may "
5674 "attempt to obtain the dependency information by directly executing the "
5675 "program. Thus, you should I<never> employ B<ldd> on an untrusted "
5676 "executable, since this may result in the execution of arbitrary code. A "
5677 "safer alternative when dealing with untrusted executables is:"
5681 #: build/C/man1/ldd.1:51
5683 msgid " $ objdump -p /path/to/program | grep NEEDED\n"
5687 #: build/C/man1/ldd.1:52
5689 msgid "B<--version>"
5693 #: build/C/man1/ldd.1:56
5694 msgid "Print the version number of B<ldd>."
5698 #: build/C/man1/ldd.1:56
5700 msgid "B<-v\\ --verbose>"
5704 #: build/C/man1/ldd.1:60
5706 "Print all information, including, for example, symbol versioning "
5711 #: build/C/man1/ldd.1:60
5713 msgid "B<-u\\ --unused>"
5717 #: build/C/man1/ldd.1:64
5718 msgid "Print unused direct dependencies. (Since glibc 2.3.4.)"
5722 #: build/C/man1/ldd.1:64
5724 msgid "B<-d\\ --data-relocs>"
5728 #: build/C/man1/ldd.1:67
5729 msgid "Perform relocations and report any missing objects (ELF only)."
5733 #: build/C/man1/ldd.1:67
5735 msgid "B<-r\\ --function-relocs>"
5739 #: build/C/man1/ldd.1:71
5741 "Perform relocations for both data objects and functions, and report any "
5742 "missing objects or functions (ELF only)."
5746 #: build/C/man1/ldd.1:71
5752 #: build/C/man1/ldd.1:74
5753 msgid "Usage information."
5757 #: build/C/man1/ldd.1:85
5759 "The standard version of B<ldd> comes with glibc2. Libc5 came with an older "
5760 "version, still present on some systems. The long options are not supported "
5761 "by the libc5 version. On the other hand, the glibc2 version does not "
5762 "support B<-V> and only has the equivalent B<--version>."
5766 #: build/C/man1/ldd.1:91
5768 "The libc5 version of this program will use the name of a library given on "
5769 "the command line as-is when it contains a \\(aq/\\(aq; otherwise it searches "
5770 "for the library in the standard locations. To run it on a shared library in "
5771 "the current directory, prefix the name with \"./\"."
5775 #: build/C/man1/ldd.1:94
5776 msgid "B<ldd> does not work on a.out shared libraries."
5781 #. Roland McGrath and Ulrich Drepper.
5783 #: build/C/man1/ldd.1:108
5785 "B<ldd> does not work with some extremely old a.out programs which were built "
5786 "before B<ldd> support was added to the compiler releases. If you use B<ldd> "
5787 "on one of these programs, the program will attempt to run with I<argc> = 0 "
5788 "and the results will be unpredictable."
5792 #: build/C/man1/ldd.1:111
5793 msgid "B<ld.so>(8), B<ldconfig>(8)"
5797 #: build/C/man7/rtld-audit.7:28
5803 #: build/C/man7/rtld-audit.7:28
5809 #: build/C/man7/rtld-audit.7:31
5810 msgid "rtld-audit - auditing API for the dynamic linker"
5814 #: build/C/man7/rtld-audit.7:33
5815 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
5819 #: build/C/man7/rtld-audit.7:35
5820 msgid "B<#include E<lt>link.hE<gt>>"
5824 #: build/C/man7/rtld-audit.7:43
5826 "The GNU dynamic linker (run-time linker) provides an auditing API that "
5827 "allows an application to be notified when various dynamic linking events "
5828 "occur. This API is very similar to the auditing interface provided by the "
5829 "Solaris run-time linker. The necessary constants and prototypes are defined "
5830 "by including I<E<lt>link.hE<gt>>."
5834 #: build/C/man7/rtld-audit.7:50
5836 "To use this interface, the programmer creates a shared library that "
5837 "implements a standard set of function names. Not all of the functions need "
5838 "to be implemented: in most cases, if the programmer is not interested in a "
5839 "particular class of auditing event, then no implementation needs to be "
5840 "provided for the corresponding auditing function."
5844 #: build/C/man7/rtld-audit.7:58
5846 "To employ the auditing interface, the environment variable B<LD_AUDIT> must "
5847 "be defined to contain a colon-separated list of shared libraries, each of "
5848 "which can implement (parts of) the auditing API. When an auditable event "
5849 "occurs, the corresponding function is invoked in each library, in the order "
5850 "that the libraries are listed."
5854 #: build/C/man7/rtld-audit.7:58
5856 msgid "la_version()"
5860 #: build/C/man7/rtld-audit.7:62
5862 msgid "B<unsigned int la_version(unsigned int >I<version>B<);>\n"
5866 #: build/C/man7/rtld-audit.7:74
5868 "This is the only function that I<must> be defined by an auditing library: it "
5869 "performs the initial handshake between the dynamic linker and the auditing "
5870 "library. When invoking this function, the dynamic linker passes, in "
5871 "I<version>, the highest version of the auditing interface that the linker "
5872 "supports. If necessary, the auditing library can check that this version is "
5873 "sufficient for its requirements."
5877 #: build/C/man7/rtld-audit.7:83
5879 "As its function result, this function should return the version of the "
5880 "auditing interface that this auditing library expects to use (returning "
5881 "I<version> is acceptable). If the returned value is 0, or a version that is "
5882 "greater than that supported by the dynamic linker, then the audit library is "
5887 #: build/C/man7/rtld-audit.7:83
5889 msgid "la_objsearch()"
5893 #: build/C/man7/rtld-audit.7:88
5896 "B<char *la_objsearch(const char *>I<name>B<, uintptr_t *>I<cookie>B<,>\n"
5897 "B< unsigned int >I<flag>B<);>\n"
5901 #: build/C/man7/rtld-audit.7:99
5903 "The dynamic linker invokes this function to inform the auditing library that "
5904 "it is about to search for a shared object. The I<name> argument is the "
5905 "filename or pathname that is to be searched for. I<cookie> identifies the "
5906 "shared object that initiated the search. I<flag> is set to one of the "
5911 #: build/C/man7/rtld-audit.7:99
5913 msgid "B<LA_SER_ORIG>"
5917 #: build/C/man7/rtld-audit.7:108
5919 "This is the original name that is being searched for. Typically, this name "
5920 "comes from an ELF B<DT_NEEDED> entry, or is the I<filename> argument given "
5925 #: build/C/man7/rtld-audit.7:108
5927 msgid "B<LA_SER_LIBPATH>"
5931 #: build/C/man7/rtld-audit.7:113
5932 msgid "I<name> was created using a directory specified in B<LD_LIBRARY_PATH>."
5936 #: build/C/man7/rtld-audit.7:113
5938 msgid "B<LA_SER_RUNPATH>"
5942 #: build/C/man7/rtld-audit.7:121
5944 "I<name> was created using a directory specified in an ELF B<DT_RPATH> or "
5945 "B<DT_RUNPATH> list."
5949 #: build/C/man7/rtld-audit.7:121
5951 msgid "B<LA_SER_CONFIG>"
5955 #: build/C/man7/rtld-audit.7:128
5956 msgid "I<name> was found via the B<ldconfig>(8) cache (I</etc/ld.so.cache>)."
5960 #: build/C/man7/rtld-audit.7:128
5962 msgid "B<LA_SER_DEFAULT>"
5966 #: build/C/man7/rtld-audit.7:132
5967 msgid "I<name> was found via a search of one of the default directories."
5971 #: build/C/man7/rtld-audit.7:132
5973 msgid "B<LA_SER_SECURE>"
5977 #: build/C/man7/rtld-audit.7:136
5978 msgid "I<name> is specific to a secure object (unused on Linux)."
5982 #: build/C/man7/rtld-audit.7:145
5984 "As its function result, B<la_objsearch>() returns the pathname that the "
5985 "dynamic linker should use for further processing. If NULL is returned, then "
5986 "this pathname is ignored for further processing. If this audit library "
5987 "simply intends to monitor search paths, then I<name> should be returned."
5991 #: build/C/man7/rtld-audit.7:145
5993 msgid "la_activity()"
5997 #: build/C/man7/rtld-audit.7:149
5999 msgid "B<void la_activity( uintptr_t *>I<cookie>B<, unsigned int >I<flag>B<);>\n"
6003 #: build/C/man7/rtld-audit.7:158
6005 "The dynamic linker calls this function to inform the auditing library that "
6006 "link-map activity is occurring. I<cookie> identifies the object at the head "
6007 "of the link map. When the dynamic linker invokes this function, I<flag> is "
6008 "set to one of the following values:"
6012 #: build/C/man7/rtld-audit.7:158
6014 msgid "B<LA_ACT_ADD>"
6018 #: build/C/man7/rtld-audit.7:161
6019 msgid "New objects are being added to the link map."
6023 #: build/C/man7/rtld-audit.7:161
6025 msgid "B<LA_ACT_DELETE>"
6029 #: build/C/man7/rtld-audit.7:164
6030 msgid "Objects are being removed from the link map."
6034 #: build/C/man7/rtld-audit.7:164
6036 msgid "B<LA_ACT_CONSISTENT>"
6040 #: build/C/man7/rtld-audit.7:167
6041 msgid "Link-map activity has been completed: the map is once again consistent."
6045 #: build/C/man7/rtld-audit.7:167
6047 msgid "la_objopen()"
6051 #: build/C/man7/rtld-audit.7:172
6054 "B<unsigned int la_objopen(struct link_map *>I<map>B<, Lmid_t >I<lmid>B<,>\n"
6055 "B< uintptr_t *>I<cookie>B<);>\n"
6059 #: build/C/man7/rtld-audit.7:181
6061 "The dynamic linker calls this function when a new shared object is loaded. "
6062 "The I<map> argument is a pointer to a link-map structure that describes the "
6063 "object. The I<lmid> field has one of the following values"
6067 #: build/C/man7/rtld-audit.7:181
6069 msgid "B<LM_ID_BASE>"
6073 #: build/C/man7/rtld-audit.7:184
6074 msgid "Link map is part of the initial namespace."
6078 #: build/C/man7/rtld-audit.7:184
6080 msgid "B<LM_ID_NEWLM>"
6084 #: build/C/man7/rtld-audit.7:188
6085 msgid "Link map is part of a new namespace requested via B<dlmopen>(3)."
6089 #: build/C/man7/rtld-audit.7:196
6091 "I<cookie> is a pointer to an identifier for this object. The identifier is "
6092 "provided to later calls to functions in the auditing library in order to "
6093 "identify this object. This identifier is initialized to point to object's "
6094 "link map, but the audit library can change the identifier to some other "
6095 "value that it may prefer to use to identify the object."
6099 #: build/C/man7/rtld-audit.7:203
6101 "As its return value, B<la_objopen>() returns a bit mask created by ORing "
6102 "zero or more of the following constants, which allow the auditing library to "
6103 "select the objects to be monitored by B<la_symbind*>():"
6107 #: build/C/man7/rtld-audit.7:203
6109 msgid "B<LA_FLG_BINDTO>"
6113 #: build/C/man7/rtld-audit.7:206
6114 msgid "Audit symbol bindings to this object."
6118 #: build/C/man7/rtld-audit.7:206
6120 msgid "B<LA_FLG_BINDFROM>"
6124 #: build/C/man7/rtld-audit.7:209
6125 msgid "Audit symbol bindings from this object."
6129 #: build/C/man7/rtld-audit.7:213
6131 "A return value of 0 from B<la_objopen>() indicates that no symbol bindings "
6132 "should be audited for this object."
6136 #: build/C/man7/rtld-audit.7:213
6138 msgid "la_objclose()"
6142 #: build/C/man7/rtld-audit.7:217
6144 msgid "B<unsigned int la_objclose(uintptr_t *>I<cookie>B<);>\n"
6148 #: build/C/man7/rtld-audit.7:226
6150 "The dynamic linker invokes this function after any finalization code for the "
6151 "object has been executed, before the object is unloaded. The I<cookie> "
6152 "argument is the identifier obtained from a previous invocation of "
6157 #: build/C/man7/rtld-audit.7:230
6159 "In the current implementation, the value returned by B<la_objclose>() is "
6164 #: build/C/man7/rtld-audit.7:230
6166 msgid "la_preinit()"
6170 #: build/C/man7/rtld-audit.7:234
6172 msgid "B<void la_preinit(uintptr_t *>I<cookie>B<);>\n"
6176 #: build/C/man7/rtld-audit.7:244
6178 "The dynamic linker invokes this function after all shared objects have been "
6179 "loaded, before control is passed to the application (i.e., before calling "
6180 "I<main>()). Note that I<main>() may still later dynamically load objects "
6181 "using B<dlopen>(3)."
6185 #: build/C/man7/rtld-audit.7:244
6187 msgid "la_symbind*()"
6191 #: build/C/man7/rtld-audit.7:253
6194 "B<uintptr_t la_symbind32(Elf32_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
6195 "B< uintptr_t *>I<refcook>B<, uintptr_t "
6196 "*>I<defcook>B<,>\n"
6197 "B< unsigned int *>I<flags>B<, const char "
6198 "*>I<symname>B<);>\n"
6199 "B<uintptr_t la_symbind64(Elf64_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
6200 "B< uintptr_t *>I<refcook>B<, uintptr_t "
6201 "*>I<defcook>B<,>\n"
6202 "B< unsigned int *>I<flags>B<, const char "
6203 "*>I<symname>B<);>\n"
6207 #: build/C/man7/rtld-audit.7:265
6209 "The dynamic linker invokes one of these functions when a symbol binding "
6210 "occurs between two shared objects that have been marked for auditing "
6211 "notification by B<la_objopen>(). The B<la_symbind32>() function is "
6212 "employed on 32-bit platforms; the B<la_symbind64>() function is employed on "
6217 #: build/C/man7/rtld-audit.7:275
6219 "The I<sym> argument is a pointer to a structure that provides information "
6220 "about the symbol being bound. The structure definition is shown in "
6221 "I<E<lt>elf.hE<gt>>. Among the fields of this structure, I<st_value> "
6222 "indicates the address to which the symbol is bound."
6226 #: build/C/man7/rtld-audit.7:280
6228 "The I<ndx> argument gives the index of the symbol in the symbol table of the "
6229 "bound shared object."
6233 #: build/C/man7/rtld-audit.7:295
6235 "The I<refcook> argument identifies the shared object that is making the "
6236 "symbol reference; this is the same identifier that is provided to the "
6237 "B<la_objopen>() function that returned B<LA_FLG_BINDFROM>. The I<defcook> "
6238 "argument identifies the shared object that defines the referenced symbol; "
6239 "this is the same identifier that is provided to the B<la_objopen>() "
6240 "function that returned B<LA_FLG_BINDTO>."
6244 #: build/C/man7/rtld-audit.7:299
6245 msgid "The I<symname> argument points a string containing the name of the symbol."
6248 #. LA_SYMB_STRUCTCALL appears to be unused
6250 #: build/C/man7/rtld-audit.7:307
6252 "The I<flags> argument is a bit mask that both provides information about the "
6253 "symbol and can be used to modify further auditing of this PLT (Procedure "
6254 "Linkage Table) entry. The dynamic linker may supply the following bit "
6255 "values in this argument:"
6259 #: build/C/man7/rtld-audit.7:307
6261 msgid "B<LA_SYMB_DLSYM>"
6265 #: build/C/man7/rtld-audit.7:311
6266 msgid "The binding resulted from a call to B<dlsym>(3)."
6270 #: build/C/man7/rtld-audit.7:311
6272 msgid "B<LA_SYMB_ALTVALUE>"
6276 #: build/C/man7/rtld-audit.7:316
6278 "A previous B<la_symbind*>() call returned an alternate value for this "
6282 #. pltenter/pltexit are called for non-dynamically loaded libraries,
6283 #. but don't seem to be called for dynamically loaded libs?
6284 #. Is this the same on Solaris?
6286 #: build/C/man7/rtld-audit.7:330
6288 "By default, if the auditing library implements B<la_pltenter>() and "
6289 "B<la_pltexit>() functions (see below), then these functions are invoked, "
6290 "after B<la_symbind>(), for PLT entries, each time the symbol is referenced. "
6291 "The following flags can be ORed into I<*flags> to change this default "
6296 #: build/C/man7/rtld-audit.7:330
6298 msgid "B<LA_SYMB_NOPLTENTER>"
6302 #: build/C/man7/rtld-audit.7:335
6303 msgid "Don't call B<la_pltenter>() for this symbol."
6307 #: build/C/man7/rtld-audit.7:335
6309 msgid "B<LA_SYMB_NOPLTEXIT>"
6313 #: build/C/man7/rtld-audit.7:340
6314 msgid "Don't call B<la_pltexit>() for this symbol."
6318 #: build/C/man7/rtld-audit.7:351
6320 "The return value of B<la_symbind32>() and B<la_symbind64>() is the address "
6321 "to which control should be passed after the function returns. If the "
6322 "auditing library is simply monitoring symbol bindings, then it should return "
6323 "I<sym-E<gt>st_value>. A different value may be returned if the library "
6324 "wishes to direct control to an alternate location."
6328 #: build/C/man7/rtld-audit.7:351
6330 msgid "la_pltenter()"
6334 #: build/C/man7/rtld-audit.7:357 build/C/man7/rtld-audit.7:417
6336 "The precise name and argument types for this function depend on the hardware "
6337 "platform. (The appropriate definition is supplied by I<E<lt>link.hE<gt>>.) "
6338 "Here is the definition for x86-32:"
6342 #: build/C/man7/rtld-audit.7:363
6345 "B<Elf32_Addr la_i86_gnu_pltenter(Elf32_Sym *>I<sym>B<, unsigned int "
6347 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
6348 "B< La_i86_regs *>I<regs>B<, unsigned int *>I<flags>B<,>\n"
6349 "B< const char *>I<symname>B<, long int "
6350 "*>I<framesizep>B<);>\n"
6354 #: build/C/man7/rtld-audit.7:367
6356 "This function is invoked just before a PLT entry is called, between two "
6357 "shared objects that have been marked for binding notification."
6361 #: build/C/man7/rtld-audit.7:377 build/C/man7/rtld-audit.7:440
6363 "The I<sym>, I<ndx>, I<refcook>, I<defcook>, and I<symname> are as for "
6368 #: build/C/man7/rtld-audit.7:384
6370 "The I<regs> argument points to a structure (defined in I<E<lt>link.hE<gt>>) "
6371 "containing the values of registers to be used for the call to this PLT "
6376 #: build/C/man7/rtld-audit.7:390
6378 "The I<flags> argument points to a bit mask that conveys information about, "
6379 "and can be used to modify subsequent auditing of, this PLT entry, as for "
6383 #. FIXME is the following correct?
6385 #: build/C/man7/rtld-audit.7:406
6387 "The I<framesizep> argument points to a I<long\\ int> buffer that can be used "
6388 "to explicitly set the frame size used for the call to this PLT entry. If "
6389 "different B<la_pltenter>() invocations for this symbol return different "
6390 "values, then the maximum returned value is used. The B<la_pltenter>() "
6391 "function is called only if this buffer is explicitly set to a suitable "
6396 #: build/C/man7/rtld-audit.7:411
6397 msgid "The return value of B<la_pltenter>() is as for B<la_symbind*>()."
6401 #: build/C/man7/rtld-audit.7:411
6403 msgid "la_pltexit()"
6407 #: build/C/man7/rtld-audit.7:423
6410 "B<unsigned int la_i86_gnu_pltexit(Elf32_Sym *>I<sym>B<, unsigned int "
6412 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
6413 "B< const La_i86_regs *>I<inregs>B<, La_i86_retval "
6414 "*>I<outregs>B<,>\n"
6415 "B< const char *>I<symname>B<);>\n"
6419 #: build/C/man7/rtld-audit.7:430
6421 "This function is called when a PLT entry, made between two shared objects "
6422 "that have been marked for binding notification, returns. The function is "
6423 "called just before control returns to the caller of the PLT entry."
6427 #: build/C/man7/rtld-audit.7:453
6429 "The I<inregs> argument points to a structure (defined in "
6430 "I<E<lt>link.hE<gt>>) containing the values of registers used for the call "
6431 "to this PLT entry. The I<outregs> argument points to a structure (defined "
6432 "in I<E<lt>link.hE<gt>>) containing return values for the call to this PLT "
6433 "entry. These values can be modified by the caller, and the changes will be "
6434 "visible to the caller of the PLT entry."
6437 #. This differs from Solaris, where an audit library that monitors
6438 #. symbol binding should return the value of the 'retval' argument
6439 #. (not provided by GNU, but equivalent to returning outregs->lrv_eax
6440 #. on (say) x86-32).
6442 #: build/C/man7/rtld-audit.7:461
6444 "In the current GNU implementation, the return value of B<la_pltexit>() is "
6449 #: build/C/man7/rtld-audit.7:467
6451 "This API is nonstandard, but very similar to the Solaris API, described in "
6452 "the Solaris I<Linker and Libraries Guide>, in the chapter I<Runtime Linker "
6453 "Auditing Interface>."
6457 #: build/C/man7/rtld-audit.7:470
6458 msgid "Note the following differences from the Solaris dynamic linker auditing API:"
6462 #: build/C/man7/rtld-audit.7:470 build/C/man7/rtld-audit.7:474 build/C/man7/rtld-audit.7:482
6468 #: build/C/man7/rtld-audit.7:474
6470 "The Solaris B<la_objfilter>() interface is not supported by the GNU "
6475 #: build/C/man7/rtld-audit.7:482
6477 "The Solaris B<la_symbind32>() and B<la_pltexit>() functions do not provide "
6478 "a I<symname> argument."
6482 #: build/C/man7/rtld-audit.7:492
6484 "The Solaris B<la_pltexit>() function does not provide I<inregs> and "
6485 "I<outregs> arguments (but does provide a I<retval> argument with the "
6486 "function return value)."
6489 #. FIXME Specifying multiple audit libraries doesn't work on GNU.
6490 #. My simple tests on Solaris work okay, but not on Linux -- mtk, Jan 2009
6491 #. glibc bug filed: http://sourceware.org/bugzilla/show_bug.cgi?id=9733
6492 #. Reportedly, this is fixed on 16 Mar 2009 (i.e., for glibc 2.10)
6494 #: build/C/man7/rtld-audit.7:502
6496 "In glibc versions up to and include 2.9, specifying more than one audit "
6497 "library in B<LD_AUDIT> results in a run-time crash. This is reportedly "
6498 "fixed in glibc 2.10."
6502 #: build/C/man7/rtld-audit.7:506
6505 "#include E<lt>link.hE<gt>\n"
6506 "#include E<lt>stdio.hE<gt>\n"
6510 #: build/C/man7/rtld-audit.7:511
6514 "la_version(unsigned int version)\n"
6516 " printf(\"la_version(): %d\\en\", version);\n"
6520 #: build/C/man7/rtld-audit.7:514
6523 " return version;\n"
6528 #: build/C/man7/rtld-audit.7:527
6532 "la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)\n"
6534 " printf(\"la_objsearch(): name = %s; cookie = %x\", name, cookie);\n"
6535 " printf(\"; flag = %s\\en\",\n"
6536 " (flag == LA_SER_ORIG) ? \"LA_SER_ORIG\" :\n"
6537 " (flag == LA_SER_LIBPATH) ? \"LA_SER_LIBPATH\" :\n"
6538 " (flag == LA_SER_RUNPATH) ? \"LA_SER_RUNPATH\" :\n"
6539 " (flag == LA_SER_DEFAULT) ? \"LA_SER_DEFAULT\" :\n"
6540 " (flag == LA_SER_CONFIG) ? \"LA_SER_CONFIG\" :\n"
6541 " (flag == LA_SER_SECURE) ? \"LA_SER_SECURE\" :\n"
6546 #: build/C/man7/rtld-audit.7:530
6554 #: build/C/man7/rtld-audit.7:540
6558 "la_activity (uintptr_t *cookie, unsigned int flag)\n"
6560 " printf(\"la_activity(): cookie = %x; flag = %s\\en\", cookie,\n"
6561 " (flag == LA_ACT_CONSISTENT) ? \"LA_ACT_CONSISTENT\" :\n"
6562 " (flag == LA_ACT_ADD) ? \"LA_ACT_ADD\" :\n"
6563 " (flag == LA_ACT_DELETE) ? \"LA_ACT_DELETE\" :\n"
6569 #: build/C/man7/rtld-audit.7:550
6573 "la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie)\n"
6575 " printf(\"la_objopen(): loading \\e\"%s\\e\"; lmid = %s; "
6576 "cookie=%x\\en\",\n"
6577 " map-E<gt>l_name,\n"
6578 " (lmid == LM_ID_BASE) ? \"LM_ID_BASE\" :\n"
6579 " (lmid == LM_ID_NEWLM) ? \"LM_ID_NEWLM\" :\n"
6585 #: build/C/man7/rtld-audit.7:553
6588 " return LA_FLG_BINDTO | LA_FLG_BINDFROM;\n"
6593 #: build/C/man7/rtld-audit.7:558
6597 "la_objclose (uintptr_t *cookie)\n"
6599 " printf(\"la_objclose(): %x\\en\", cookie);\n"
6603 #: build/C/man7/rtld-audit.7:561
6611 #: build/C/man7/rtld-audit.7:567
6615 "la_preinit(uintptr_t *cookie)\n"
6617 " printf(\"la_preinit(): %x\\en\", cookie);\n"
6622 #: build/C/man7/rtld-audit.7:576
6626 "la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
6627 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
6629 " printf(\"la_symbind32(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
6630 " symname, sym-E<gt>st_value);\n"
6631 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
6632 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
6636 #: build/C/man7/rtld-audit.7:579 build/C/man7/rtld-audit.7:591 build/C/man7/rtld-audit.7:601
6639 " return sym-E<gt>st_value;\n"
6644 #: build/C/man7/rtld-audit.7:588
6648 "la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
6649 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
6651 " printf(\"la_symbind64(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
6652 " symname, sym-E<gt>st_value);\n"
6653 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
6654 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
6658 #: build/C/man7/rtld-audit.7:598
6662 "la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx,\n"
6663 " uintptr_t *refcook, uintptr_t *defcook, La_i86_regs *regs,\n"
6664 " unsigned int *flags, const char *symname, long int *framesizep)\n"
6666 " printf(\"la_i86_gnu_pltenter(): %s (%p)\\en\", symname, "
6667 "sym-E<gt>st_value);\n"
6671 #: build/C/man7/rtld-audit.7:607
6672 msgid "B<ldd>(1), B<dlopen>(3), B<ld.so>(8), B<ldconfig>(8)"
6676 #: build/C/man8/sln.8:25
6682 #: build/C/man8/sln.8:25
6688 #: build/C/man8/sln.8:28
6689 msgid "sln - create symbolic links"
6693 #: build/C/man8/sln.8:30
6694 msgid "B<sln>I< source dest>"
6698 #: build/C/man8/sln.8:32
6699 msgid "B<sln>I< filelist>"
6703 #: build/C/man8/sln.8:42
6705 "The B<sln> program creates symbolic links. Unlike the B<ln>(1) program, it "
6706 "is statically linked. This means that if for some reason the dynamic linker "
6707 "is not working, B<sln> can be used to make symbolic links to dynamic "
6712 #: build/C/man8/sln.8:48
6714 "The command line has two forms. In the first form, it creates I<dest> as a "
6715 "new symbolic link to I<source>."
6719 #: build/C/man8/sln.8:56
6721 "In the second form, I<filelist> is a list of space-separated pathname pairs, "
6722 "and the effect is as if B<sln> was executed once for each line of the file, "
6723 "with the two pathnames as the arguments."
6727 #: build/C/man8/sln.8:60
6728 msgid "The B<sln> program supports no command-line options."
6732 #: build/C/man8/sln.8:64
6733 msgid "B<ln>(1), B<ldconfig>(8), B<ld.so>(8)"