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: 2015-01-23 22:24+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=UTF-8\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/man1/memusage.1:24 build/C/man1/memusagestat.1:23 build/C/man1/mtrace.1:23 build/C/man1/pldd.1:25 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/man1/memusage.1:25 build/C/man1/memusagestat.1:24 build/C/man1/mtrace.1:24 build/C/man1/pldd.1:26 build/C/man7/rtld-audit.7:29 build/C/man8/sln.8:26 build/C/man1/sprof.1: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/man1/memusage.1:27 build/C/man1/memusagestat.1:26 build/C/man1/mtrace.1:26 build/C/man1/pldd.1:28 build/C/man7/rtld-audit.7:31 build/C/man8/sln.8:28 build/C/man1/sprof.1: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/man1/memusage.1:29 build/C/man1/memusagestat.1:28 build/C/man1/mtrace.1:28 build/C/man1/pldd.1:33 build/C/man7/rtld-audit.7:35 build/C/man8/sln.8:32 build/C/man1/sprof.1:33
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 build/C/man1/pldd.1:50
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/man1/pldd.1:53 build/C/man7/rtld-audit.7:461 build/C/man1/sprof.1:75
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/man1/memusage.1:201 build/C/man1/memusagestat.1:81 build/C/man1/pldd.1:71 build/C/man7/rtld-audit.7:502 build/C/man1/sprof.1:79
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:521 build/C/man5/elf.5:1939 build/C/man3/end.3:108 build/C/man8/ld.so.8:489 build/C/man8/ldconfig.8:175 build/C/man1/ldd.1:108 build/C/man1/memusage.1:271 build/C/man1/memusagestat.1:88 build/C/man1/mtrace.1:61 build/C/man1/pldd.1:91 build/C/man7/rtld-audit.7:602 build/C/man8/sln.8:60 build/C/man1/sprof.1:299
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:531 build/C/man5/elf.5:1963 build/C/man3/end.3:113 build/C/man8/ld.so.8:505 build/C/man8/ldconfig.8:178 build/C/man1/ldd.1:113 build/C/man1/memusage.1:275 build/C/man1/memusagestat.1:91 build/C/man1/mtrace.1:64 build/C/man1/pldd.1:96 build/C/man7/rtld-audit.7:607 build/C/man8/sln.8:64 build/C/man1/sprof.1:303
332 #: build/C/man3/dl_iterate_phdr.3:213 build/C/man3/dlopen.3:539 build/C/man5/elf.5:1971 build/C/man3/end.3:121 build/C/man8/ld.so.8:513 build/C/man8/ldconfig.8:186 build/C/man1/ldd.1:121 build/C/man1/memusage.1:283 build/C/man1/memusagestat.1:99 build/C/man1/mtrace.1:72 build/C/man1/pldd.1:104 build/C/man7/rtld-audit.7:615 build/C/man8/sln.8:72 build/C/man1/sprof.1:311
334 "This page is part of release 3.78 of the Linux I<man-pages> project. A "
335 "description of the project, information about reporting bugs, and the latest "
336 "version of this page, can be found at "
337 "\\%http://www.kernel.org/doc/man-pages/."
341 #: build/C/man3/dlopen.3:35
347 #: build/C/man3/dlopen.3:35 build/C/man1/ldd.1:14
353 #: build/C/man3/dlopen.3:35 build/C/man5/elf.5:35 build/C/man7/rtld-audit.7:28 build/C/man1/sprof.1:25
359 #: build/C/man3/dlopen.3:39
361 "dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to "
362 "dynamic linking loader"
366 #: build/C/man3/dlopen.3:41
367 msgid "B<#include E<lt>dlfcn.hE<gt>>"
371 #: build/C/man3/dlopen.3:43
372 msgid "B<void *dlopen(const char *>I<filename>B<, int >I<flag>B<);>"
376 #: build/C/man3/dlopen.3:45
377 msgid "B<char *dlerror(void);>"
381 #: build/C/man3/dlopen.3:47
382 msgid "B<void *dlsym(void *>I<handle>B<, const char *>I<symbol>B<);>"
386 #: build/C/man3/dlopen.3:49
387 msgid "B<int dlclose(void *>I<handle>B<);>"
391 #: build/C/man3/dlopen.3:51
392 msgid "Link with I<-ldl>."
396 #: build/C/man3/dlopen.3:58
398 "The four functions B<dlopen>(), B<dlsym>(), B<dlclose>(), B<dlerror>() "
399 "implement the interface to the dynamic linking loader."
403 #: build/C/man3/dlopen.3:58
409 #: build/C/man3/dlopen.3:71
411 "The function B<dlerror>() returns a human-readable string describing the "
412 "most recent error that occurred from B<dlopen>(), B<dlsym>() or "
413 "B<dlclose>() since the last call to B<dlerror>(). It returns NULL if no "
414 "errors have occurred since initialization or since it was last called."
418 #: build/C/man3/dlopen.3:71
424 #: build/C/man3/dlopen.3:89
426 "The function B<dlopen>() loads the dynamic library file named by the "
427 "null-terminated string I<filename> and returns an opaque \"handle\" for the "
428 "dynamic library. If I<filename> is NULL, then the returned handle is for "
429 "the main program. If I<filename> contains a slash (\"/\"), then it is "
430 "interpreted as a (relative or absolute) pathname. Otherwise, the dynamic "
431 "linker searches for the library as follows (see B<ld.so>(8) for further "
436 #: 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
442 #: build/C/man3/dlopen.3:93
444 "(ELF only) If the executable file for the calling program contains a "
445 "DT_RPATH tag, and does not contain a DT_RUNPATH tag, then the directories "
446 "listed in the DT_RPATH tag are searched."
450 #: build/C/man3/dlopen.3:100
452 "If, at the time that the program was started, the environment variable "
453 "B<LD_LIBRARY_PATH> was defined to contain a colon-separated list of "
454 "directories, then these are searched. (As a security measure this variable "
455 "is ignored for set-user-ID and set-group-ID programs.)"
459 #: build/C/man3/dlopen.3:104
461 "(ELF only) If the executable file for the calling program contains a "
462 "DT_RUNPATH tag, then the directories listed in that tag are searched."
466 #: build/C/man3/dlopen.3:111
468 "The cache file I</etc/ld.so.cache> (maintained by B<ldconfig>(8)) is "
469 "checked to see whether it contains an entry for I<filename>."
473 #: build/C/man3/dlopen.3:117
474 msgid "The directories I</lib> and I</usr/lib> are searched (in that order)."
478 #: build/C/man3/dlopen.3:123
480 "If the library has dependencies on other shared libraries, then these are "
481 "also automatically loaded by the dynamic linker using the same rules. (This "
482 "process may occur recursively, if those libraries in turn have dependencies, "
487 #: build/C/man3/dlopen.3:126
488 msgid "One of the following two values must be included in I<flag>:"
492 #: build/C/man3/dlopen.3:126
498 #: build/C/man3/dlopen.3:134
500 "Perform lazy binding. Only resolve symbols as the code that references them "
501 "is executed. If the symbol is never referenced, then it is never resolved. "
502 "(Lazy binding is performed only for function references; references to "
503 "variables are always immediately bound when the library is loaded.)"
507 #: build/C/man3/dlopen.3:134
513 #: build/C/man3/dlopen.3:143
515 "If this value is specified, or the environment variable B<LD_BIND_NOW> is "
516 "set to a nonempty string, all undefined symbols in the library are resolved "
517 "before B<dlopen>() returns. If this cannot be done, an error is returned."
521 #: build/C/man3/dlopen.3:146
522 msgid "Zero or more of the following values may also be ORed in I<flag>:"
526 #: build/C/man3/dlopen.3:146
528 msgid "B<RTLD_GLOBAL>"
532 #: build/C/man3/dlopen.3:150
534 "The symbols defined by this library will be made available for symbol "
535 "resolution of subsequently loaded libraries."
539 #: build/C/man3/dlopen.3:150
541 msgid "B<RTLD_LOCAL>"
545 #: build/C/man3/dlopen.3:157
547 "This is the converse of B<RTLD_GLOBAL>, and the default if neither flag is "
548 "specified. Symbols defined in this library are not made available to "
549 "resolve references in subsequently loaded libraries."
553 #: build/C/man3/dlopen.3:157
555 msgid "B<RTLD_NODELETE> (since glibc 2.2)"
558 #. (But it is present on Solaris.)
560 #: build/C/man3/dlopen.3:167
562 "Do not unload the library during B<dlclose>(). Consequently, the library's "
563 "static variables are not reinitialized if the library is reloaded with "
564 "B<dlopen>() at a later time. This flag is not specified in POSIX.1-2001."
568 #: build/C/man3/dlopen.3:167
570 msgid "B<RTLD_NOLOAD> (since glibc 2.2)"
573 #. (But it is present on Solaris.)
575 #: build/C/man3/dlopen.3:182
577 "Don't load the library. This can be used to test if the library is already "
578 "resident (B<dlopen>() returns NULL if it is not, or the library's handle if "
579 "it is resident). This flag can also be used to promote the flags on a "
580 "library that is already loaded. For example, a library that was previously "
581 "loaded with B<RTLD_LOCAL> can be reopened with B<RTLD_NOLOAD\\ |\\ "
582 "RTLD_GLOBAL>. This flag is not specified in POSIX.1-2001."
586 #: build/C/man3/dlopen.3:182
588 msgid "B<RTLD_DEEPBIND> (since glibc 2.3.4)"
591 #. Inimitably described by UD in
592 #. http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
594 #: build/C/man3/dlopen.3:192
596 "Place the lookup scope of the symbols in this library ahead of the global "
597 "scope. This means that a self-contained library will use its own symbols in "
598 "preference to global symbols with the same name contained in libraries that "
599 "have already been loaded. This flag is not specified in POSIX.1-2001."
603 #: build/C/man3/dlopen.3:204
605 "If I<filename> is NULL, then the returned handle is for the main program. "
606 "When given to B<dlsym>(), this handle causes a search for a symbol in the "
607 "main program, followed by all shared libraries loaded at program startup, "
608 "and then all shared libraries loaded by B<dlopen>() with the flag "
613 #: build/C/man3/dlopen.3:214
615 "External references in the library are resolved using the libraries in that "
616 "library's dependency list and any other libraries previously opened with the "
617 "B<RTLD_GLOBAL> flag. If the executable was linked with the flag "
618 "\"-rdynamic\" (or, synonymously, \"--export-dynamic\"), then the global "
619 "symbols in the executable will also be used to resolve references in a "
620 "dynamically loaded library."
624 #: build/C/man3/dlopen.3:232
626 "If the same library is loaded again with B<dlopen>(), the same library "
627 "handle is returned. The dl library maintains reference counts for library "
628 "handles, so a dynamic library is not deallocated until B<dlclose>() has "
629 "been called on it as many times as B<dlopen>() has succeeded on it. The "
630 "B<_init>() routine, if present, is called only once. But a subsequent call "
631 "with B<RTLD_NOW> may force symbol resolution for a library earlier loaded "
636 #: build/C/man3/dlopen.3:236
637 msgid "If B<dlopen>() fails for any reason, it returns NULL."
641 #: build/C/man3/dlopen.3:236
647 #: build/C/man3/dlopen.3:265
649 "The function B<dlsym>() takes a \"handle\" of a dynamic library returned by "
650 "B<dlopen>() and the null-terminated symbol name, returning the address "
651 "where that symbol is loaded into memory. If the symbol is not found, in the "
652 "specified library or any of the libraries that were automatically loaded by "
653 "B<dlopen>() when that library was loaded, B<dlsym>() returns NULL. (The "
654 "search performed by B<dlsym>() is breadth first through the dependency tree "
655 "of these libraries.) Since the value of the symbol could actually be NULL "
656 "(so that a NULL return from B<dlsym>() need not indicate an error), the "
657 "correct way to test for an error is to call B<dlerror>() to clear any old "
658 "error conditions, then call B<dlsym>(), and then call B<dlerror>() again, "
659 "saving its return value into a variable, and check whether this saved value "
664 #: build/C/man3/dlopen.3:277
666 "There are two special pseudo-handles, B<RTLD_DEFAULT> and B<RTLD_NEXT>. The "
667 "former will find the first occurrence of the desired symbol using the "
668 "default library search order. The latter will find the next occurrence of a "
669 "function in the search order after the current library. This allows one to "
670 "provide a wrapper around a function in another shared library."
674 #: build/C/man3/dlopen.3:277
680 #: build/C/man3/dlopen.3:284
682 "The function B<dlclose>() decrements the reference count on the dynamic "
683 "library handle I<handle>. If the reference count drops to zero and no other "
684 "loaded libraries use symbols in it, then the dynamic library is unloaded."
688 #: build/C/man3/dlopen.3:288
689 msgid "The function B<dlclose>() returns 0 on success, and nonzero on error."
693 #: build/C/man3/dlopen.3:288
695 msgid "The obsolete symbols _init() and _fini()"
699 #: build/C/man3/dlopen.3:306
701 "The linker recognizes special symbols B<_init> and B<_fini>. If a dynamic "
702 "library exports a routine named B<_init>(), then that code is executed after "
703 "the loading, before B<dlopen>() returns. If the dynamic library exports a "
704 "routine named B<_fini>(), then that routine is called just before the "
705 "library is unloaded. In case you need to avoid linking against the system "
706 "startup files, this can be done by using the B<gcc>(1) I<-nostartfiles> "
707 "command-line option."
710 #. void _init(void) __attribute__((constructor));
711 #. void _fini(void) __attribute__((destructor));
713 #: build/C/man3/dlopen.3:317
715 "Using these routines, or the gcc B<-nostartfiles> or B<-nostdlib> options, "
716 "is not recommended. Their use may result in undesired behavior, since the "
717 "constructor/destructor routines will not be executed (unless special "
718 "measures are taken)."
722 #: build/C/man3/dlopen.3:329
724 "Instead, libraries should export routines using the "
725 "B<__attribute__((constructor))> and B<__attribute__((destructor))> function "
726 "attributes. See the gcc info pages for information on these. Constructor "
727 "routines are executed before B<dlopen>() returns, and destructor routines "
728 "are executed before B<dlclose>() returns."
732 #: build/C/man3/dlopen.3:329
734 msgid "Glibc extensions: dladdr() and dlvsym()"
738 #: build/C/man3/dlopen.3:331
739 msgid "Glibc adds two functions not described by POSIX, with prototypes"
743 #: build/C/man3/dlopen.3:335
746 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
747 "B<#include E<lt>dlfcn.hE<gt>>\n"
751 #: build/C/man3/dlopen.3:337
753 msgid "B<int dladdr(void *>I<addr>B<, Dl_info *>I<info>B<);>\n"
757 #: build/C/man3/dlopen.3:339
760 "B<void *dlvsym(void *>I<handle>B<, char *>I<symbol>B<, char "
761 "*>I<version>B<);>\n"
765 #: build/C/man3/dlopen.3:348
767 "The function B<dladdr>() takes a function pointer and tries to resolve name "
768 "and file where it is located. Information is stored in the I<Dl_info> "
773 #: build/C/man3/dlopen.3:361
777 " const char *dli_fname; /* Pathname of shared object that\n"
778 " contains address */\n"
779 " void *dli_fbase; /* Address at which shared object\n"
781 " const char *dli_sname; /* Name of symbol whose definition\n"
782 " overlaps I<addr> */\n"
783 " void *dli_saddr; /* Exact address of symbol named\n"
784 " in I<dli_sname> */\n"
789 #: build/C/man3/dlopen.3:371
791 "If no symbol matching I<addr> could be found, then I<dli_sname> and "
792 "I<dli_saddr> are set to NULL."
796 #: build/C/man3/dlopen.3:374
797 msgid "B<dladdr>() returns 0 on error, and nonzero on success."
801 #: build/C/man3/dlopen.3:381
803 "The function B<dlvsym>(), provided by glibc since version 2.1, does the same "
804 "as B<dlsym>() but takes a version string as an additional argument."
808 #: build/C/man3/dlopen.3:388
810 "POSIX.1-2001 describes B<dlclose>(), B<dlerror>(), B<dlopen>(), and "
815 #: build/C/man3/dlopen.3:388 build/C/man5/elf.5:1912 build/C/man3/end.3:53 build/C/man8/ld.so.8:483 build/C/man1/pldd.1:84 build/C/man7/rtld-audit.7:467
821 #. The string returned by
823 #. should not be modified.
824 #. Some systems give the prototype as
827 #. .B "const char *dlerror(void);"
830 #: build/C/man3/dlopen.3:407
832 "The symbols B<RTLD_DEFAULT> and B<RTLD_NEXT> are defined by "
833 "I<E<lt>dlfcn.hE<gt>> only when B<_GNU_SOURCE> was defined before including "
838 #: build/C/man3/dlopen.3:412
840 "Since glibc 2.2.3, B<atexit>(3) can be used to register an exit handler "
841 "that is automatically called when a library is unloaded."
845 #: build/C/man3/dlopen.3:412
851 #: build/C/man3/dlopen.3:418
853 "The dlopen interface standard comes from SunOS. That system also has "
854 "B<dladdr>(), but not B<dlvsym>()."
858 #: build/C/man3/dlopen.3:418 build/C/man1/ldd.1:91 build/C/man1/memusage.1:267 build/C/man1/memusagestat.1:84 build/C/man1/mtrace.1:58 build/C/man7/rtld-audit.7:492
864 #: build/C/man3/dlopen.3:430
866 "Sometimes, the function pointers you pass to B<dladdr>() may surprise you. "
867 "On some architectures (notably i386 and x86_64), I<dli_fname> and "
868 "I<dli_fbase> may end up pointing back at the object from which you called "
869 "B<dladdr>(), even if the function used as an argument should come from a "
870 "dynamically linked library."
874 #: build/C/man3/dlopen.3:446
876 "The problem is that the function pointer will still be resolved at compile "
877 "time, but merely point to the I<plt> (Procedure Linkage Table) section of "
878 "the original object (which dispatches the call after asking the dynamic "
879 "linker to resolve the symbol). To work around this, you can try to compile "
880 "the code to be position-independent: then, the compiler cannot prepare the "
881 "pointer at compile time anymore and today's B<gcc>(1) will generate code "
882 "that just loads the final symbol address from the I<got> (Global Offset "
883 "Table) at run time before passing it to B<dladdr>()."
887 #: build/C/man3/dlopen.3:448
888 msgid "Load the math library, and print the cosine of 2.0:"
892 #: build/C/man3/dlopen.3:453
895 "#include E<lt>stdio.hE<gt>\n"
896 "#include E<lt>stdlib.hE<gt>\n"
897 "#include E<lt>dlfcn.hE<gt>\n"
901 #: build/C/man3/dlopen.3:460
905 "main(int argc, char **argv)\n"
908 " double (*cosine)(double);\n"
913 #: build/C/man3/dlopen.3:466
916 " handle = dlopen(\"libm.so\", RTLD_LAZY);\n"
918 " fprintf(stderr, \"%s\\en\", dlerror());\n"
919 " exit(EXIT_FAILURE);\n"
924 #: build/C/man3/dlopen.3:468
926 msgid " dlerror(); /* Clear any existing error */\n"
930 #: build/C/man3/dlopen.3:470
932 msgid " cosine = (double (*)(double)) dlsym(handle, \"cos\");\n"
936 #: build/C/man3/dlopen.3:475
939 " /* According to the ISO C standard, casting between function\n"
940 " pointers and 'void *', as done above, produces undefined results.\n"
941 " POSIX.1-2003 and POSIX.1-2008 accepted this state of affairs and\n"
942 " proposed the following workaround:\n"
946 #: build/C/man3/dlopen.3:477
948 msgid " *(void **) (&cosine) = dlsym(handle, \"cos\");\n"
952 #: build/C/man3/dlopen.3:480
955 " This (clumsy) cast conforms with the ISO C standard and will\n"
956 " avoid any compiler warnings.\n"
959 #. http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
960 #. http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
961 #. http://austingroupbugs.net/view.php?id=74
963 #: build/C/man3/dlopen.3:489
966 " The 2013 Technical Corrigendum to POSIX.1-2008 (a.k.a.\n"
967 " POSIX.1-2013) improved matters by requiring that conforming\n"
968 " implementations support casting 'void *' to a function pointer.\n"
969 " Nevertheless, some compilers (e.g., gcc with the '-pedantic'\n"
970 " option) may complain about the cast used in this program. */\n"
974 #: build/C/man3/dlopen.3:495
977 " error = dlerror();\n"
978 " if (error != NULL) {\n"
979 " fprintf(stderr, \"%s\\en\", error);\n"
980 " exit(EXIT_FAILURE);\n"
985 #: build/C/man3/dlopen.3:500
988 " printf(\"%f\\en\", (*cosine)(2.0));\n"
989 " dlclose(handle);\n"
990 " exit(EXIT_SUCCESS);\n"
995 #: build/C/man3/dlopen.3:504
997 "If this program were in a file named \"foo.c\", you would build the program "
998 "with the following command:"
1002 #: build/C/man3/dlopen.3:507
1004 msgid " gcc -rdynamic -o foo foo.c -ldl\n"
1008 #: build/C/man3/dlopen.3:517
1010 "Libraries exporting B<_init>() and B<_fini>() will want to be compiled as "
1011 "follows, using I<bar.c> as the example name:"
1015 #: build/C/man3/dlopen.3:520
1017 msgid " gcc -shared -nostartfiles -o bar bar.c\n"
1021 #: build/C/man3/dlopen.3:529
1023 "B<ld>(1), B<ldd>(1), B<pldd>(1), B<dl_iterate_phdr>(3), B<rtld-audit>(7), "
1024 "B<ld.so>(8), B<ldconfig>(8)"
1028 #: build/C/man3/dlopen.3:531
1029 msgid "ld.so info pages, gcc info pages, ld info pages"
1033 #: build/C/man5/elf.5:35
1039 #: build/C/man5/elf.5:35
1045 #: build/C/man5/elf.5:38
1046 msgid "elf - format of Executable and Linking Format (ELF) files"
1049 #. .B #include <elf_abi.h>
1051 #: build/C/man5/elf.5:42
1053 msgid "B<#include E<lt>elf.hE<gt>>\n"
1057 #: build/C/man5/elf.5:50
1059 "The header file I<E<lt>elf.hE<gt>> defines the format of ELF executable "
1060 "binary files. Amongst these files are normal executable files, relocatable "
1061 "object files, core files and shared libraries."
1065 #: build/C/man5/elf.5:59
1067 "An executable file using the ELF file format consists of an ELF header, "
1068 "followed by a program header table or a section header table, or both. The "
1069 "ELF header is always at offset zero of the file. The program header table "
1070 "and the section header table's offset in the file are defined in the ELF "
1071 "header. The two tables describe the rest of the particularities of the "
1075 #. Applications which wish to process ELF binary files for their native
1076 #. architecture only should include
1078 #. in their source code.
1079 #. These applications should need to refer to
1080 #. all the types and structures by their generic names
1082 #. and to the macros by
1084 #. Applications written this way can be compiled on any architecture,
1085 #. regardless of whether the host is 32-bit or 64-bit.
1087 #. Should an application need to process ELF files of an unknown
1088 #. architecture, then the application needs to explicitly use either
1092 #. type and structure names.
1093 #. Likewise, the macros need to be identified by
1099 #: build/C/man5/elf.5:86
1101 "This header file describes the above mentioned headers as C structures and "
1102 "also includes structures for dynamic sections, relocation sections and "
1107 #: build/C/man5/elf.5:98
1109 "The following types are used for N-bit architectures (N=32,64, I<ElfN> "
1110 "stands for I<Elf32> or I<Elf64>, I<uintN_t> stands for I<uint32_t> or "
1114 #. Elf32_Size Unsigned object size
1116 #: build/C/man5/elf.5:112
1119 "ElfN_Addr Unsigned program address, uintN_t\n"
1120 "ElfN_Off Unsigned file offset, uintN_t\n"
1121 "ElfN_Section Unsigned section index, uint16_t\n"
1122 "ElfN_Versym Unsigned version symbol information, uint16_t\n"
1123 "Elf_Byte unsigned char\n"
1124 "ElfN_Half uint16_t\n"
1125 "ElfN_Sword int32_t\n"
1126 "ElfN_Word uint32_t\n"
1127 "ElfN_Sxword int64_t\n"
1128 "ElfN_Xword uint64_t\n"
1132 #: build/C/man5/elf.5:127
1134 "(Note: The *BSD terminology is a bit different. There I<Elf64_Half> is "
1135 "twice as large as I<Elf32_Half>, and I<Elf64Quarter> is used for "
1136 "I<uint16_t>. In order to avoid confusion these types are replaced by "
1137 "explicit ones in the below.)"
1141 #: build/C/man5/elf.5:134
1143 "All data structures that the file format defines follow the \"natural\" size "
1144 "and alignment guidelines for the relevant class. If necessary, data "
1145 "structures contain explicit padding to ensure 4-byte alignment for 4-byte "
1146 "objects, to force structure sizes to a multiple of 4, and so on."
1150 #: build/C/man5/elf.5:139
1151 msgid "The ELF header is described by the type I<Elf32_Ehdr> or I<Elf64_Ehdr>:"
1155 #: build/C/man5/elf.5:143
1157 msgid "#define EI_NIDENT 16\n"
1161 #: build/C/man5/elf.5:160
1164 "typedef struct {\n"
1165 " unsigned char e_ident[EI_NIDENT];\n"
1166 " uint16_t e_type;\n"
1167 " uint16_t e_machine;\n"
1168 " uint32_t e_version;\n"
1169 " ElfN_Addr e_entry;\n"
1170 " ElfN_Off e_phoff;\n"
1171 " ElfN_Off e_shoff;\n"
1172 " uint32_t e_flags;\n"
1173 " uint16_t e_ehsize;\n"
1174 " uint16_t e_phentsize;\n"
1175 " uint16_t e_phnum;\n"
1176 " uint16_t e_shentsize;\n"
1177 " uint16_t e_shnum;\n"
1178 " uint16_t e_shstrndx;\n"
1182 #. .Bl -tag -width "e_phentsize"
1184 #: build/C/man5/elf.5:165
1185 msgid "The fields have the following meanings:"
1189 #: build/C/man5/elf.5:165
1195 #: build/C/man5/elf.5:175
1197 "This array of bytes specifies to interpret the file, independent of the "
1198 "processor or the file's remaining contents. Within this array everything is "
1199 "named by macros, which start with the prefix B<EI_> and may contain values "
1200 "which start with the prefix B<ELF>. The following macros are defined:"
1204 #: build/C/man5/elf.5:177
1210 #: build/C/man5/elf.5:183
1212 "The first byte of the magic number. It must be filled with B<ELFMAG0>. (0: "
1217 #: build/C/man5/elf.5:183
1223 #: build/C/man5/elf.5:189
1225 "The second byte of the magic number. It must be filled with B<ELFMAG1>. "
1230 #: build/C/man5/elf.5:189
1236 #: build/C/man5/elf.5:195
1238 "The third byte of the magic number. It must be filled with B<ELFMAG2>. (2: "
1243 #: build/C/man5/elf.5:195
1249 #: build/C/man5/elf.5:201
1251 "The fourth byte of the magic number. It must be filled with B<ELFMAG3>. "
1256 #: build/C/man5/elf.5:201
1262 #: build/C/man5/elf.5:204
1263 msgid "The fifth byte identifies the architecture for this binary:"
1267 #: build/C/man5/elf.5:206
1269 msgid "B<ELFCLASSNONE>"
1273 #: build/C/man5/elf.5:210
1274 msgid "This class is invalid."
1278 #: build/C/man5/elf.5:210
1280 msgid "B<ELFCLASS32>"
1284 #: build/C/man5/elf.5:215
1286 "This defines the 32-bit architecture. It supports machines with files and "
1287 "virtual address spaces up to 4 Gigabytes."
1291 #: build/C/man5/elf.5:215
1293 msgid "B<ELFCLASS64>"
1297 #: build/C/man5/elf.5:218
1298 msgid "This defines the 64-bit architecture."
1302 #: build/C/man5/elf.5:221
1307 #. .Bl -tag -width "ELFDATA2LSB" -compact
1309 #: build/C/man5/elf.5:227
1311 "The sixth byte specifies the data encoding of the processor-specific data in "
1312 "the file. Currently these encodings are supported:"
1316 #: build/C/man5/elf.5:228
1318 msgid "B<ELFDATANONE>"
1322 #: build/C/man5/elf.5:232
1323 msgid "Unknown data format."
1327 #: build/C/man5/elf.5:232
1329 msgid "B<ELFDATA2LSB>"
1333 #: build/C/man5/elf.5:235
1334 msgid "Two's complement, little-endian."
1338 #: build/C/man5/elf.5:235
1340 msgid "B<ELFDATA2MSB>"
1344 #: build/C/man5/elf.5:238
1345 msgid "Two's complement, big-endian."
1349 #: build/C/man5/elf.5:241
1351 msgid "B<EI_VERSION>"
1354 #. .Bl -tag -width "EV_CURRENT" -compact
1356 #: build/C/man5/elf.5:246
1357 msgid "The seventh byte is the version number of the ELF specification:"
1361 #: build/C/man5/elf.5:247 build/C/man5/elf.5:501
1367 #: build/C/man5/elf.5:250 build/C/man5/elf.5:505
1368 msgid "Invalid version."
1372 #: build/C/man5/elf.5:250 build/C/man5/elf.5:505
1374 msgid "B<EV_CURRENT>"
1379 #: build/C/man5/elf.5:253 build/C/man5/elf.5:509
1380 msgid "Current version."
1384 #: build/C/man5/elf.5:256
1389 #. .Bl -tag -width "ELFOSABI_STANDALONE" -compact
1391 #: build/C/man5/elf.5:265
1393 "The eighth byte identifies the operating system and ABI to which the object "
1394 "is targeted. Some fields in other ELF structures have flags and values that "
1395 "have platform-specific meanings; the interpretation of those fields is "
1396 "determined by the value of this byte. For example:"
1400 #: build/C/man5/elf.5:266
1402 msgid "B<ELFOSABI_NONE>"
1407 #: build/C/man5/elf.5:271
1408 msgid "Same as ELFOSABI_SYSV"
1412 #: build/C/man5/elf.5:271
1414 msgid "B<ELFOSABI_SYSV>"
1418 #. synonym: ELFOSABI_NONE
1420 #: build/C/man5/elf.5:276
1421 msgid "UNIX System V ABI."
1425 #: build/C/man5/elf.5:276
1427 msgid "B<ELFOSABI_HPUX>"
1432 #: build/C/man5/elf.5:280
1437 #: build/C/man5/elf.5:280
1439 msgid "B<ELFOSABI_NETBSD>"
1444 #: build/C/man5/elf.5:284
1449 #: build/C/man5/elf.5:284
1451 msgid "B<ELFOSABI_LINUX>"
1456 #. .BR ELFOSABI_HURD
1460 #. .BR ELFOSABI_86OPEN
1461 #. 86Open Common IA32 ABI.
1464 #: build/C/man5/elf.5:296
1469 #: build/C/man5/elf.5:296
1471 msgid "B<ELFOSABI_SOLARIS>"
1476 #. .BR ELFOSABI_MONTEREY
1477 #. Monterey project ABI.
1482 #: build/C/man5/elf.5:306
1483 msgid "Solaris ABI."
1487 #: build/C/man5/elf.5:306
1489 msgid "B<ELFOSABI_IRIX>"
1494 #: build/C/man5/elf.5:310
1499 #: build/C/man5/elf.5:310
1501 msgid "B<ELFOSABI_FREEBSD>"
1506 #: build/C/man5/elf.5:314
1507 msgid "FreeBSD ABI."
1511 #: build/C/man5/elf.5:314
1513 msgid "B<ELFOSABI_TRU64>"
1522 #: build/C/man5/elf.5:322
1523 msgid "TRU64 UNIX ABI."
1527 #: build/C/man5/elf.5:322
1529 msgid "B<ELFOSABI_ARM>"
1534 #: build/C/man5/elf.5:326
1535 msgid "ARM architecture ABI."
1539 #: build/C/man5/elf.5:326
1541 msgid "B<ELFOSABI_STANDALONE>"
1547 #: build/C/man5/elf.5:331
1548 msgid "Stand-alone (embedded) ABI."
1552 #: build/C/man5/elf.5:333
1554 msgid "B<EI_ABIVERSION>"
1558 #: build/C/man5/elf.5:343
1560 "The ninth byte identifies the version of the ABI to which the object is "
1561 "targeted. This field is used to distinguish among incompatible versions of "
1562 "an ABI. The interpretation of this version number is dependent on the ABI "
1563 "identified by the B<EI_OSABI> field. Applications conforming to this "
1564 "specification use the value 0."
1568 #: build/C/man5/elf.5:343
1573 #. As reported by Yuri Kozlov and confirmed by Mike Frysinger, EI_BRAND is
1574 #. not in GABI (http://www.sco.com/developers/gabi/latest/ch4.eheader.html)
1575 #. It looks to be a BSDism
1578 #. Start of architecture identification.
1580 #: build/C/man5/elf.5:359
1582 "Start of padding. These bytes are reserved and set to zero. Programs which "
1583 "read them should ignore them. The value for B<EI_PAD> will change in the "
1584 "future if currently unused bytes are given meanings."
1588 #: build/C/man5/elf.5:359
1590 msgid "B<EI_NIDENT>"
1595 #: build/C/man5/elf.5:365
1596 msgid "The size of the I<e_ident> array."
1600 #: build/C/man5/elf.5:366
1606 #: build/C/man5/elf.5:369
1607 msgid "This member of the structure identifies the object file type:"
1611 #: build/C/man5/elf.5:371
1617 #: build/C/man5/elf.5:375
1618 msgid "An unknown type."
1622 #: build/C/man5/elf.5:375
1628 #: build/C/man5/elf.5:378
1629 msgid "A relocatable file."
1633 #: build/C/man5/elf.5:378
1639 #: build/C/man5/elf.5:381
1640 msgid "An executable file."
1644 #: build/C/man5/elf.5:381
1650 #: build/C/man5/elf.5:384
1651 msgid "A shared object."
1655 #: build/C/man5/elf.5:384
1661 #: build/C/man5/elf.5:387
1662 msgid "A core file."
1666 #: build/C/man5/elf.5:390
1668 msgid "I<e_machine>"
1672 #: build/C/man5/elf.5:394
1674 "This member specifies the required architecture for an individual file. For "
1679 #: build/C/man5/elf.5:396
1686 #: build/C/man5/elf.5:401
1687 msgid "An unknown machine."
1691 #: build/C/man5/elf.5:401
1698 #: build/C/man5/elf.5:405
1699 msgid "AT&T WE 32100."
1703 #: build/C/man5/elf.5:405
1710 #: build/C/man5/elf.5:409
1711 msgid "Sun Microsystems SPARC."
1715 #: build/C/man5/elf.5:409
1722 #: build/C/man5/elf.5:413
1723 msgid "Intel 80386."
1727 #: build/C/man5/elf.5:413
1734 #: build/C/man5/elf.5:417
1735 msgid "Motorola 68000."
1739 #: build/C/man5/elf.5:417
1750 #: build/C/man5/elf.5:425
1751 msgid "Motorola 88000."
1755 #: build/C/man5/elf.5:425
1762 #: build/C/man5/elf.5:429
1763 msgid "Intel 80860."
1767 #: build/C/man5/elf.5:429
1776 #. .BR EM_MIPS_RS4_BE
1777 #. MIPS RS4000 (big-endian only). Deprecated.
1779 #. EM_MIPS_RS3_LE (MIPS R3000 little-endian)
1782 #: build/C/man5/elf.5:441
1783 msgid "MIPS RS3000 (big-endian only)."
1787 #: build/C/man5/elf.5:441
1789 msgid "B<EM_PARISC>"
1794 #: build/C/man5/elf.5:445
1799 #: build/C/man5/elf.5:445
1801 msgid "B<EM_SPARC32PLUS>"
1806 #: build/C/man5/elf.5:449
1807 msgid "SPARC with enhanced instruction set."
1811 #: build/C/man5/elf.5:449
1818 #: build/C/man5/elf.5:453
1823 #: build/C/man5/elf.5:453
1830 #: build/C/man5/elf.5:457
1831 msgid "PowerPC 64-bit."
1835 #: build/C/man5/elf.5:457
1842 #: build/C/man5/elf.5:461
1847 #: build/C/man5/elf.5:461
1854 #: build/C/man5/elf.5:465
1855 msgid "Advanced RISC Machines"
1859 #: build/C/man5/elf.5:465
1866 #: build/C/man5/elf.5:469
1867 msgid "Renesas SuperH"
1871 #: build/C/man5/elf.5:469
1873 msgid "B<EM_SPARCV9>"
1878 #: build/C/man5/elf.5:473
1879 msgid "SPARC v9 64-bit."
1883 #: build/C/man5/elf.5:473
1890 #: build/C/man5/elf.5:477
1891 msgid "Intel Itanium"
1895 #: build/C/man5/elf.5:477
1897 msgid "B<EM_X86_64>"
1902 #: build/C/man5/elf.5:481
1907 #: build/C/man5/elf.5:481
1917 #. Compaq [DEC] Alpha.
1920 #. Compaq [DEC] Alpha with enhanced instruction set.
1922 #: build/C/man5/elf.5:493
1927 #: build/C/man5/elf.5:496
1929 msgid "I<e_version>"
1932 #. .Bl -tag -width "EV_CURRENT" -compact
1934 #: build/C/man5/elf.5:500
1935 msgid "This member identifies the file version:"
1939 #: build/C/man5/elf.5:511
1945 #: build/C/man5/elf.5:517
1947 "This member gives the virtual address to which the system first transfers "
1948 "control, thus starting the process. If the file has no associated entry "
1949 "point, this member holds zero."
1953 #: build/C/man5/elf.5:517
1959 #: build/C/man5/elf.5:522
1961 "This member holds the program header table's file offset in bytes. If the "
1962 "file has no program header table, this member holds zero."
1966 #: build/C/man5/elf.5:522
1972 #: build/C/man5/elf.5:527
1974 "This member holds the section header table's file offset in bytes. If the "
1975 "file has no section header table, this member holds zero."
1979 #: build/C/man5/elf.5:527
1985 #: build/C/man5/elf.5:532
1987 "This member holds processor-specific flags associated with the file. Flag "
1988 "names take the form EF_`machine_flag'. Currently no flags have been "
1993 #: build/C/man5/elf.5:532
1999 #: build/C/man5/elf.5:535
2000 msgid "This member holds the ELF header's size in bytes."
2004 #: build/C/man5/elf.5:535
2006 msgid "I<e_phentsize>"
2010 #: build/C/man5/elf.5:539
2012 "This member holds the size in bytes of one entry in the file's program "
2013 "header table; all entries are the same size."
2017 #: build/C/man5/elf.5:539
2023 #: build/C/man5/elf.5:552
2025 "This member holds the number of entries in the program header table. Thus "
2026 "the product of I<e_phentsize> and I<e_phnum> gives the table's size in "
2027 "bytes. If a file has no program header, I<e_phnum> holds the value zero."
2030 #. This is a Linux extension, added in Linux 2.6.34.
2031 #. .Bl -tag -width "PN_XNUM"
2033 #: build/C/man5/elf.5:566
2035 "If the number of entries in the program header table is larger than or equal "
2036 "to B<PN_XNUM> (0xffff), this member holds B<PN_XNUM> (0xffff) and the real "
2037 "number of entries in the program header table is held in the I<sh_info> "
2038 "member of the initial entry in section header table. Otherwise, the "
2039 "I<sh_info> member of the initial entry contains the value zero."
2043 #: build/C/man5/elf.5:567
2049 #: build/C/man5/elf.5:572
2051 "This is defined as 0xffff, the largest number I<e_phnum> can have, "
2052 "specifying where the actual number of program headers is assigned."
2056 #: build/C/man5/elf.5:576
2058 msgid "I<e_shentsize>"
2062 #: build/C/man5/elf.5:581
2064 "This member holds a sections header's size in bytes. A section header is "
2065 "one entry in the section header table; all entries are the same size."
2069 #: build/C/man5/elf.5:581
2075 #: build/C/man5/elf.5:594
2077 "This member holds the number of entries in the section header table. Thus "
2078 "the product of I<e_shentsize> and I<e_shnum> gives the section header "
2079 "table's size in bytes. If a file has no section header table, I<e_shnum> "
2080 "holds the value of zero."
2084 #: build/C/man5/elf.5:606
2086 "If the number of entries in the section header table is larger than or equal "
2087 "to B<SHN_LORESERVE> (0xff00), I<e_shnum> holds the value zero and the real "
2088 "number of entries in the section header table is held in the I<sh_size> "
2089 "member of the initial entry in section header table. Otherwise, the "
2090 "I<sh_size> member of the initial entry in the section header table holds the "
2095 #: build/C/man5/elf.5:606
2097 msgid "I<e_shstrndx>"
2101 #: build/C/man5/elf.5:613
2103 "This member holds the section header table index of the entry associated "
2104 "with the section name string table. If the file has no section name string "
2105 "table, this member holds the value B<SHN_UNDEF>."
2109 #: build/C/man5/elf.5:625
2111 "If the index of section name string table section is larger than or equal to "
2112 "B<SHN_LORESERVE> (0xff00), this member holds B<SHN_XINDEX> (0xffff) and the "
2113 "real index of the section name string table section is held in the "
2114 "I<sh_link> member of the initial entry in section header table. Otherwise, "
2115 "the I<sh_link> member of the initial entry in section header table contains "
2120 #: build/C/man5/elf.5:627 build/C/man5/elf.5:914
2122 msgid "B<SHN_UNDEF>"
2126 #: build/C/man5/elf.5:636
2128 "This value marks an undefined, missing, irrelevant, or otherwise meaningless "
2129 "section reference. For example, a symbol \"defined\" relative to section "
2130 "number B<SHN_UNDEF> is an undefined symbol."
2134 #: build/C/man5/elf.5:636 build/C/man5/elf.5:918
2136 msgid "B<SHN_LORESERVE>"
2140 #: build/C/man5/elf.5:639 build/C/man5/elf.5:921
2141 msgid "This value specifies the lower bound of the range of reserved indices."
2145 #: build/C/man5/elf.5:639 build/C/man5/elf.5:921
2147 msgid "B<SHN_LOPROC>"
2151 #: build/C/man5/elf.5:644 build/C/man5/elf.5:926
2153 "Values greater than or equal to B<SHN_HIPROC> are reserved for "
2154 "processor-specific semantics."
2158 #: build/C/man5/elf.5:644 build/C/man5/elf.5:926
2160 msgid "B<SHN_HIPROC>"
2164 #: build/C/man5/elf.5:649 build/C/man5/elf.5:931
2166 "Values less than or equal to B<SHN_LOPROC> are reserved for "
2167 "processor-specific semantics."
2171 #: build/C/man5/elf.5:649 build/C/man5/elf.5:931
2177 #: build/C/man5/elf.5:656
2179 "This value specifies absolute values for the corresponding reference. For "
2180 "example, symbols defined relative to section number B<SHN_ABS> have absolute "
2181 "values and are not affected by relocation."
2185 #: build/C/man5/elf.5:656 build/C/man5/elf.5:938
2187 msgid "B<SHN_COMMON>"
2191 #: build/C/man5/elf.5:660
2193 "Symbols defined relative to this section are common symbols, such as Fortran "
2194 "COMMON or unallocated C external variables."
2198 #: build/C/man5/elf.5:660 build/C/man5/elf.5:942
2200 msgid "B<SHN_HIRESERVE>"
2204 #: build/C/man5/elf.5:673
2206 "This value specifies the upper bound of the range of reserved indices "
2207 "between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, inclusive; the values do not "
2208 "reference the section header table. That is, the section header table does "
2209 "I<not> contain entries for the reserved indices."
2213 #: build/C/man5/elf.5:695
2215 "An executable or shared object file's program header table is an array of "
2216 "structures, each describing a segment or other information the system needs "
2217 "to prepare the program for execution. An object file I<segment> contains "
2218 "one or more I<sections>. Program headers are meaningful only for executable "
2219 "and shared object files. A file specifies its own program header size with "
2220 "the ELF header's I<e_phentsize> and I<e_phnum> members. The ELF program "
2221 "header is described by the type I<Elf32_Phdr> or I<Elf64_Phdr> depending on "
2226 #: build/C/man5/elf.5:708
2229 "typedef struct {\n"
2230 " uint32_t p_type;\n"
2231 " Elf32_Off p_offset;\n"
2232 " Elf32_Addr p_vaddr;\n"
2233 " Elf32_Addr p_paddr;\n"
2234 " uint32_t p_filesz;\n"
2235 " uint32_t p_memsz;\n"
2236 " uint32_t p_flags;\n"
2237 " uint32_t p_align;\n"
2242 #: build/C/man5/elf.5:723
2245 "typedef struct {\n"
2246 " uint32_t p_type;\n"
2247 " uint32_t p_flags;\n"
2248 " Elf64_Off p_offset;\n"
2249 " Elf64_Addr p_vaddr;\n"
2250 " Elf64_Addr p_paddr;\n"
2251 " uint64_t p_filesz;\n"
2252 " uint64_t p_memsz;\n"
2253 " uint64_t p_align;\n"
2257 #. .Bl -tag -width "p_offset"
2259 #: build/C/man5/elf.5:731
2261 "The main difference between the 32-bit and the 64-bit program header lies in "
2262 "the location of the I<p_flags> member in the total struct."
2266 #: build/C/man5/elf.5:731
2271 #. .Bl -tag -width "PT_DYNAMIC"
2273 #: build/C/man5/elf.5:736
2275 "This member of the Phdr struct tells what kind of segment this array element "
2276 "describes or how to interpret the array element's information."
2280 #: build/C/man5/elf.5:737
2286 #: build/C/man5/elf.5:741
2288 "The array element is unused and the other members' values are undefined. "
2289 "This lets the program header have ignored entries."
2293 #: build/C/man5/elf.5:741
2299 #: build/C/man5/elf.5:762
2301 "The array element specifies a loadable segment, described by I<p_filesz> and "
2302 "I<p_memsz>. The bytes from the file are mapped to the beginning of the "
2303 "memory segment. If the segment's memory size I<p_memsz> is larger than the "
2304 "file size I<p_filesz>, the \"extra\" bytes are defined to hold the value 0 "
2305 "and to follow the segment's initialized area. The file size may not be "
2306 "larger than the memory size. Loadable segment entries in the program header "
2307 "table appear in ascending order, sorted on the I<p_vaddr> member."
2311 #: build/C/man5/elf.5:762
2313 msgid "B<PT_DYNAMIC>"
2317 #: build/C/man5/elf.5:765
2318 msgid "The array element specifies dynamic linking information."
2322 #: build/C/man5/elf.5:765
2324 msgid "B<PT_INTERP>"
2328 #: build/C/man5/elf.5:773
2330 "The array element specifies the location and size of a null-terminated "
2331 "pathname to invoke as an interpreter. This segment type is meaningful only "
2332 "for executable files (though it may occur for shared objects). However it "
2333 "may not occur more than once in a file. If it is present, it must precede "
2334 "any loadable segment entry."
2338 #: build/C/man5/elf.5:773
2344 #: build/C/man5/elf.5:776
2345 msgid "The array element specifies the location and size for auxiliary information."
2349 #: build/C/man5/elf.5:776
2355 #: build/C/man5/elf.5:781
2357 "This segment type is reserved but has unspecified semantics. Programs that "
2358 "contain an array element of this type do not conform to the ABI."
2362 #: build/C/man5/elf.5:781
2368 #: build/C/man5/elf.5:790
2370 "The array element, if present, specifies the location and size of the "
2371 "program header table itself, both in the file and in the memory image of the "
2372 "program. This segment type may not occur more than once in a file. "
2373 "Moreover, it may occur only if the program header table is part of the "
2374 "memory image of the program. If it is present, it must precede any loadable "
2379 #: build/C/man5/elf.5:790
2381 msgid "B<PT_LOPROC>"
2385 #: build/C/man5/elf.5:795
2387 "Values greater than or equal to B<PT_HIPROC> are reserved for "
2388 "processor-specific semantics."
2392 #: build/C/man5/elf.5:795
2394 msgid "B<PT_HIPROC>"
2398 #: build/C/man5/elf.5:800
2400 "Values less than or equal to B<PT_LOPROC> are reserved for "
2401 "processor-specific semantics."
2405 #: build/C/man5/elf.5:800
2407 msgid "B<PT_GNU_STACK>"
2412 #: build/C/man5/elf.5:807
2414 "GNU extension which is used by the Linux kernel to control the state of the "
2415 "stack via the flags set in the I<p_flags> member."
2419 #: build/C/man5/elf.5:808
2425 #: build/C/man5/elf.5:812
2427 "This member holds the offset from the beginning of the file at which the "
2428 "first byte of the segment resides."
2432 #: build/C/man5/elf.5:812
2438 #: build/C/man5/elf.5:816
2440 "This member holds the virtual address at which the first byte of the segment "
2441 "resides in memory."
2445 #: build/C/man5/elf.5:816
2451 #: build/C/man5/elf.5:824
2453 "On systems for which physical addressing is relevant, this member is "
2454 "reserved for the segment's physical address. Under BSD this member is not "
2455 "used and must be zero."
2459 #: build/C/man5/elf.5:824
2465 #: build/C/man5/elf.5:828
2467 "This member holds the number of bytes in the file image of the segment. It "
2472 #: build/C/man5/elf.5:828
2478 #: build/C/man5/elf.5:832
2480 "This member holds the number of bytes in the memory image of the segment. "
2485 #: build/C/man5/elf.5:832
2490 #. .Bl -tag -width "PF_X" -compact
2492 #: build/C/man5/elf.5:836
2493 msgid "This member holds a bit mask of flags relevant to the segment:"
2497 #: build/C/man5/elf.5:837
2503 #: build/C/man5/elf.5:841
2504 msgid "An executable segment."
2508 #: build/C/man5/elf.5:841
2514 #: build/C/man5/elf.5:844
2515 msgid "A writable segment."
2519 #: build/C/man5/elf.5:844
2525 #: build/C/man5/elf.5:847
2526 msgid "A readable segment."
2530 #: build/C/man5/elf.5:860
2532 "A text segment commonly has the flags B<PF_X> and B<PF_R>. A data segment "
2533 "commonly has B<PF_X>, B<PF_W> and B<PF_R>."
2537 #: build/C/man5/elf.5:860
2544 #: build/C/man5/elf.5:879
2546 "This member holds the value to which the segments are aligned in memory and "
2547 "in the file. Loadable process segments must have congruent values for "
2548 "I<p_vaddr> and I<p_offset>, modulo the page size. Values of zero and one "
2549 "mean no alignment is required. Otherwise, I<p_align> should be a positive, "
2550 "integral power of two, and I<p_vaddr> should equal I<p_offset>, modulo "
2555 #: build/C/man5/elf.5:896
2557 "A file's section header table lets one locate all the file's sections. The "
2558 "section header table is an array of I<Elf32_Shdr> or I<Elf64_Shdr> "
2559 "structures. The ELF header's I<e_shoff> member gives the byte offset from "
2560 "the beginning of the file to the section header table. I<e_shnum> holds the "
2561 "number of entries the section header table contains. I<e_shentsize> holds "
2562 "the size in bytes of each entry."
2565 #. .Bl -tag -width "SHN_LORESERVE"
2567 #: build/C/man5/elf.5:913
2569 "A section header table index is a subscript into this array. Some section "
2570 "header table indices are reserved: the initial entry and the indices between "
2571 "B<SHN_LORESERVE> and B<SHN_HIRESERVE>. The initial entry is used in ELF "
2572 "extensions for I<e_phnum>, I<e_shnum> and I<e_strndx>; in other cases, each "
2573 "field in the initial entry is set to zero. An object file does not have "
2574 "sections for these special indices:"
2578 #: build/C/man5/elf.5:918
2580 "This value marks an undefined, missing, irrelevant, or otherwise meaningless "
2581 "section reference."
2585 #: build/C/man5/elf.5:938
2587 "This value specifies the absolute value for the corresponding reference. "
2588 "For example, a symbol defined relative to section number B<SHN_ABS> has an "
2589 "absolute value and is not affected by relocation."
2593 #: build/C/man5/elf.5:942
2595 "Symbols defined relative to this section are common symbols, such as FORTRAN "
2596 "COMMON or unallocated C external variables."
2600 #: build/C/man5/elf.5:953
2602 "This value specifies the upper bound of the range of reserved indices. The "
2603 "system reserves indices between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, "
2604 "inclusive. The section header table does not contain entries for the "
2609 #: build/C/man5/elf.5:957
2610 msgid "The section header has the following structure:"
2614 #: build/C/man5/elf.5:972
2617 "typedef struct {\n"
2618 " uint32_t sh_name;\n"
2619 " uint32_t sh_type;\n"
2620 " uint32_t sh_flags;\n"
2621 " Elf32_Addr sh_addr;\n"
2622 " Elf32_Off sh_offset;\n"
2623 " uint32_t sh_size;\n"
2624 " uint32_t sh_link;\n"
2625 " uint32_t sh_info;\n"
2626 " uint32_t sh_addralign;\n"
2627 " uint32_t sh_entsize;\n"
2632 #: build/C/man5/elf.5:989
2635 "typedef struct {\n"
2636 " uint32_t sh_name;\n"
2637 " uint32_t sh_type;\n"
2638 " uint64_t sh_flags;\n"
2639 " Elf64_Addr sh_addr;\n"
2640 " Elf64_Off sh_offset;\n"
2641 " uint64_t sh_size;\n"
2642 " uint32_t sh_link;\n"
2643 " uint32_t sh_info;\n"
2644 " uint64_t sh_addralign;\n"
2645 " uint64_t sh_entsize;\n"
2649 #. .Bl -tag -width "sh_addralign"
2651 #: build/C/man5/elf.5:994
2652 msgid "No real differences exist between the 32-bit and 64-bit section headers."
2656 #: build/C/man5/elf.5:994
2662 #: build/C/man5/elf.5:1000
2664 "This member specifies the name of the section. Its value is an index into "
2665 "the section header string table section, giving the location of a "
2666 "null-terminated string."
2670 #: build/C/man5/elf.5:1000
2675 #. .Bl -tag -width "SHT_PROGBITS"
2677 #: build/C/man5/elf.5:1004
2678 msgid "This member categorizes the section's contents and semantics."
2682 #: build/C/man5/elf.5:1005
2688 #: build/C/man5/elf.5:1012
2690 "This value marks the section header as inactive. It does not have an "
2691 "associated section. Other members of the section header have undefined "
2696 #: build/C/man5/elf.5:1012
2698 msgid "B<SHT_PROGBITS>"
2702 #: build/C/man5/elf.5:1016
2704 "This section holds information defined by the program, whose format and "
2705 "meaning are determined solely by the program."
2709 #: build/C/man5/elf.5:1016
2711 msgid "B<SHT_SYMTAB>"
2715 #: build/C/man5/elf.5:1029
2717 "This section holds a symbol table. Typically, B<SHT_SYMTAB> provides "
2718 "symbols for link editing, though it may also be used for dynamic linking. "
2719 "As a complete symbol table, it may contain many symbols unnecessary for "
2720 "dynamic linking. An object file can also contain a B<SHT_DYNSYM> section."
2724 #: build/C/man5/elf.5:1029
2726 msgid "B<SHT_STRTAB>"
2730 #: build/C/man5/elf.5:1034
2732 "This section holds a string table. An object file may have multiple string "
2737 #: build/C/man5/elf.5:1034
2743 #: build/C/man5/elf.5:1042
2745 "This section holds relocation entries with explicit addends, such as type "
2746 "I<Elf32_Rela> for the 32-bit class of object files. An object may have "
2747 "multiple relocation sections."
2751 #: build/C/man5/elf.5:1042
2757 #: build/C/man5/elf.5:1049
2759 "This section holds a symbol hash table. An object participating in dynamic "
2760 "linking must contain a symbol hash table. An object file may have only one "
2765 #: build/C/man5/elf.5:1049
2767 msgid "B<SHT_DYNAMIC>"
2771 #: build/C/man5/elf.5:1054
2773 "This section holds information for dynamic linking. An object file may have "
2774 "only one dynamic section."
2778 #: build/C/man5/elf.5:1054
2784 #: build/C/man5/elf.5:1057
2785 msgid "This section holds information that marks the file in some way."
2789 #: build/C/man5/elf.5:1057
2791 msgid "B<SHT_NOBITS>"
2795 #: build/C/man5/elf.5:1065
2797 "A section of this type occupies no space in the file but otherwise resembles "
2798 "B<SHT_PROGBITS>. Although this section contains no bytes, the I<sh_offset> "
2799 "member contains the conceptual file offset."
2803 #: build/C/man5/elf.5:1065
2809 #: build/C/man5/elf.5:1073
2811 "This section holds relocation offsets without explicit addends, such as type "
2812 "I<Elf32_Rel> for the 32-bit class of object files. An object file may have "
2813 "multiple relocation sections."
2817 #: build/C/man5/elf.5:1073
2819 msgid "B<SHT_SHLIB>"
2823 #: build/C/man5/elf.5:1076
2824 msgid "This section is reserved but has unspecified semantics."
2828 #: build/C/man5/elf.5:1076
2830 msgid "B<SHT_DYNSYM>"
2834 #: build/C/man5/elf.5:1083
2836 "This section holds a minimal set of dynamic linking symbols. An object file "
2837 "can also contain a B<SHT_SYMTAB> section."
2841 #: build/C/man5/elf.5:1083
2843 msgid "B<SHT_LOPROC>"
2847 #: build/C/man5/elf.5:1088
2849 "This value up to and including B<SHT_HIPROC> is reserved for "
2850 "processor-specific semantics."
2854 #: build/C/man5/elf.5:1088
2856 msgid "B<SHT_HIPROC>"
2860 #: build/C/man5/elf.5:1093
2862 "This value down to and including B<SHT_LOPROC> is reserved for "
2863 "processor-specific semantics."
2867 #: build/C/man5/elf.5:1093
2869 msgid "B<SHT_LOUSER>"
2873 #: build/C/man5/elf.5:1097
2875 "This value specifies the lower bound of the range of indices reserved for "
2876 "application programs."
2880 #: build/C/man5/elf.5:1097
2882 msgid "B<SHT_HIUSER>"
2887 #: build/C/man5/elf.5:1108
2889 "This value specifies the upper bound of the range of indices reserved for "
2890 "application programs. Section types between B<SHT_LOUSER> and B<SHT_HIUSER> "
2891 "may be used by the application, without conflicting with current or future "
2892 "system-defined section types."
2896 #: build/C/man5/elf.5:1109
2901 #. .Bl -tag -width "SHF_EXECINSTR" -compact
2903 #: build/C/man5/elf.5:1122
2905 "Sections support one-bit flags that describe miscellaneous attributes. If a "
2906 "flag bit is set in I<sh_flags>, the attribute is \"on\" for the section. "
2907 "Otherwise, the attribute is \"off\" or does not apply. Undefined attributes "
2912 #: build/C/man5/elf.5:1123
2914 msgid "B<SHF_WRITE>"
2918 #: build/C/man5/elf.5:1127
2919 msgid "This section contains data that should be writable during process execution."
2923 #: build/C/man5/elf.5:1127
2925 msgid "B<SHF_ALLOC>"
2929 #: build/C/man5/elf.5:1134
2931 "This section occupies memory during process execution. Some control "
2932 "sections do not reside in the memory image of an object file. This "
2933 "attribute is off for those sections."
2937 #: build/C/man5/elf.5:1134
2939 msgid "B<SHF_EXECINSTR>"
2943 #: build/C/man5/elf.5:1137
2944 msgid "This section contains executable machine instructions."
2948 #: build/C/man5/elf.5:1137
2950 msgid "B<SHF_MASKPROC>"
2954 #: build/C/man5/elf.5:1141
2956 "All bits included in this mask are reserved for processor-specific "
2961 #: build/C/man5/elf.5:1143
2967 #: build/C/man5/elf.5:1148
2969 "If this section appears in the memory image of a process, this member holds "
2970 "the address at which the section's first byte should reside. Otherwise, the "
2971 "member contains zero."
2975 #: build/C/man5/elf.5:1148
2977 msgid "I<sh_offset>"
2981 #: build/C/man5/elf.5:1157
2983 "This member's value holds the byte offset from the beginning of the file to "
2984 "the first byte in the section. One section type, B<SHT_NOBITS>, occupies no "
2985 "space in the file, and its I<sh_offset> member locates the conceptual "
2986 "placement in the file."
2990 #: build/C/man5/elf.5:1157
2996 #: build/C/man5/elf.5:1169
2998 "This member holds the section's size in bytes. Unless the section type is "
2999 "B<SHT_NOBITS>, the section occupies I<sh_size> bytes in the file. A section "
3000 "of type B<SHT_NOBITS> may have a nonzero size, but it occupies no space in "
3005 #: build/C/man5/elf.5:1169
3011 #: build/C/man5/elf.5:1173
3013 "This member holds a section header table index link, whose interpretation "
3014 "depends on the section type."
3018 #: build/C/man5/elf.5:1173
3024 #: build/C/man5/elf.5:1177
3026 "This member holds extra information, whose interpretation depends on the "
3031 #: build/C/man5/elf.5:1177
3033 msgid "I<sh_addralign>"
3037 #: build/C/man5/elf.5:1190
3039 "Some sections have address alignment constraints. If a section holds a "
3040 "doubleword, the system must ensure doubleword alignment for the entire "
3041 "section. That is, the value of I<sh_addr> must be congruent to zero, modulo "
3042 "the value of I<sh_addralign>. Only zero and positive integral powers of two "
3043 "are allowed. Values of zero or one mean the section has no alignment "
3048 #: build/C/man5/elf.5:1190
3050 msgid "I<sh_entsize>"
3055 #: build/C/man5/elf.5:1197
3057 "Some sections hold a table of fixed-sized entries, such as a symbol table. "
3058 "For such a section, this member gives the size in bytes for each entry. "
3059 "This member contains zero if the section does not hold a table of fixed-size "
3063 #. .Bl -tag -width ".shstrtab"
3065 #: build/C/man5/elf.5:1200
3066 msgid "Various sections hold program and control information:"
3070 #: build/C/man5/elf.5:1200
3076 #: build/C/man5/elf.5:1212
3078 "This section holds uninitialized data that contributes to the program's "
3079 "memory image. By definition, the system initializes the data with zeros "
3080 "when the program begins to run. This section is of type B<SHT_NOBITS>. The "
3081 "attribute types are B<SHF_ALLOC> and B<SHF_WRITE>."
3085 #: build/C/man5/elf.5:1212
3091 #: build/C/man5/elf.5:1218
3093 "This section holds version control information. This section is of type "
3094 "B<SHT_PROGBITS>. No attribute types are used."
3098 #: build/C/man5/elf.5:1218
3104 #: build/C/man5/elf.5:1227
3106 "This section holds initialized pointers to the C++ constructor functions. "
3107 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3108 "B<SHF_ALLOC> and B<SHF_WRITE>."
3112 #: build/C/man5/elf.5:1227
3118 #: build/C/man5/elf.5:1237 build/C/man5/elf.5:1247
3120 "This section holds initialized data that contribute to the program's memory "
3121 "image. This section is of type B<SHT_PROGBITS>. The attribute types are "
3122 "B<SHF_ALLOC> and B<SHF_WRITE>."
3126 #: build/C/man5/elf.5:1237
3132 #: build/C/man5/elf.5:1247
3138 #: build/C/man5/elf.5:1255
3140 "This section holds information for symbolic debugging. The contents are "
3141 "unspecified. This section is of type B<SHT_PROGBITS>. No attribute types "
3146 #: build/C/man5/elf.5:1255
3152 #: build/C/man5/elf.5:1264
3154 "This section holds initialized pointers to the C++ destructor functions. "
3155 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3156 "B<SHF_ALLOC> and B<SHF_WRITE>."
3160 #: build/C/man5/elf.5:1264
3166 #: build/C/man5/elf.5:1277
3168 "This section holds dynamic linking information. The section's attributes "
3169 "will include the B<SHF_ALLOC> bit. Whether the B<SHF_WRITE> bit is set is "
3170 "processor-specific. This section is of type B<SHT_DYNAMIC>. See the "
3175 #: build/C/man5/elf.5:1277
3181 #: build/C/man5/elf.5:1285
3183 "This section holds strings needed for dynamic linking, most commonly the "
3184 "strings that represent the names associated with symbol table entries. This "
3185 "section is of type B<SHT_STRTAB>. The attribute type used is B<SHF_ALLOC>."
3189 #: build/C/man5/elf.5:1285
3195 #: build/C/man5/elf.5:1292
3197 "This section holds the dynamic linking symbol table. This section is of "
3198 "type B<SHT_DYNSYM>. The attribute used is B<SHF_ALLOC>."
3202 #: build/C/man5/elf.5:1292
3208 #: build/C/man5/elf.5:1304
3210 "This section holds executable instructions that contribute to the process "
3211 "termination code. When a program exits normally the system arranges to "
3212 "execute the code in this section. This section is of type B<SHT_PROGBITS>. "
3213 "The attributes used are B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3217 #: build/C/man5/elf.5:1304
3219 msgid "I<.gnu.version>"
3223 #: build/C/man5/elf.5:1313
3225 "This section holds the version symbol table, an array of I<ElfN_Half> "
3226 "elements. This section is of type B<SHT_GNU_versym>. The attribute type "
3227 "used is B<SHF_ALLOC>."
3231 #: build/C/man5/elf.5:1313
3233 msgid "I<.gnu.version_d>"
3237 #: build/C/man5/elf.5:1322
3239 "This section holds the version symbol definitions, a table of I<ElfN_Verdef> "
3240 "structures. This section is of type B<SHT_GNU_verdef>. The attribute type "
3241 "used is B<SHF_ALLOC>."
3245 #: build/C/man5/elf.5:1322
3247 msgid "I<.gnu.version_r>"
3251 #: build/C/man5/elf.5:1332
3253 "This section holds the version symbol needed elements, a table of "
3254 "I<ElfN_Verneed> structures. This section is of type B<SHT_GNU_versym>. The "
3255 "attribute type used is B<SHF_ALLOC>."
3259 #: build/C/man5/elf.5:1332
3265 #: build/C/man5/elf.5:1338
3267 "This section holds the global offset table. This section is of type "
3268 "B<SHT_PROGBITS>. The attributes are processor-specific."
3272 #: build/C/man5/elf.5:1338
3278 #: build/C/man5/elf.5:1345
3280 "This section holds a symbol hash table. This section is of type "
3281 "B<SHT_HASH>. The attribute used is B<SHF_ALLOC>."
3285 #: build/C/man5/elf.5:1345
3291 #: build/C/man5/elf.5:1357
3293 "This section holds executable instructions that contribute to the process "
3294 "initialization code. When a program starts to run the system arranges to "
3295 "execute the code in this section before calling the main program entry "
3296 "point. This section is of type B<SHT_PROGBITS>. The attributes used are "
3297 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3301 #: build/C/man5/elf.5:1357
3307 #: build/C/man5/elf.5:1368
3309 "This section holds the pathname of a program interpreter. If the file has a "
3310 "loadable segment that includes the section, the section's attributes will "
3311 "include the B<SHF_ALLOC> bit. Otherwise, that bit will be off. This "
3312 "section is of type B<SHT_PROGBITS>."
3316 #: build/C/man5/elf.5:1368
3322 #: build/C/man5/elf.5:1376
3324 "This section holds line number information for symbolic debugging, which "
3325 "describes the correspondence between the program source and the machine "
3326 "code. The contents are unspecified. This section is of type "
3327 "B<SHT_PROGBITS>. No attribute types are used."
3331 #: build/C/man5/elf.5:1376
3337 #: build/C/man5/elf.5:1389
3339 "This section holds information in the \"Note Section\" format. This section "
3340 "is of type B<SHT_NOTE>. No attribute types are used. OpenBSD native "
3341 "executables usually contain a I<.note.openbsd.ident> section to identify "
3342 "themselves, for the kernel to bypass any compatibility ELF binary emulation "
3343 "tests when loading the file."
3347 #: build/C/man5/elf.5:1389
3349 msgid "I<.note.GNU-stack>"
3353 #: build/C/man5/elf.5:1398
3355 "This section is used in Linux object files for declaring stack attributes. "
3356 "This section is of type B<SHT_PROGBITS>. The only attribute used is "
3357 "B<SHF_EXECINSTR>. This indicates to the GNU linker that the object file "
3358 "requires an executable stack."
3362 #: build/C/man5/elf.5:1398
3368 #: build/C/man5/elf.5:1404
3370 "This section holds the procedure linkage table. This section is of type "
3371 "B<SHT_PROGBITS>. The attributes are processor-specific."
3375 #: build/C/man5/elf.5:1404
3381 #: build/C/man5/elf.5:1423
3383 "This section holds relocation information as described below. If the file "
3384 "has a loadable segment that includes relocation, the section's attributes "
3385 "will include the B<SHF_ALLOC> bit. Otherwise, the bit will be off. By "
3386 "convention, \"NAME\" is supplied by the section to which the relocations "
3387 "apply. Thus a relocation section for B<.text> normally would have the name "
3388 "B<.rel.text>. This section is of type B<SHT_REL>."
3392 #: build/C/man5/elf.5:1423
3394 msgid "I<.relaNAME>"
3398 #: build/C/man5/elf.5:1442
3400 "This section holds relocation information as described below. If the file "
3401 "has a loadable segment that includes relocation, the section's attributes "
3402 "will include the B<SHF_ALLOC> bit. Otherwise, the bit will be off. By "
3403 "convention, \"NAME\" is supplied by the section to which the relocations "
3404 "apply. Thus a relocation section for B<.text> normally would have the name "
3405 "B<.rela.text>. This section is of type B<SHT_RELA>."
3409 #: build/C/man5/elf.5:1442
3415 #: build/C/man5/elf.5:1450 build/C/man5/elf.5:1458
3417 "This section holds read-only data that typically contributes to a "
3418 "nonwritable segment in the process image. This section is of type "
3419 "B<SHT_PROGBITS>. The attribute used is B<SHF_ALLOC>."
3423 #: build/C/man5/elf.5:1450
3429 #: build/C/man5/elf.5:1458
3431 msgid "I<.shstrtab>"
3435 #: build/C/man5/elf.5:1464
3437 "This section holds section names. This section is of type B<SHT_STRTAB>. "
3438 "No attribute types are used."
3442 #: build/C/man5/elf.5:1464
3448 #: build/C/man5/elf.5:1476
3450 "This section holds strings, most commonly the strings that represent the "
3451 "names associated with symbol table entries. If the file has a loadable "
3452 "segment that includes the symbol string table, the section's attributes will "
3453 "include the B<SHF_ALLOC> bit. Otherwise, the bit will be off. This section "
3454 "is of type B<SHT_STRTAB>."
3458 #: build/C/man5/elf.5:1476
3464 #: build/C/man5/elf.5:1487
3466 "This section holds a symbol table. If the file has a loadable segment that "
3467 "includes the symbol table, the section's attributes will include the "
3468 "B<SHF_ALLOC> bit. Otherwise, the bit will be off. This section is of type "
3473 #: build/C/man5/elf.5:1487
3480 #: build/C/man5/elf.5:1499
3482 "This section holds the \"text\", or executable instructions, of a program. "
3483 "This section is of type B<SHT_PROGBITS>. The attributes used are "
3484 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3488 #: build/C/man5/elf.5:1510
3490 "String table sections hold null-terminated character sequences, commonly "
3491 "called strings. The object file uses these strings to represent symbol and "
3492 "section names. One references a string as an index into the string table "
3493 "section. The first byte, which is index zero, is defined to hold a null "
3494 "byte (\\(aq\\e0\\(aq). Similarly, a string table's last byte is defined to "
3495 "hold a null byte, ensuring null termination for all strings."
3499 #: build/C/man5/elf.5:1515
3501 "An object file's symbol table holds information needed to locate and "
3502 "relocate a program's symbolic definitions and references. A symbol table "
3503 "index is a subscript into this array."
3507 #: build/C/man5/elf.5:1526
3510 "typedef struct {\n"
3511 " uint32_t st_name;\n"
3512 " Elf32_Addr st_value;\n"
3513 " uint32_t st_size;\n"
3514 " unsigned char st_info;\n"
3515 " unsigned char st_other;\n"
3516 " uint16_t st_shndx;\n"
3521 #: build/C/man5/elf.5:1539
3524 "typedef struct {\n"
3525 " uint32_t st_name;\n"
3526 " unsigned char st_info;\n"
3527 " unsigned char st_other;\n"
3528 " uint16_t st_shndx;\n"
3529 " Elf64_Addr st_value;\n"
3530 " uint64_t st_size;\n"
3534 #. .Bl -tag -width "st_value"
3536 #: build/C/man5/elf.5:1545
3538 "The 32-bit and 64-bit versions have the same members, just in a different "
3543 #: build/C/man5/elf.5:1545
3549 #: build/C/man5/elf.5:1553
3551 "This member holds an index into the object file's symbol string table, which "
3552 "holds character representations of the symbol names. If the value is "
3553 "nonzero, it represents a string table index that gives the symbol name. "
3554 "Otherwise, the symbol table has no name."
3558 #: build/C/man5/elf.5:1553
3564 #: build/C/man5/elf.5:1556
3565 msgid "This member gives the value of the associated symbol."
3569 #: build/C/man5/elf.5:1556
3575 #: build/C/man5/elf.5:1561
3577 "Many symbols have associated sizes. This member holds zero if the symbol "
3578 "has no size or an unknown size."
3582 #: build/C/man5/elf.5:1561
3587 #. .Bl -tag -width "STT_SECTION"
3589 #: build/C/man5/elf.5:1565
3590 msgid "This member specifies the symbol's type and binding attributes:"
3594 #: build/C/man5/elf.5:1566
3596 msgid "B<STT_NOTYPE>"
3600 #: build/C/man5/elf.5:1569
3601 msgid "The symbol's type is not defined."
3605 #: build/C/man5/elf.5:1569
3607 msgid "B<STT_OBJECT>"
3611 #: build/C/man5/elf.5:1572
3612 msgid "The symbol is associated with a data object."
3616 #: build/C/man5/elf.5:1572
3622 #: build/C/man5/elf.5:1575
3623 msgid "The symbol is associated with a function or other executable code."
3627 #: build/C/man5/elf.5:1575
3629 msgid "B<STT_SECTION>"
3633 #: build/C/man5/elf.5:1582
3635 "The symbol is associated with a section. Symbol table entries of this type "
3636 "exist primarily for relocation and normally have B<STB_LOCAL> bindings."
3640 #: build/C/man5/elf.5:1582
3646 #: build/C/man5/elf.5:1593
3648 "By convention, the symbol's name gives the name of the source file "
3649 "associated with the object file. A file symbol has B<STB_LOCAL> bindings, "
3650 "its section index is B<SHN_ABS>, and it precedes the other B<STB_LOCAL> "
3651 "symbols of the file, if it is present."
3655 #: build/C/man5/elf.5:1593
3657 msgid "B<STT_LOPROC>"
3661 #: build/C/man5/elf.5:1598
3663 "This value up to and including B<STT_HIPROC> is reserved for "
3664 "processor-specific semantics."
3668 #: build/C/man5/elf.5:1598
3670 msgid "B<STT_HIPROC>"
3674 #. .Bl -tag -width "STB_GLOBAL"
3676 #: build/C/man5/elf.5:1605
3678 "This value down to and including B<STT_LOPROC> is reserved for "
3679 "processor-specific semantics."
3683 #: build/C/man5/elf.5:1605
3685 msgid "B<STB_LOCAL>"
3689 #: build/C/man5/elf.5:1611
3691 "Local symbols are not visible outside the object file containing their "
3692 "definition. Local symbols of the same name may exist in multiple files "
3693 "without interfering with each other."
3697 #: build/C/man5/elf.5:1611
3699 msgid "B<STB_GLOBAL>"
3703 #: build/C/man5/elf.5:1617
3705 "Global symbols are visible to all object files being combined. One file's "
3706 "definition of a global symbol will satisfy another file's undefined "
3707 "reference to the same symbol."
3711 #: build/C/man5/elf.5:1617
3717 #: build/C/man5/elf.5:1621
3719 "Weak symbols resemble global symbols, but their definitions have lower "
3724 #: build/C/man5/elf.5:1621
3726 msgid "B<STB_LOPROC>"
3730 #: build/C/man5/elf.5:1626
3732 "This value up to and including B<STB_HIPROC> is reserved for "
3733 "processor-specific semantics."
3737 #: build/C/man5/elf.5:1626
3739 msgid "B<STB_HIPROC>"
3743 #: build/C/man5/elf.5:1631
3745 "This value down to and including B<STB_LOPROC> is reserved for "
3746 "processor-specific semantics."
3750 #: build/C/man5/elf.5:1633
3751 msgid "There are macros for packing and unpacking the binding and type fields:"
3755 #: build/C/man5/elf.5:1640
3757 "B<ELF32_ST_BIND>(info) or B<ELF64_ST_BIND>(info) extract a binding from an "
3762 #: build/C/man5/elf.5:1644
3763 msgid "B<ELF32_ST_TYPE>(info) or B<ELF64_ST_TYPE>(info)"
3767 #: build/C/man5/elf.5:1648
3768 msgid "extract a type from an I<st_info> value."
3772 #: build/C/man5/elf.5:1652
3773 msgid "B<ELF32_ST_INFO>(bind, type) or B<ELF64_ST_INFO>(bind, type)"
3777 #: build/C/man5/elf.5:1656
3778 msgid "convert a binding and a type into an I<st_info> value."
3782 #: build/C/man5/elf.5:1658
3787 #. .Bl -tag -width "STV_PROTECTED"
3789 #: build/C/man5/elf.5:1662
3790 msgid "This member defines the symbol visibility."
3794 #: build/C/man5/elf.5:1663
3796 msgid "B<STV_DEFAULT>"
3800 #: build/C/man5/elf.5:1667
3801 msgid "Default symbol visibility rules."
3805 #: build/C/man5/elf.5:1667
3807 msgid "B<STV_INTERNAL>"
3811 #: build/C/man5/elf.5:1670
3812 msgid "Processor-specific hidden class."
3816 #: build/C/man5/elf.5:1670
3818 msgid "B<STV_HIDDEN>"
3822 #: build/C/man5/elf.5:1673
3823 msgid "Symbol is unavailable in other modules."
3827 #: build/C/man5/elf.5:1673
3829 msgid "B<STV_PROTECTED>"
3833 #: build/C/man5/elf.5:1676
3834 msgid "Not preemptible, not exported."
3838 #: build/C/man5/elf.5:1679
3839 msgid "There are macros for extracting the visibility type:"
3843 #: build/C/man5/elf.5:1683
3844 msgid "B<ELF32_ST_VISIBILITY>(other) or B<ELF64_ST_VISIBILITY>(other)"
3848 #: build/C/man5/elf.5:1685
3855 #: build/C/man5/elf.5:1693
3857 "Every symbol table entry is \"defined\" in relation to some section. This "
3858 "member holds the relevant section header table index."
3862 #: build/C/man5/elf.5:1701
3864 "Relocation is the process of connecting symbolic references with symbolic "
3865 "definitions. Relocatable files must have information that describes how to "
3866 "modify their section contents, thus allowing executable and shared object "
3867 "files to hold the right information for a process's program image. "
3868 "Relocation entries are these data."
3872 #: build/C/man5/elf.5:1703
3873 msgid "Relocation structures that do not need an addend:"
3877 #: build/C/man5/elf.5:1710
3880 "typedef struct {\n"
3881 " Elf32_Addr r_offset;\n"
3882 " uint32_t r_info;\n"
3887 #: build/C/man5/elf.5:1719
3890 "typedef struct {\n"
3891 " Elf64_Addr r_offset;\n"
3892 " uint64_t r_info;\n"
3897 #: build/C/man5/elf.5:1723
3898 msgid "Relocation structures that need an addend:"
3902 #: build/C/man5/elf.5:1731
3905 "typedef struct {\n"
3906 " Elf32_Addr r_offset;\n"
3907 " uint32_t r_info;\n"
3908 " int32_t r_addend;\n"
3913 #: build/C/man5/elf.5:1741
3916 "typedef struct {\n"
3917 " Elf64_Addr r_offset;\n"
3918 " uint64_t r_info;\n"
3919 " int64_t r_addend;\n"
3924 #: build/C/man5/elf.5:1744
3930 #: build/C/man5/elf.5:1752
3932 "This member gives the location at which to apply the relocation action. For "
3933 "a relocatable file, the value is the byte offset from the beginning of the "
3934 "section to the storage unit affected by the relocation. For an executable "
3935 "file or shared object, the value is the virtual address of the storage unit "
3936 "affected by the relocation."
3940 #: build/C/man5/elf.5:1752
3946 #: build/C/man5/elf.5:1767
3948 "This member gives both the symbol table index with respect to which the "
3949 "relocation must be made and the type of relocation to apply. Relocation "
3950 "types are processor-specific. When the text refers to a relocation entry's "
3951 "relocation type or symbol table index, it means the result of applying "
3952 "B<ELF[32|64]_R_TYPE> or B<ELF[32|64]_R_SYM>, respectively, to the entry's "
3957 #: build/C/man5/elf.5:1767
3964 #: build/C/man5/elf.5:1772
3966 "This member specifies a constant addend used to compute the value to be "
3967 "stored into the relocatable field."
3971 #: build/C/man5/elf.5:1777
3973 "The .dynamic section contains a series of structures that hold relevant "
3974 "dynamic linking information. The d_tag member controls the interpretation "
3979 #: build/C/man5/elf.5:1788
3982 "typedef struct {\n"
3983 " Elf32_Sword d_tag;\n"
3985 " Elf32_Word d_val;\n"
3986 " Elf32_Addr d_ptr;\n"
3989 "extern Elf32_Dyn _DYNAMIC[];\n"
3993 #: build/C/man5/elf.5:1801
3996 "typedef struct {\n"
3997 " Elf64_Sxword d_tag;\n"
3999 " Elf64_Xword d_val;\n"
4000 " Elf64_Addr d_ptr;\n"
4003 "extern Elf64_Dyn _DYNAMIC[];\n"
4007 #: build/C/man5/elf.5:1804
4012 #. .Bl -tag -width "DT_SYMBOLIC"
4014 #: build/C/man5/elf.5:1808
4015 msgid "This member may have any of the following values:"
4019 #: build/C/man5/elf.5:1809
4025 #: build/C/man5/elf.5:1812
4026 msgid "Marks end of dynamic section"
4030 #: build/C/man5/elf.5:1812
4032 msgid "B<DT_NEEDED>"
4036 #: build/C/man5/elf.5:1815
4037 msgid "String table offset to name of a needed library"
4041 #: build/C/man5/elf.5:1815
4043 msgid "B<DT_PLTRELSZ>"
4047 #: build/C/man5/elf.5:1818
4048 msgid "Size in bytes of PLT relocs"
4052 #: build/C/man5/elf.5:1818
4054 msgid "B<DT_PLTGOT>"
4058 #: build/C/man5/elf.5:1821
4059 msgid "Address of PLT and/or GOT"
4063 #: build/C/man5/elf.5:1821
4069 #: build/C/man5/elf.5:1824
4070 msgid "Address of symbol hash table"
4074 #: build/C/man5/elf.5:1824
4076 msgid "B<DT_STRTAB>"
4080 #: build/C/man5/elf.5:1827
4081 msgid "Address of string table"
4085 #: build/C/man5/elf.5:1827
4087 msgid "B<DT_SYMTAB>"
4091 #: build/C/man5/elf.5:1830
4092 msgid "Address of symbol table"
4096 #: build/C/man5/elf.5:1830
4102 #: build/C/man5/elf.5:1833
4103 msgid "Address of Rela relocs table"
4107 #: build/C/man5/elf.5:1833
4109 msgid "B<DT_RELASZ>"
4113 #: build/C/man5/elf.5:1836
4114 msgid "Size in bytes of Rela table"
4118 #: build/C/man5/elf.5:1836
4120 msgid "B<DT_RELAENT>"
4124 #: build/C/man5/elf.5:1839
4125 msgid "Size in bytes of a Rela table entry"
4129 #: build/C/man5/elf.5:1839
4135 #: build/C/man5/elf.5:1842
4136 msgid "Size in bytes of string table"
4140 #: build/C/man5/elf.5:1842
4142 msgid "B<DT_SYMENT>"
4146 #: build/C/man5/elf.5:1845
4147 msgid "Size in bytes of a symbol table entry"
4151 #: build/C/man5/elf.5:1845
4157 #: build/C/man5/elf.5:1848
4158 msgid "Address of the initialization function"
4162 #: build/C/man5/elf.5:1848
4168 #: build/C/man5/elf.5:1851
4169 msgid "Address of the termination function"
4173 #: build/C/man5/elf.5:1851
4175 msgid "B<DT_SONAME>"
4179 #: build/C/man5/elf.5:1854
4180 msgid "String table offset to name of shared object"
4184 #: build/C/man5/elf.5:1854
4190 #: build/C/man5/elf.5:1857
4191 msgid "String table offset to library search path (deprecated)"
4195 #: build/C/man5/elf.5:1857
4197 msgid "B<DT_SYMBOLIC>"
4201 #: build/C/man5/elf.5:1860
4202 msgid "Alert linker to search this shared object before the executable for symbols"
4206 #: build/C/man5/elf.5:1860
4212 #: build/C/man5/elf.5:1863
4213 msgid "Address of Rel relocs table"
4217 #: build/C/man5/elf.5:1863
4223 #: build/C/man5/elf.5:1866
4224 msgid "Size in bytes of Rel table"
4228 #: build/C/man5/elf.5:1866
4230 msgid "B<DT_RELENT>"
4234 #: build/C/man5/elf.5:1869
4235 msgid "Size in bytes of a Rel table entry"
4239 #: build/C/man5/elf.5:1869
4241 msgid "B<DT_PLTREL>"
4245 #: build/C/man5/elf.5:1872
4246 msgid "Type of reloc the PLT refers (Rela or Rel)"
4250 #: build/C/man5/elf.5:1872
4256 #: build/C/man5/elf.5:1875
4257 msgid "Undefined use for debugging"
4261 #: build/C/man5/elf.5:1875
4263 msgid "B<DT_TEXTREL>"
4267 #: build/C/man5/elf.5:1878
4268 msgid "Absence of this indicates no relocs should apply to a nonwritable segment"
4272 #: build/C/man5/elf.5:1878
4274 msgid "B<DT_JMPREL>"
4278 #: build/C/man5/elf.5:1881
4279 msgid "Address of reloc entries solely for the PLT"
4283 #: build/C/man5/elf.5:1881
4285 msgid "B<DT_BIND_NOW>"
4289 #: build/C/man5/elf.5:1885
4291 "Instruct dynamic linker to process all relocs before transferring control to "
4296 #: build/C/man5/elf.5:1885
4298 msgid "B<DT_RUNPATH>"
4302 #: build/C/man5/elf.5:1888
4303 msgid "String table offset to library search path"
4307 #: build/C/man5/elf.5:1888
4309 msgid "B<DT_LOPROC>"
4313 #: build/C/man5/elf.5:1891
4314 msgid "Start of processor-specific semantics"
4318 #: build/C/man5/elf.5:1891
4320 msgid "B<DT_HIPROC>"
4324 #: build/C/man5/elf.5:1894
4325 msgid "End of processor-specific semantics"
4329 #: build/C/man5/elf.5:1896
4335 #: build/C/man5/elf.5:1899
4336 msgid "This member represents integer values with various interpretations."
4340 #: build/C/man5/elf.5:1899
4346 #: build/C/man5/elf.5:1907
4348 "This member represents program virtual addresses. When interpreting these "
4349 "addresses, the actual address should be computed based on the original file "
4350 "value and memory base address. Files do not contain relocation entries to "
4351 "fixup these addresses."
4355 #: build/C/man5/elf.5:1907
4362 #: build/C/man5/elf.5:1912
4364 "Array containing all the dynamic structures in the .dynamic section. This "
4365 "is automatically populated by the linker."
4369 #. ELF support first appeared in
4371 #. although not all supported platforms use it as the native
4372 #. binary file format.
4374 #: build/C/man5/elf.5:1921
4375 msgid "ELF first appeared in System V. The ELF format is an adopted standard."
4379 #. The original version of this manual page was written by
4380 #. .An Jeroen Ruigrok van der Werven
4381 #. .Aq asmodai@FreeBSD.org
4382 #. with inspiration from BSDi's
4387 #: build/C/man5/elf.5:1939
4389 "The extensions for I<e_phnum>, I<e_shnum> and I<e_strndx> respectively are "
4390 "Linux extensions. Sun, BSD and AMD64 also support them; for further "
4391 "information, look under SEE ALSO."
4395 #: build/C/man5/elf.5:1946
4396 msgid "B<as>(1), B<gdb>(1), B<ld>(1), B<objdump>(1), B<execve>(2), B<core>(5)"
4400 #: build/C/man5/elf.5:1949
4401 msgid "Hewlett-Packard, I<Elf-64 Object File Format>."
4405 #: build/C/man5/elf.5:1952
4406 msgid "Santa Cruz Operation, I<System V Application Binary Interface>."
4410 #: build/C/man5/elf.5:1956
4412 "UNIX System Laboratories, \"Object Files\", I<Executable and Linking Format "
4417 #: build/C/man5/elf.5:1959
4418 msgid "Sun Microsystems, I<Linker and Libraries Guide>."
4422 #: build/C/man5/elf.5:1962
4424 "AMD64 ABI Draft, I<System V Application Binary Interface AMD64 Architecture "
4425 "Processor Supplement>."
4429 #: build/C/man3/end.3:26
4435 #: build/C/man3/end.3:26
4441 #: build/C/man3/end.3:29
4442 msgid "etext, edata, end - end of program segments"
4446 #: build/C/man3/end.3:34
4449 "B<extern>I< etext>B<;>\n"
4450 "B<extern>I< edata>B<;>\n"
4451 "B<extern>I< end>B<;>\n"
4455 #: build/C/man3/end.3:38
4456 msgid "The addresses of these symbols indicate the end of various program segments:"
4460 #: build/C/man3/end.3:38
4466 #: build/C/man3/end.3:42
4468 "This is the first address past the end of the text segment (the program "
4473 #: build/C/man3/end.3:42
4479 #: build/C/man3/end.3:46
4480 msgid "This is the first address past the end of the initialized data segment."
4484 #: build/C/man3/end.3:46
4490 #: build/C/man3/end.3:50
4492 "This is the first address past the end of the uninitialized data segment "
4493 "(also known as the BSS segment)."
4497 #: build/C/man3/end.3:53
4499 "Although these symbols have long been provided on most UNIX systems, they "
4500 "are not standardized; use with caution."
4504 #: build/C/man3/end.3:56
4506 "The program must explicitly declare these symbols; they are not defined in "
4511 #: build/C/man3/end.3:64
4513 "On some systems the names of these symbols are preceded by underscores, "
4514 "thus: I<_etext>, I<_edata>, and I<_end>. These symbols are also defined for "
4515 "programs compiled on Linux."
4519 #: build/C/man3/end.3:76
4521 "At the start of program execution, the program break will be somewhere near "
4522 "I<&end> (perhaps at the start of the following page). However, the break "
4523 "will change as memory is allocated via B<brk>(2) or B<malloc>(3). Use "
4524 "B<sbrk>(2) with an argument of zero to find the current value of the "
4529 #: build/C/man3/end.3:78
4530 msgid "When run, the program below produces output such as the following:"
4534 #: build/C/man3/end.3:86
4538 "First address past:\n"
4539 " program text (etext) 0x8048568\n"
4540 " initialized data (edata) 0x804a01c\n"
4541 " uninitialized data (end) 0x804a024\n"
4545 #: build/C/man3/end.3:88 build/C/man1/memusage.1:234
4547 msgid "Program source"
4551 #: build/C/man3/end.3:93 build/C/man1/memusage.1:238
4554 "#include E<lt>stdio.hE<gt>\n"
4555 "#include E<lt>stdlib.hE<gt>\n"
4559 #: build/C/man3/end.3:96
4562 "extern char etext, edata, end; /* The symbols must have some type,\n"
4563 " or \"gcc -Wall\" complains */\n"
4567 #: build/C/man3/end.3:104
4571 "main(int argc, char *argv[])\n"
4573 " printf(\"First address past:\\en\");\n"
4574 " printf(\" program text (etext) %10p\\en\", &etext);\n"
4575 " printf(\" initialized data (edata) %10p\\en\", &edata);\n"
4576 " printf(\" uninitialized data (end) %10p\\en\", &end);\n"
4580 #: build/C/man3/end.3:113
4581 msgid "B<objdump>(1), B<readelf>(1), B<sbrk>(2), B<elf>(5)"
4585 #: build/C/man8/ld.so.8:5
4591 #: build/C/man8/ld.so.8:5
4597 #: build/C/man8/ld.so.8:8
4598 msgid "ld.so, ld-linux.so* - dynamic linker/loader"
4602 #: build/C/man8/ld.so.8:15
4604 "The dynamic linker can be run either indirectly by running some dynamically "
4605 "linked program or library (in which case no command-line options to the "
4606 "dynamic linker can be passed and, in the ELF case, the dynamic linker which "
4607 "is stored in the B<.interp> section of the program is executed) or directly "
4612 #: build/C/man8/ld.so.8:18
4613 msgid "I</lib/ld-linux.so.*> [OPTIONS] [PROGRAM [ARGUMENTS]]"
4617 #: build/C/man8/ld.so.8:25
4619 "The programs B<ld.so> and B<ld-linux.so*> find and load the shared libraries "
4620 "needed by a program, prepare the program to run, and then run it."
4624 #: build/C/man8/ld.so.8:32
4626 "Linux binaries require dynamic linking (linking at run time) unless the "
4627 "B<-static> option was given to B<ld>(1) during compilation."
4631 #: build/C/man8/ld.so.8:45
4633 "The program B<ld.so> handles a.out binaries, a format used long ago; "
4634 "B<ld-linux.so*> handles ELF (I</lib/ld-linux.so.1> for libc5, "
4635 "I</lib/ld-linux.so.2> for glibc2), which everybody has been using for years "
4636 "now. Otherwise, both have the same behavior, and use the same support files "
4637 "and programs B<ldd>(1), B<ldconfig>(8), and I</etc/ld.so.conf>."
4641 #: build/C/man8/ld.so.8:53
4643 "When resolving library dependencies, the dynamic linker first inspects each "
4644 "dependency string to see if it contains a slash (this can occur if a library "
4645 "pathname containing slashes was specified at link time). If a slash is "
4646 "found, then the dependency string is interpreted as a (relative or absolute) "
4647 "pathname, and the library is loaded using that pathname."
4651 #: build/C/man8/ld.so.8:56
4653 "If a library dependency does not contain a slash, then it is searched for in "
4654 "the following order:"
4658 #: build/C/man8/ld.so.8:61
4660 "(ELF only) Using the directories specified in the DT_RPATH dynamic section "
4661 "attribute of the binary if present and DT_RUNPATH attribute does not exist. "
4662 "Use of DT_RPATH is deprecated."
4666 #: build/C/man8/ld.so.8:66
4668 "Using the environment variable B<LD_LIBRARY_PATH>. Except if the executable "
4669 "is a set-user-ID/set-group-ID binary, in which case it is ignored."
4673 #: build/C/man8/ld.so.8:70
4675 "(ELF only) Using the directories specified in the DT_RUNPATH dynamic section "
4676 "attribute of the binary if present."
4680 #: build/C/man8/ld.so.8:80
4682 "From the cache file I</etc/ld.so.cache>, which contains a compiled list of "
4683 "candidate libraries previously found in the augmented library path. If, "
4684 "however, the binary was linked with the B<-z nodeflib> linker option, "
4685 "libraries in the default library paths are skipped. Libraries installed in "
4686 "hardware capability directories (see below) are preferred to other "
4691 #: build/C/man8/ld.so.8:88
4693 "In the default path I</lib>, and then I</usr/lib>. If the binary was linked "
4694 "with the B<-z nodeflib> linker option, this step is skipped."
4698 #: build/C/man8/ld.so.8:88
4700 msgid "Rpath token expansion"
4704 #: build/C/man8/ld.so.8:92
4706 "B<ld.so> understands certain strings in an rpath specification (DT_RPATH or "
4707 "DT_RUNPATH); those strings are substituted as follows"
4711 #: build/C/man8/ld.so.8:92
4713 msgid "I<$ORIGIN> (or equivalently I<${ORIGIN}>)"
4717 #: build/C/man8/ld.so.8:99
4719 "This expands to the directory containing the program or shared library. "
4720 "Thus, an application located in I<somedir/app> could be compiled with"
4724 #: build/C/man8/ld.so.8:101
4726 msgid " gcc -Wl,-rpath,\\(aq$ORIGIN/../lib\\(aq\n"
4730 #: build/C/man8/ld.so.8:111
4732 "so that it finds an associated shared library in I<somedir/lib> no matter "
4733 "where I<somedir> is located in the directory hierarchy. This facilitates "
4734 "the creation of \"turn-key\" applications that do not need to be installed "
4735 "into special directories, but can instead be unpacked into any directory and "
4736 "still find their own shared libraries."
4740 #: build/C/man8/ld.so.8:111
4742 msgid "I<$LIB> (or equivalently I<${LIB}>)"
4746 #: build/C/man8/ld.so.8:123
4748 "This expands to I<lib> or I<lib64> depending on the architecture (e.g., on "
4749 "x86-64, it expands to I<lib64> and on x86-32, it expands to I<lib>)."
4753 #: build/C/man8/ld.so.8:123
4755 msgid "I<$PLATFORM> (or equivalently I<${PLATFORM}>)"
4758 #. To get an idea of the places that $PLATFORM would match,
4759 #. look at the output of the following:
4762 #. LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
4764 #. ld.so lets names be abbreviated, so $O will work for $ORIGIN;
4767 #: build/C/man8/ld.so.8:141
4769 "This expands to a string corresponding to the processor type of the host "
4770 "system (e.g., \"x86_64\"). On some architectures, the Linux kernel doesn't "
4771 "provide a platform string to the dynamic linker. The value of this string "
4772 "is taken from the B<AT_PLATFORM> value in the auxiliary vector (see "
4777 #: build/C/man8/ld.so.8:141 build/C/man8/ldconfig.8:100 build/C/man1/ldd.1:51 build/C/man1/memusage.1:135 build/C/man1/memusagestat.1:47 build/C/man1/mtrace.1:51 build/C/man1/pldd.1:40 build/C/man1/sprof.1:46
4783 #: build/C/man8/ld.so.8:142
4789 #: build/C/man8/ld.so.8:145
4790 msgid "List all dependencies and how they are resolved."
4794 #: build/C/man8/ld.so.8:145
4800 #: build/C/man8/ld.so.8:149
4802 "Verify that program is dynamically linked and this dynamic linker can handle "
4807 #: build/C/man8/ld.so.8:149
4809 msgid "B<--inhibit-cache>"
4813 #: build/C/man8/ld.so.8:152
4814 msgid "Do not use /etc/ld.so.cache."
4818 #: build/C/man8/ld.so.8:152
4820 msgid "B<--library-path PATH>"
4824 #: build/C/man8/ld.so.8:157
4826 "Use PATH instead of B<LD_LIBRARY_PATH> environment variable setting (see "
4831 #: build/C/man8/ld.so.8:157
4833 msgid "B<--inhibit-rpath LIST>"
4837 #: build/C/man8/ld.so.8:163
4839 "Ignore RPATH and RUNPATH information in object names in LIST. This option "
4840 "is ignored if B<ld.so> is set-user-ID or set-group-ID."
4844 #: build/C/man8/ld.so.8:163
4846 msgid "B<--audit LIST>"
4850 #: build/C/man8/ld.so.8:166
4851 msgid "Use objects named in LIST as auditors."
4855 #: build/C/man8/ld.so.8:166
4857 msgid "HARDWARE CAPABILITIES"
4861 #: build/C/man8/ld.so.8:177
4863 "Some libraries are compiled using hardware-specific instructions which do "
4864 "not exist on every CPU. Such libraries should be installed in directories "
4865 "whose names define the required hardware capabilities, such as "
4866 "I</usr/lib/sse2/>. The dynamic linker checks these directories against the "
4867 "hardware of the machine and selects the most suitable version of a given "
4868 "library. Hardware capability directories can be cascaded to combine CPU "
4869 "features. The list of supported hardware capability names depends on the "
4870 "CPU. The following names are currently recognized:"
4874 #: build/C/man8/ld.so.8:177
4880 #: build/C/man8/ld.so.8:180
4881 msgid "ev4, ev5, ev56, ev6, ev67"
4885 #: build/C/man8/ld.so.8:180
4891 #: build/C/man8/ld.so.8:183
4892 msgid "loongson2e, loongson2f, octeon, octeon2"
4896 #: build/C/man8/ld.so.8:183
4902 #: build/C/man8/ld.so.8:188
4904 "4xxmac, altivec, arch_2_05, arch_2_06, booke, cellbe, dfp, efpdouble, "
4905 "efpsingle, fpu, ic_snoop, mmu, notb, pa6t, power4, power5, power5+, power6x, "
4906 "ppc32, ppc601, ppc64, smt, spe, ucache, vsx"
4910 #: build/C/man8/ld.so.8:188
4916 #: build/C/man8/ld.so.8:191
4917 msgid "flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2"
4921 #: build/C/man8/ld.so.8:191
4927 #: build/C/man8/ld.so.8:195
4929 "dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle, z900, "
4930 "z990, z9-109, z10, zarch"
4934 #: build/C/man8/ld.so.8:195
4936 msgid "B<x86 (32-bit only)>"
4940 #: build/C/man8/ld.so.8:199
4942 "acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca, "
4943 "mmx, mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm"
4947 #: build/C/man8/ld.so.8:199
4953 #: build/C/man8/ld.so.8:201
4954 msgid "Among the more important environment variables are the following:"
4958 #: build/C/man8/ld.so.8:201
4960 msgid "B<LD_ASSUME_KERNEL>"
4964 #: build/C/man8/ld.so.8:214
4966 "(glibc since 2.2.3) Each shared library can inform the dynamic linker of "
4967 "the minimum kernel ABI version that it requires. (This requirement is "
4968 "encoded in an ELF note section that is viewable via I<readelf\\ -n> as a "
4969 "section labeled B<NT_GNU_ABI_TAG>.) At run time, the dynamic linker "
4970 "determines the ABI version of the running kernel and will reject loading "
4971 "shared libraries that specify minimum ABI versions that exceed that ABI "
4976 #: build/C/man8/ld.so.8:223
4978 "B<LD_ASSUME_KERNEL> can be used to cause the dynamic linker to assume that "
4979 "it is running on a system with a different kernel ABI version. For example, "
4980 "the following command line causes the dynamic linker to assume it is running "
4981 "on Linux 2.2.5 when loading the shared libraries required by I<myprog>:"
4985 #: build/C/man8/ld.so.8:227
4987 msgid "$ B<LD_ASSUME_KERNEL=2.2.5 ./myprog>\n"
4991 #: build/C/man8/ld.so.8:244
4993 "On systems that provide multiple versions of a shared library (in different "
4994 "directories in the search path) that have different minimum kernel ABI "
4995 "version requirements, B<LD_ASSUME_KERNEL> can be used to select the version "
4996 "of the library that is used (dependent on the directory search order). "
4997 "Historically, the most common use of the B<LD_ASSUME_KERNEL> feature was to "
4998 "manually select the older LinuxThreads POSIX threads implementation on "
4999 "systems that provided both LinuxThreads and NPTL (which latter was typically "
5000 "the default on such systems); see B<pthreads>(7)."
5004 #: build/C/man8/ld.so.8:244 build/C/man8/ld.so.8:325
5006 msgid "B<LD_BIND_NOT>"
5010 #: build/C/man8/ld.so.8:249
5012 "(glibc since 2.2) Don't update the Global Offset Table (GOT) and Procedure "
5013 "Linkage Table (PLT) when resolving a symbol."
5017 #: build/C/man8/ld.so.8:249
5019 msgid "B<LD_BIND_NOW>"
5023 #: build/C/man8/ld.so.8:257
5025 "(libc5; glibc since 2.1.1) If set to a nonempty string, causes the dynamic "
5026 "linker to resolve all symbols at program startup instead of deferring "
5027 "function call resolution to the point when they are first referenced. This "
5028 "is useful when using a debugger."
5032 #: build/C/man8/ld.so.8:257
5034 msgid "B<LD_LIBRARY_PATH>"
5038 #: build/C/man8/ld.so.8:265
5040 "A colon-separated list of directories in which to search for ELF libraries "
5041 "at execution-time. Similar to the B<PATH> environment variable. Ignored in "
5042 "set-user-ID and set-group-ID programs."
5046 #: build/C/man8/ld.so.8:265
5048 msgid "B<LD_PRELOAD>"
5052 #: build/C/man8/ld.so.8:276
5054 "A list of additional, user-specified, ELF shared libraries to be loaded "
5055 "before all others. The items of the list can be separated by spaces or "
5056 "colons. This can be used to selectively override functions in other shared "
5057 "libraries. The libraries are searched for using the rules given under "
5058 "DESCRIPTION. For set-user-ID/set-group-ID ELF binaries, preload pathnames "
5059 "containing slashes are ignored, and libraries in the standard search "
5060 "directories are loaded only if the set-user-ID permission bit is enabled on "
5065 #: build/C/man8/ld.so.8:276
5067 msgid "B<LD_TRACE_LOADED_OBJECTS>"
5071 #: build/C/man8/ld.so.8:283
5073 "(ELF only) If set to a nonempty string, causes the program to list its "
5074 "dynamic library dependencies, as if run by B<ldd>(1), instead of running "
5079 #: build/C/man8/ld.so.8:286
5081 "Then there are lots of more or less obscure variables, many obsolete or only "
5086 #: build/C/man8/ld.so.8:286
5088 msgid "B<LD_AOUT_LIBRARY_PATH>"
5092 #: build/C/man8/ld.so.8:294
5094 "(libc5) Version of B<LD_LIBRARY_PATH> for a.out binaries only. Old "
5095 "versions of ld-linux.so.1 also supported B<LD_ELF_LIBRARY_PATH>."
5099 #: build/C/man8/ld.so.8:294
5101 msgid "B<LD_AOUT_PRELOAD>"
5105 #: build/C/man8/ld.so.8:302
5107 "(libc5) Version of B<LD_PRELOAD> for a.out binaries only. Old versions of "
5108 "ld-linux.so.1 also supported B<LD_ELF_PRELOAD>."
5112 #: build/C/man8/ld.so.8:302
5118 #: build/C/man8/ld.so.8:312
5120 "(glibc since 2.4) A colon-separated list of user-specified, ELF shared "
5121 "objects to be loaded before all others in a separate linker namespace (i.e., "
5122 "one that does not intrude upon the normal symbol bindings that would occur "
5123 "in the process). These libraries can be used to audit the operation of the "
5124 "dynamic linker. B<LD_AUDIT> is ignored for set-user-ID/set-group-ID "
5129 #: build/C/man8/ld.so.8:325
5131 "The dynamic linker will notify the audit libraries at so-called auditing "
5132 "checkpoints\\(emfor example, loading a new library, resolving a symbol, or "
5133 "calling a symbol from another shared object\\(emby calling an appropriate "
5134 "function within the audit library. For details, see B<rtld-audit>(7). The "
5135 "auditing interface is largely compatible with that provided on Solaris, as "
5136 "described in its I<Linker and Libraries Guide>, in the chapter I<Runtime "
5137 "Linker Auditing Interface>."
5141 #: build/C/man8/ld.so.8:330
5143 "(glibc since 2.1.95) Do not update the GOT (global offset table) and PLT "
5144 "(procedure linkage table) after resolving a symbol."
5148 #: build/C/man8/ld.so.8:330
5154 #: build/C/man8/ld.so.8:343
5156 "(glibc since 2.1) Output verbose debugging information about the dynamic "
5157 "linker. If set to B<all> prints all debugging information it has, if set to "
5158 "B<help> prints a help message about which categories can be specified in "
5159 "this environment variable. Since glibc 2.3.4, B<LD_DEBUG> is ignored for "
5160 "set-user-ID/set-group-ID binaries."
5164 #: build/C/man8/ld.so.8:343
5166 msgid "B<LD_DEBUG_OUTPUT>"
5170 #: build/C/man8/ld.so.8:352
5172 "(glibc since 2.1) File in which B<LD_DEBUG> output should be written. The "
5173 "default is standard error. B<LD_DEBUG_OUTPUT> is ignored for "
5174 "set-user-ID/set-group-ID binaries."
5178 #: build/C/man8/ld.so.8:352
5180 msgid "B<LD_DYNAMIC_WEAK>"
5184 #: build/C/man8/ld.so.8:359
5186 "(glibc since 2.1.91) Allow weak symbols to be overridden (reverting to old "
5187 "glibc behavior). For security reasons, since glibc 2.3.4, "
5188 "B<LD_DYNAMIC_WEAK> is ignored for set-user-ID/set-group-ID binaries."
5192 #: build/C/man8/ld.so.8:359
5194 msgid "B<LD_HWCAP_MASK>"
5198 #: build/C/man8/ld.so.8:363
5199 msgid "(glibc since 2.1) Mask for hardware capabilities."
5203 #: build/C/man8/ld.so.8:363
5205 msgid "B<LD_KEEPDIR>"
5209 #: build/C/man8/ld.so.8:368
5211 "(a.out only)(libc5) Don't ignore the directory in the names of a.out "
5212 "libraries to be loaded. Use of this option is strongly discouraged."
5216 #: build/C/man8/ld.so.8:368
5218 msgid "B<LD_NOWARN>"
5222 #: build/C/man8/ld.so.8:373
5224 "(a.out only)(libc5) Suppress warnings about a.out libraries with "
5225 "incompatible minor version numbers."
5229 #: build/C/man8/ld.so.8:373
5231 msgid "B<LD_ORIGIN_PATH>"
5234 #. Only used if $ORIGIN can't be determined by normal means
5235 #. (from the origin path saved at load time, or from /proc/self/exe)?
5237 #: build/C/man8/ld.so.8:382
5239 "(glibc since 2.1) Path where the binary is found (for non-set-user-ID "
5240 "programs). For security reasons, since glibc 2.4, B<LD_ORIGIN_PATH> is "
5241 "ignored for set-user-ID/set-group-ID binaries."
5245 #: build/C/man8/ld.so.8:382
5247 msgid "B<LD_POINTER_GUARD>"
5251 #: build/C/man8/ld.so.8:394
5253 "(glibc since 2.4) Set to 0 to disable pointer guarding. Any other value "
5254 "enables pointer guarding, which is also the default. Pointer guarding is a "
5255 "security mechanism whereby some pointers to code stored in writable program "
5256 "memory (return addresses saved by B<setjmp>(3) or function pointers used by "
5257 "various glibc internals) are mangled semi-randomly to make it more difficult "
5258 "for an attacker to hijack the pointers for use in the event of a buffer "
5259 "overrun or stack-smashing attack."
5263 #: build/C/man8/ld.so.8:394
5265 msgid "B<LD_PROFILE>"
5269 #: build/C/man8/ld.so.8:401
5271 "(glibc since 2.1) The name of a (single) shared object to be profiled, "
5272 "specified either as a pathname or a soname. Profiling output is appended to "
5273 "the file whose name is: \"I<$LD_PROFILE_OUTPUT>/I<$LD_PROFILE>.profile\"."
5277 #: build/C/man8/ld.so.8:401
5279 msgid "B<LD_PROFILE_OUTPUT>"
5283 #: build/C/man8/ld.so.8:414
5285 "(glibc since 2.1) Directory where B<LD_PROFILE> output should be written. "
5286 "If this variable is not defined, or is defined as an empty string, then the "
5287 "default is I</var/tmp>. B<LD_PROFILE_OUTPUT> is ignored for set-user-ID and "
5288 "set-group-ID programs, which always use I</var/profile>."
5292 #: build/C/man8/ld.so.8:414
5294 msgid "B<LD_SHOW_AUXV>"
5298 #. Document LD_TRACE_PRELINKING (e.g.: LD_TRACE_PRELINKING=libx1.so ./prog)
5299 #. Available since glibc 2.3
5300 #. Also enables DL_DEBUG_PRELINK
5302 #: build/C/man8/ld.so.8:425
5304 "(glibc since 2.1) Show auxiliary array passed up from the kernel. For "
5305 "security reasons, since glibc 2.3.5, B<LD_SHOW_AUXV> is ignored for "
5306 "set-user-ID/set-group-ID binaries."
5310 #: build/C/man8/ld.so.8:425
5312 msgid "B<LD_USE_LOAD_BIAS>"
5315 #. http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
5316 #. Subject: [PATCH] Support LD_USE_LOAD_BIAS
5319 #: build/C/man8/ld.so.8:444
5321 "By default (i.e., if this variable is not defined) executables and "
5322 "prelinked shared objects will honor base addresses of their dependent "
5323 "libraries and (nonprelinked) position-independent executables (PIEs) and "
5324 "other shared objects will not honor them. If B<LD_USE_LOAD_BIAS> is defined "
5325 "with the value 1, both executables and PIEs will honor the base addresses. "
5326 "If B<LD_USE_LOAD_BIAS> is defined with the value 0, neither executables nor "
5327 "PIEs will honor the base addresses. This variable is ignored by set-user-ID "
5328 "and set-group-ID programs."
5332 #: build/C/man8/ld.so.8:444
5334 msgid "B<LD_VERBOSE>"
5338 #: build/C/man8/ld.so.8:452
5340 "(glibc since 2.1) If set to a nonempty string, output symbol versioning "
5341 "information about the program if the B<LD_TRACE_LOADED_OBJECTS> environment "
5342 "variable has been set."
5346 #: build/C/man8/ld.so.8:452
5352 #: build/C/man8/ld.so.8:456
5354 "(ELF only)(glibc since 2.1.3) If set to a nonempty string, warn about "
5355 "unresolved symbols."
5359 #: build/C/man8/ld.so.8:456
5361 msgid "B<LDD_ARGV0>"
5365 #: build/C/man8/ld.so.8:463
5366 msgid "(libc5) I<argv>[0] to be used by B<ldd>(1) when none is present."
5370 #: build/C/man8/ld.so.8:463 build/C/man8/ldconfig.8:156
5376 #: build/C/man8/ld.so.8:465 build/C/man8/ldconfig.8:158
5378 msgid "I</lib/ld.so>"
5382 #: build/C/man8/ld.so.8:468
5383 msgid "a.out dynamic linker/loader"
5387 #: build/C/man8/ld.so.8:468
5389 msgid "I</lib/ld-linux.so.>{I<1>,I<2>}"
5393 #: build/C/man8/ld.so.8:471
5394 msgid "ELF dynamic linker/loader"
5398 #: build/C/man8/ld.so.8:471 build/C/man8/ldconfig.8:165
5400 msgid "I</etc/ld.so.cache>"
5404 #: build/C/man8/ld.so.8:475
5406 "File containing a compiled list of directories in which to search for "
5407 "libraries and an ordered list of candidate libraries."
5411 #: build/C/man8/ld.so.8:475
5413 msgid "I</etc/ld.so.preload>"
5417 #: build/C/man8/ld.so.8:479
5419 "File containing a whitespace-separated list of ELF shared libraries to be "
5420 "loaded before the program."
5424 #: build/C/man8/ld.so.8:479
5430 #: build/C/man8/ld.so.8:482
5431 msgid "shared libraries"
5435 #: build/C/man8/ld.so.8:489
5437 "The B<ld.so> functionality is available for executables compiled using libc "
5438 "version 4.4.3 or greater. ELF functionality is available since Linux 1.1.52 "
5443 #. ld.so: David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
5444 #. Torvalds, Lars Wirzenius and Mitch D'Souza
5445 #. ld-linux.so: Roland McGrath, Ulrich Drepper and others.
5447 #. In the above, (libc5) stands for David Engel's ld.so/ld-linux.so.
5449 #: build/C/man8/ld.so.8:505
5451 "B<ld>(1), B<ldd>(1), B<pldd>(1), B<sprof>(1), B<dlopen>(3), B<getauxval>(3), "
5452 "B<rtld-audit>(7), B<ldconfig>(8), B<sln>(8)"
5456 #: build/C/man8/ldconfig.8:22
5462 #: build/C/man8/ldconfig.8:22
5468 #: build/C/man8/ldconfig.8:25
5469 msgid "ldconfig - configure dynamic linker run-time bindings"
5473 #: build/C/man8/ldconfig.8:40
5475 "B</sbin/ldconfig> [ B<-nNvXV> ] [ B<-f\\ conf> ] [ B<-C\\ cache> ] [ B<-r\\ "
5476 "root> ] I<directory>\\ ..."
5480 #: build/C/man8/ldconfig.8:49
5481 msgid "B</sbin/ldconfig> B<-l> [ B<-v> ] I<library>\\ ..."
5485 #: build/C/man8/ldconfig.8:54
5486 msgid "B</sbin/ldconfig> B<-p>"
5490 #: build/C/man8/ldconfig.8:71
5492 "B<ldconfig> creates the necessary links and cache to the most recent shared "
5493 "libraries found in the directories specified on the command line, in the "
5494 "file I</etc/ld.so.conf>, and in the trusted directories (I</lib> and "
5495 "I</usr/lib>). The cache is used by the run-time linker, I<ld.so> or "
5496 "I<ld-linux.so>. B<ldconfig> checks the header and filenames of the "
5497 "libraries it encounters when determining which versions should have their "
5501 #. The following sentence looks suspect
5502 #. (perhaps historical cruft) -- MTK, Jul 2005
5503 #. Therefore, when making dynamic libraries,
5504 #. it is wise to explicitly link against libc (use \-lc).
5506 #: build/C/man8/ldconfig.8:79
5508 "B<ldconfig> will attempt to deduce the type of ELF libs (i.e., libc5 or "
5509 "libc6/glibc) based on what C libs, if any, the library was linked against."
5513 #: build/C/man8/ldconfig.8:100
5515 "Some existing libs do not contain enough information to allow the deduction "
5516 "of their type. Therefore, the I</etc/ld.so.conf> file format allows the "
5517 "specification of an expected type. This is used I<only> for those ELF libs "
5518 "which we can not work out. The format is \"dirname=TYPE\", where TYPE can "
5519 "be libc4, libc5, or libc6. (This syntax also works on the command line.) "
5520 "Spaces are I<not> allowed. Also see the B<-p> option. B<ldconfig> should "
5521 "normally be run by the superuser as it may require write permission on some "
5522 "root owned directories and files."
5526 #: build/C/man8/ldconfig.8:101
5532 #: build/C/man8/ldconfig.8:107
5534 "Verbose mode. Print current version number, the name of each directory as "
5535 "it is scanned, and any links that are created. Overrides quiet mode."
5539 #: build/C/man8/ldconfig.8:107
5545 #: build/C/man8/ldconfig.8:118
5547 "Only process directories specified on the command line. Don't process the "
5548 "trusted directories (I</lib> and I</usr/lib>) nor those specified in "
5549 "I</etc/ld.so.conf>. Implies B<-N>."
5553 #: build/C/man8/ldconfig.8:118
5559 #: build/C/man8/ldconfig.8:124
5561 "Don't rebuild the cache. Unless B<-X> is also specified, links are still "
5566 #: build/C/man8/ldconfig.8:124
5572 #: build/C/man8/ldconfig.8:130
5574 "Don't update links. Unless B<-N> is also specified, the cache is still "
5579 #: build/C/man8/ldconfig.8:130
5585 #: build/C/man8/ldconfig.8:136
5586 msgid "Use B<conf> instead of I</etc/ld.so.conf>."
5590 #: build/C/man8/ldconfig.8:136
5596 #: build/C/man8/ldconfig.8:142
5597 msgid "Use B<cache> instead of I</etc/ld.so.cache>."
5601 #: build/C/man8/ldconfig.8:142
5607 #: build/C/man8/ldconfig.8:147
5608 msgid "Change to and use I<root> as the root directory."
5612 #: build/C/man8/ldconfig.8:147
5618 #: build/C/man8/ldconfig.8:152
5620 "Library mode. Manually link individual libraries. Intended for use by "
5625 #: build/C/man8/ldconfig.8:152
5631 #: build/C/man8/ldconfig.8:156
5633 "Print the lists of directories and candidate libraries stored in the current "
5638 #: build/C/man8/ldconfig.8:161
5639 msgid "run-time linker/loader"
5643 #: build/C/man8/ldconfig.8:161
5645 msgid "I</etc/ld.so.conf>"
5649 #: build/C/man8/ldconfig.8:165
5651 "File containing a list of colon, space, tab, newline, or comma-separated "
5652 "directories in which to search for libraries."
5656 #: build/C/man8/ldconfig.8:174
5658 "File containing an ordered list of libraries found in the directories "
5659 "specified in I</etc/ld.so.conf>, as well as those found in I</lib> and "
5664 #: build/C/man8/ldconfig.8:178
5665 msgid "B<ldd>(1), B<ld.so>(8)"
5669 #: build/C/man1/ldd.1:14
5675 #: build/C/man1/ldd.1:17
5676 msgid "ldd - print shared library dependencies"
5680 #: build/C/man1/ldd.1:19
5681 msgid "B<ldd> [I<option>]... I<file>..."
5685 #: build/C/man1/ldd.1:23
5687 "B<ldd> prints the shared libraries required by each program or shared "
5688 "library specified on the command line."
5692 #: build/C/man1/ldd.1:23
5697 #. Mainline glibc's ldd allows this possibility (the line
5698 #. try_trace "$file"
5699 #. in glibc 2.15, for example), but many distro versions of
5700 #. ldd seem to remove that code path from the script.
5702 #: build/C/man1/ldd.1:49
5704 "In the usual case, B<ldd> invokes the standard dynamic linker (see "
5705 "B<ld.so>(8)) with the B<LD_TRACE_LOADED_OBJECTS> environment variable set "
5706 "to 1, which causes the linker to display the library dependencies. Be "
5707 "aware, however, that in some circumstances, some versions of B<ldd> may "
5708 "attempt to obtain the dependency information by directly executing the "
5709 "program. Thus, you should I<never> employ B<ldd> on an untrusted "
5710 "executable, since this may result in the execution of arbitrary code. A "
5711 "safer alternative when dealing with untrusted executables is:"
5715 #: build/C/man1/ldd.1:51
5717 msgid " $ objdump -p /path/to/program | grep NEEDED\n"
5721 #: build/C/man1/ldd.1:52 build/C/man1/mtrace.1:55
5723 msgid "B<--version>"
5727 #: build/C/man1/ldd.1:56
5728 msgid "Print the version number of B<ldd>."
5732 #: build/C/man1/ldd.1:56
5734 msgid "B<-v\\ --verbose>"
5738 #: build/C/man1/ldd.1:60
5740 "Print all information, including, for example, symbol versioning "
5745 #: build/C/man1/ldd.1:60
5747 msgid "B<-u\\ --unused>"
5751 #: build/C/man1/ldd.1:64
5752 msgid "Print unused direct dependencies. (Since glibc 2.3.4.)"
5756 #: build/C/man1/ldd.1:64
5758 msgid "B<-d\\ --data-relocs>"
5762 #: build/C/man1/ldd.1:67
5763 msgid "Perform relocations and report any missing objects (ELF only)."
5767 #: build/C/man1/ldd.1:67
5769 msgid "B<-r\\ --function-relocs>"
5773 #: build/C/man1/ldd.1:71
5775 "Perform relocations for both data objects and functions, and report any "
5776 "missing objects or functions (ELF only)."
5780 #: build/C/man1/ldd.1:71 build/C/man1/mtrace.1:52
5786 #. The standard version of
5788 #. comes with glibc2.
5789 #. Libc5 came with an older version, still present
5791 #. The long options are not supported by the libc5 version.
5792 #. On the other hand, the glibc2 version does not support
5794 #. and only has the equivalent
5795 #. .BR \-\-version .
5797 #. The libc5 version of this program will use the name of a library given
5798 #. on the command line as-is when it contains a \(aq/\(aq; otherwise it
5799 #. searches for the library in the standard locations.
5801 #. on a shared library in the current directory, prefix the name with "./".
5803 #: build/C/man1/ldd.1:91
5804 msgid "Usage information."
5808 #: build/C/man1/ldd.1:94
5809 msgid "B<ldd> does not work on a.out shared libraries."
5814 #. Roland McGrath and Ulrich Drepper.
5816 #: build/C/man1/ldd.1:108
5818 "B<ldd> does not work with some extremely old a.out programs which were built "
5819 "before B<ldd> support was added to the compiler releases. If you use B<ldd> "
5820 "on one of these programs, the program will attempt to run with I<argc> = 0 "
5821 "and the results will be unpredictable."
5825 #: build/C/man1/ldd.1:113
5826 msgid "B<sprof>(1), B<pldd>(1), B<ld.so>(8), B<ldconfig>(8)"
5830 #: build/C/man1/memusage.1:24
5836 #: build/C/man1/memusage.1:24 build/C/man1/memusagestat.1:23
5842 #: build/C/man1/memusage.1:24 build/C/man1/mtrace.1:23
5844 msgid "Linux user manual"
5848 #: build/C/man1/memusage.1:27
5849 msgid "memusage - profile memory usage of a program"
5853 #: build/C/man1/memusage.1:29
5854 msgid "B<memusage> [I<option>]... I<program> [I<programoption>]..."
5858 #: build/C/man1/memusage.1:53
5860 "B<memusage> is a bash script which profiles memory usage of the program, "
5861 "I<program>. It preloads the B<libmemusage.so> library into the caller's "
5862 "environment (via the B<LD_PRELOAD> environment variable; see B<ld.so>(8)). "
5863 "The B<libmemusage.so> library traces memory allocation by intercepting calls "
5864 "to B<malloc>(3), B<calloc>(3), B<free>(3), and B<realloc>(3); optionally, "
5865 "calls to B<mmap>(2), B<mremap>(2), and B<munmap>(2) can also be "
5870 #: build/C/man1/memusage.1:62
5872 "B<memusage> can output the collected data in textual form, or it can use "
5873 "B<memusagestat>(1) (see the B<-p> option, below) to create a PNG file "
5874 "containing graphical representation of the collected data."
5878 #: build/C/man1/memusage.1:62
5880 msgid "Memory usage summary"
5884 #: build/C/man1/memusage.1:66
5886 "The \"Memory usage summary\" line output by B<memusage> contains three "
5891 #: build/C/man1/memusage.1:67
5893 msgid "B<heap total>"
5897 #: build/C/man1/memusage.1:84
5899 "Sum of I<size> arguments of all B<malloc>(3) calls, products of arguments "
5900 "(I<nmemb>*I<size>) of all B<calloc>(3) calls, and sum of I<length> "
5901 "arguments of all B<mmap>(2) calls. In the case of B<realloc>(3) and "
5902 "B<mremap>(2), if the new size of an allocation is larger than the previous "
5903 "size, the sum of all such differences (new size minus old size) is added."
5907 #: build/C/man1/memusage.1:84
5909 msgid "B<heap peak>"
5913 #: build/C/man1/memusage.1:98
5915 "Maximum of all I<size> arguments of B<malloc>(3), all products of "
5916 "I<nmemb>*I<size> of B<calloc>(3), all I<size> arguments of B<realloc>(3), "
5917 "I<length> arguments of B<mmap>(2), and I<new_size> arguments of "
5922 #: build/C/man1/memusage.1:98
5924 msgid "B<stack peak>"
5928 #: build/C/man1/memusage.1:105
5930 "Before the first call to any monitored function, the stack pointer address "
5931 "(base stack pointer) is saved. After each function call, the actual stack "
5932 "pointer address is read and the difference from the base stack pointer "
5933 "computed. The maximum of these differences is then the stack peak."
5937 #: build/C/man1/memusage.1:122
5939 "Immediately following this summary line, a table shows the number calls, "
5940 "total memory allocated or deallocated, and number of failed calls for each "
5941 "intercepted function. For B<realloc>(3) and B<mremap>(2), the additional "
5942 "field \"nomove\" shows reallocations that changed the address of a block, "
5943 "and the additional \"dec\" field shows reallocations that decreased the size "
5944 "of the block. For B<realloc>(3), the additional field \"free\" shows "
5945 "reallocations that caused a block to be freed (i.e., the reallocated size "
5950 #: build/C/man1/memusage.1:132
5952 "The \"realloc/total memory\" of the table output by B<memusage> does not "
5953 "reflect cases where B<realloc>(3) is used to reallocate a block of memory "
5954 "to have a smaller size than previously. This can cause sum of all \"total "
5955 "memory\" cells (excluding \"free\") to be larger than the \"free/total "
5960 #: build/C/man1/memusage.1:132
5962 msgid "Histogram for block sizes"
5966 #: build/C/man1/memusage.1:135
5968 "The \"Histogram for block sizes\" provides a breakdown of memory allocations "
5969 "into various bucket sizes."
5973 #: build/C/man1/memusage.1:136
5975 msgid "B<-n\\ >I<name>,\\ B<--progname=>I<name>"
5979 #: build/C/man1/memusage.1:139
5980 msgid "Name of the program file to profile."
5984 #: build/C/man1/memusage.1:139
5986 msgid "B<-p\\ >I<file>,\\ B<--png=>I<file>"
5990 #: build/C/man1/memusage.1:143
5991 msgid "Generate PNG graphic and store it in I<file>."
5995 #: build/C/man1/memusage.1:143
5997 msgid "B<-d\\ >I<file>,\\ B<--data=>I<file>"
6001 #: build/C/man1/memusage.1:147
6002 msgid "Generate binary data file and store it in I<file>."
6006 #: build/C/man1/memusage.1:147
6008 msgid "B<-u>,\\ B<--unbuffered>"
6012 #: build/C/man1/memusage.1:150
6013 msgid "Do not buffer output."
6017 #: build/C/man1/memusage.1:150
6019 msgid "B<-b\\ >I<size>,\\ B<--buffer=>I<size>"
6023 #: build/C/man1/memusage.1:155
6024 msgid "Collect I<size> entries before writing them out."
6028 #: build/C/man1/memusage.1:155
6030 msgid "B<--no-timer>"
6034 #: build/C/man1/memusage.1:160
6035 msgid "Disable timer-based (B<SIGPROF>) sampling of stack pointer value."
6039 #: build/C/man1/memusage.1:160
6041 msgid "B<-m>,\\ B<--mmap>"
6045 #: build/C/man1/memusage.1:167
6046 msgid "Also trace B<mmap>(2), B<mremap>(2), and B<mmap>(2)."
6050 #: build/C/man1/memusage.1:167 build/C/man1/memusagestat.1:72
6052 msgid "B<-?>,\\ B<--help>"
6056 #: build/C/man1/memusage.1:170 build/C/man1/mtrace.1:55
6057 msgid "Print help and exit."
6061 #: build/C/man1/memusage.1:170 build/C/man1/memusagestat.1:75 build/C/man1/pldd.1:44 build/C/man1/sprof.1:69
6067 #: build/C/man1/memusage.1:173 build/C/man1/memusagestat.1:78
6068 msgid "Print a short usage message and exit."
6072 #: build/C/man1/memusage.1:173 build/C/man1/memusagestat.1:78
6074 msgid "B<-V>,\\ B<--version>"
6078 #: build/C/man1/memusage.1:176 build/C/man1/memusagestat.1:81 build/C/man1/mtrace.1:58
6079 msgid "Print version information and exit."
6083 #: build/C/man1/memusage.1:176
6085 msgid "The following options only apply when generating graphical output:"
6089 #: build/C/man1/memusage.1:178
6091 msgid "B<-t>,\\ B<--time-based>"
6095 #: build/C/man1/memusage.1:181 build/C/man1/memusagestat.1:59
6096 msgid "Use time (rather than number of function calls) as the scale for the X axis."
6100 #: build/C/man1/memusage.1:181 build/C/man1/memusagestat.1:59
6102 msgid "B<-T>,\\ B<--total>"
6106 #: build/C/man1/memusage.1:184
6107 msgid "Also draw a graph of total memory use."
6111 #: build/C/man1/memusage.1:184
6113 msgid "B<--title=>I<name>"
6117 #: build/C/man1/memusage.1:189
6118 msgid "Use I<name> as the title of the graph."
6122 #: build/C/man1/memusage.1:189 build/C/man1/memusagestat.1:62
6124 msgid "B<-x\\ >I<size>,\\ B<--x-size=>I<size>"
6128 #: build/C/man1/memusage.1:194
6129 msgid "Make the graph I<size> pixels wide."
6133 #: build/C/man1/memusage.1:194 build/C/man1/memusagestat.1:67
6135 msgid "B<-y\\ >I<size>,\\ B<--y-size=>I<size>"
6139 #: build/C/man1/memusage.1:199
6140 msgid "Make the graph I<size> pixels high."
6144 #: build/C/man1/memusage.1:199 build/C/man1/pldd.1:60
6150 #: build/C/man1/memusage.1:201
6151 msgid "Exit status is equal to the exit status of profiled program."
6155 #: build/C/man1/memusage.1:208
6157 "Below is a simple program that reallocates a block of memory in cycles that "
6158 "rise to a peak before then cyclically reallocating the memory in smaller "
6159 "blocks that return to zero. After compiling the program and running the "
6160 "following commands, a graph of the memory usage of the program can be found "
6161 "in the file I<memusage.png>:"
6165 #: build/C/man1/memusage.1:232
6168 "$ B<memusage --data=memusage.dat ./a.out>\n"
6170 "Memory usage summary: heap total: 45200, heap peak: 6440, stack peak: 224\n"
6171 " total calls total memory failed calls\n"
6172 " malloc| 1 400 0\n"
6173 "realloc| 40 44800 0 (nomove:40, dec:19, "
6177 "Histogram for block sizes:\n"
6178 " 192-207 1 2% ================\n"
6180 " 2192-2207 1 2% ================\n"
6181 " 2240-2255 2 4% =================================\n"
6182 " 2832-2847 2 4% =================================\n"
6183 " 3440-3455 2 4% =================================\n"
6184 " 4032-4047 2 4% =================================\n"
6185 " 4640-4655 2 4% =================================\n"
6186 " 5232-5247 2 4% =================================\n"
6187 " 5840-5855 2 4% =================================\n"
6188 " 6432-6447 1 2% ================\n"
6189 "$ B<memusagestat memusage.dat memusage.png>\n"
6193 #: build/C/man1/memusage.1:240
6195 msgid "#define CYCLES 20\n"
6199 #: build/C/man1/memusage.1:246
6203 "main(int argc, char *argv[])\n"
6210 #: build/C/man1/memusage.1:249
6213 " printf(\"malloc: %zd\\en\", sizeof(int) * 100);\n"
6214 " p = malloc(sizeof(int) * 100);\n"
6218 #: build/C/man1/memusage.1:255
6221 " for (i = 0; i E<lt> CYCLES; i++) {\n"
6222 " if (i E<lt> CYCLES / 2)\n"
6229 #: build/C/man1/memusage.1:258
6232 " printf(\"realloc: %zd\\en\", sizeof(int) * (j * 50 + 110));\n"
6233 " p = realloc(p, sizeof(int) * (j * 50 + 100));\n"
6237 #: build/C/man1/memusage.1:262
6240 " printf(\"realloc: %zd\\en\", sizeof(int) * ((j+1) * 150 + 110));\n"
6241 " p = realloc(p, sizeof(int) * ((j + 1) * 150 + 110));\n"
6246 #: build/C/man1/memusage.1:266
6250 " exit(EXIT_SUCCESS);\n"
6255 #: build/C/man1/memusage.1:271 build/C/man1/memusagestat.1:88
6256 msgid "To report bugs, see E<.UR http://www.gnu.org/software/libc/bugs.html> E<.UE>"
6260 #: build/C/man1/memusage.1:275
6261 msgid "B<memusagestat>(1), B<mtrace>(1) B<ld.so>(8)"
6265 #: build/C/man1/memusagestat.1:23
6267 msgid "MEMUSAGESTAT"
6271 #: build/C/man1/memusagestat.1:23
6273 msgid "Linux programmer's manual"
6277 #: build/C/man1/memusagestat.1:26
6278 msgid "memusagestat - generate graphic from memory profiling data"
6282 #: build/C/man1/memusagestat.1:28
6283 msgid "B<memusagestat> [I<option>]... I<datafile> [I<outfile>]"
6287 #: build/C/man1/memusagestat.1:39
6289 "B<memusagestat> creates a PNG file containing a graphical representation of "
6290 "the memory profiling data in the file I<datafile>; that file is generated "
6291 "via the I<-d> (or I<--data>) option of B<memusage>(1)."
6295 #: build/C/man1/memusagestat.1:47
6297 "The red line in the graph shows the heap usage (allocated memory) and the "
6298 "green line shows the stack usage. The x-scale is either the number of "
6299 "memory-handling function calls or (if the I<-t> option is specified) time."
6303 #: build/C/man1/memusagestat.1:48
6305 msgid "B<-o\\ >I<file>,\\ B<--output=>I<file>"
6309 #: build/C/man1/memusagestat.1:51
6310 msgid "Name of the output file."
6314 #: build/C/man1/memusagestat.1:51
6316 msgid "B<-s\\ >I<string>,\\ B<--string=>I<string>"
6320 #: build/C/man1/memusagestat.1:56
6321 msgid "Use I<string> as the title inside the output graph."
6325 #: build/C/man1/memusagestat.1:56
6327 msgid "B<-t>,\\ B<--time>"
6331 #: build/C/man1/memusagestat.1:62
6332 msgid "Also draw a graph of total memory consumption."
6336 #: build/C/man1/memusagestat.1:67
6337 msgid "Make the output graph I<size> pixels wide."
6341 #: build/C/man1/memusagestat.1:72
6342 msgid "Make the output graph I<size> pixels high."
6346 #: build/C/man1/memusagestat.1:75
6347 msgid "Print a help message and exit."
6351 #: build/C/man1/memusagestat.1:84
6352 msgid "See B<memusage>(1)."
6356 #: build/C/man1/memusagestat.1:91
6357 msgid "B<memusage>(1), B<mtrace>(1)"
6361 #: build/C/man1/mtrace.1:23
6367 #: build/C/man1/mtrace.1:23
6373 #: build/C/man1/mtrace.1:26
6374 msgid "mtrace - interpret the malloc trace log"
6378 #: build/C/man1/mtrace.1:28
6379 msgid "B<mtrace> [I<option>]... [I<binary>] I<mtracedata>"
6383 #: build/C/man1/mtrace.1:44
6385 "B<mtrace> is a Perl script used to interpret and provide human readable "
6386 "output of the trace log contained in the file I<mtracedata>, whose contents "
6387 "were produced by B<mtrace>(3). If I<binary> is provided, the output of "
6388 "B<mtrace> also contains the source file name with line number information "
6389 "for problem locations (assuming that I<binary> was compiled with debugging "
6394 #: build/C/man1/mtrace.1:51
6396 "For more information about the B<mtrace>(3) function and B<mtrace> script "
6397 "usage, see B<mtrace>(3)."
6401 #: build/C/man1/mtrace.1:61
6403 "For bug reporting instructions, please see: "
6404 "E<lt>http://www.gnu.org/software/libc/bugs.htmlE<gt>."
6408 #: build/C/man1/mtrace.1:64
6409 msgid "B<memusage>(1), B<mtrace>(3)"
6413 #: build/C/man1/pldd.1:25
6419 #: build/C/man1/pldd.1:25
6425 #: build/C/man1/pldd.1:25 build/C/man1/sprof.1:25
6427 msgid "Linux User Manual"
6431 #: build/C/man1/pldd.1:28
6432 msgid "pldd - display dynamic shared objects linked into a process"
6436 #: build/C/man1/pldd.1:32
6444 #: build/C/man1/pldd.1:40
6446 "The B<pldd> command displays a list of the dynamic shared objects that are "
6447 "linked into the process with the specified process ID. The list includes "
6448 "the libraries that have been dynamically loaded using B<dlopen>(3)."
6452 #: build/C/man1/pldd.1:41 build/C/man1/sprof.1:66
6454 msgid "B<-?>, B<--help>"
6458 #: build/C/man1/pldd.1:44
6459 msgid "Display program help message."
6463 #: build/C/man1/pldd.1:47
6464 msgid "Display a short usage message."
6468 #: build/C/man1/pldd.1:47 build/C/man1/sprof.1:72
6470 msgid "B<-V>, B<--version>"
6474 #: build/C/man1/pldd.1:50
6475 msgid "Display the program version."
6479 #: build/C/man1/pldd.1:53
6480 msgid "B<pldd> is available since glibc 2.15."
6483 #. There are man pages on Solaris and HP-UX.
6485 #: build/C/man1/pldd.1:60
6487 "The B<pldd> command is not specified by POSIX.1. Some other systems have a "
6492 #: build/C/man1/pldd.1:71
6494 "On success, B<pldd> exits with the status 0. If the specified process does "
6495 "not exist, the user does not have permission to access its dynamic shared "
6496 "object list, or no command-line arguments are supplied, B<pldd> exists with "
6497 "a status of 1. If given an invalid option, it exits with the status 64."
6501 #: build/C/man1/pldd.1:83
6504 "$ B<echo $$> # Display PID of shell\n"
6506 "$ B<pldd $$> # Display DSOs linked into the shell\n"
6507 "1143:\t/usr/bin/bash\n"
6509 "/lib64/libtinfo.so.5\n"
6510 "/lib64/libdl.so.2\n"
6511 "/lib64/libc.so.6\n"
6512 "/lib64/ld-linux-x86-64.so.2\n"
6513 "/lib64/libnss_files.so.2\n"
6517 #: build/C/man1/pldd.1:86
6522 #: build/C/man1/pldd.1:88
6524 msgid " lsof -p PID\n"
6528 #: build/C/man1/pldd.1:91
6530 "also shows output that includes the dynamic shared objects that are linked "
6535 #: build/C/man1/pldd.1:96
6536 msgid "B<ldd>(1), B<lsof>(1), B<dlopen>(3), B<ld.so>(8)"
6540 #: build/C/man7/rtld-audit.7:28
6546 #: build/C/man7/rtld-audit.7:28
6552 #: build/C/man7/rtld-audit.7:31
6553 msgid "rtld-audit - auditing API for the dynamic linker"
6557 #: build/C/man7/rtld-audit.7:33
6558 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
6562 #: build/C/man7/rtld-audit.7:35
6563 msgid "B<#include E<lt>link.hE<gt>>"
6567 #: build/C/man7/rtld-audit.7:43
6569 "The GNU dynamic linker (run-time linker) provides an auditing API that "
6570 "allows an application to be notified when various dynamic linking events "
6571 "occur. This API is very similar to the auditing interface provided by the "
6572 "Solaris run-time linker. The necessary constants and prototypes are defined "
6573 "by including I<E<lt>link.hE<gt>>."
6577 #: build/C/man7/rtld-audit.7:50
6579 "To use this interface, the programmer creates a shared library that "
6580 "implements a standard set of function names. Not all of the functions need "
6581 "to be implemented: in most cases, if the programmer is not interested in a "
6582 "particular class of auditing event, then no implementation needs to be "
6583 "provided for the corresponding auditing function."
6587 #: build/C/man7/rtld-audit.7:58
6589 "To employ the auditing interface, the environment variable B<LD_AUDIT> must "
6590 "be defined to contain a colon-separated list of shared libraries, each of "
6591 "which can implement (parts of) the auditing API. When an auditable event "
6592 "occurs, the corresponding function is invoked in each library, in the order "
6593 "that the libraries are listed."
6597 #: build/C/man7/rtld-audit.7:58
6599 msgid "la_version()"
6603 #: build/C/man7/rtld-audit.7:62
6605 msgid "B<unsigned int la_version(unsigned int >I<version>B<);>\n"
6609 #: build/C/man7/rtld-audit.7:74
6611 "This is the only function that I<must> be defined by an auditing library: it "
6612 "performs the initial handshake between the dynamic linker and the auditing "
6613 "library. When invoking this function, the dynamic linker passes, in "
6614 "I<version>, the highest version of the auditing interface that the linker "
6615 "supports. If necessary, the auditing library can check that this version is "
6616 "sufficient for its requirements."
6620 #: build/C/man7/rtld-audit.7:83
6622 "As its function result, this function should return the version of the "
6623 "auditing interface that this auditing library expects to use (returning "
6624 "I<version> is acceptable). If the returned value is 0, or a version that is "
6625 "greater than that supported by the dynamic linker, then the audit library is "
6630 #: build/C/man7/rtld-audit.7:83
6632 msgid "la_objsearch()"
6636 #: build/C/man7/rtld-audit.7:88
6639 "B<char *la_objsearch(const char *>I<name>B<, uintptr_t *>I<cookie>B<,>\n"
6640 "B< unsigned int >I<flag>B<);>\n"
6644 #: build/C/man7/rtld-audit.7:99
6646 "The dynamic linker invokes this function to inform the auditing library that "
6647 "it is about to search for a shared object. The I<name> argument is the "
6648 "filename or pathname that is to be searched for. I<cookie> identifies the "
6649 "shared object that initiated the search. I<flag> is set to one of the "
6654 #: build/C/man7/rtld-audit.7:99
6656 msgid "B<LA_SER_ORIG>"
6660 #: build/C/man7/rtld-audit.7:108
6662 "This is the original name that is being searched for. Typically, this name "
6663 "comes from an ELF B<DT_NEEDED> entry, or is the I<filename> argument given "
6668 #: build/C/man7/rtld-audit.7:108
6670 msgid "B<LA_SER_LIBPATH>"
6674 #: build/C/man7/rtld-audit.7:113
6675 msgid "I<name> was created using a directory specified in B<LD_LIBRARY_PATH>."
6679 #: build/C/man7/rtld-audit.7:113
6681 msgid "B<LA_SER_RUNPATH>"
6685 #: build/C/man7/rtld-audit.7:121
6687 "I<name> was created using a directory specified in an ELF B<DT_RPATH> or "
6688 "B<DT_RUNPATH> list."
6692 #: build/C/man7/rtld-audit.7:121
6694 msgid "B<LA_SER_CONFIG>"
6698 #: build/C/man7/rtld-audit.7:128
6699 msgid "I<name> was found via the B<ldconfig>(8) cache (I</etc/ld.so.cache>)."
6703 #: build/C/man7/rtld-audit.7:128
6705 msgid "B<LA_SER_DEFAULT>"
6709 #: build/C/man7/rtld-audit.7:132
6710 msgid "I<name> was found via a search of one of the default directories."
6714 #: build/C/man7/rtld-audit.7:132
6716 msgid "B<LA_SER_SECURE>"
6720 #: build/C/man7/rtld-audit.7:136
6721 msgid "I<name> is specific to a secure object (unused on Linux)."
6725 #: build/C/man7/rtld-audit.7:145
6727 "As its function result, B<la_objsearch>() returns the pathname that the "
6728 "dynamic linker should use for further processing. If NULL is returned, then "
6729 "this pathname is ignored for further processing. If this audit library "
6730 "simply intends to monitor search paths, then I<name> should be returned."
6734 #: build/C/man7/rtld-audit.7:145
6736 msgid "la_activity()"
6740 #: build/C/man7/rtld-audit.7:149
6742 msgid "B<void la_activity( uintptr_t *>I<cookie>B<, unsigned int >I<flag>B<);>\n"
6746 #: build/C/man7/rtld-audit.7:158
6748 "The dynamic linker calls this function to inform the auditing library that "
6749 "link-map activity is occurring. I<cookie> identifies the object at the head "
6750 "of the link map. When the dynamic linker invokes this function, I<flag> is "
6751 "set to one of the following values:"
6755 #: build/C/man7/rtld-audit.7:158
6757 msgid "B<LA_ACT_ADD>"
6761 #: build/C/man7/rtld-audit.7:161
6762 msgid "New objects are being added to the link map."
6766 #: build/C/man7/rtld-audit.7:161
6768 msgid "B<LA_ACT_DELETE>"
6772 #: build/C/man7/rtld-audit.7:164
6773 msgid "Objects are being removed from the link map."
6777 #: build/C/man7/rtld-audit.7:164
6779 msgid "B<LA_ACT_CONSISTENT>"
6783 #: build/C/man7/rtld-audit.7:167
6784 msgid "Link-map activity has been completed: the map is once again consistent."
6788 #: build/C/man7/rtld-audit.7:167
6790 msgid "la_objopen()"
6794 #: build/C/man7/rtld-audit.7:172
6797 "B<unsigned int la_objopen(struct link_map *>I<map>B<, Lmid_t >I<lmid>B<,>\n"
6798 "B< uintptr_t *>I<cookie>B<);>\n"
6802 #: build/C/man7/rtld-audit.7:181
6804 "The dynamic linker calls this function when a new shared object is loaded. "
6805 "The I<map> argument is a pointer to a link-map structure that describes the "
6806 "object. The I<lmid> field has one of the following values"
6810 #: build/C/man7/rtld-audit.7:181
6812 msgid "B<LM_ID_BASE>"
6816 #: build/C/man7/rtld-audit.7:184
6817 msgid "Link map is part of the initial namespace."
6821 #: build/C/man7/rtld-audit.7:184
6823 msgid "B<LM_ID_NEWLM>"
6827 #: build/C/man7/rtld-audit.7:188
6828 msgid "Link map is part of a new namespace requested via B<dlmopen>(3)."
6832 #: build/C/man7/rtld-audit.7:196
6834 "I<cookie> is a pointer to an identifier for this object. The identifier is "
6835 "provided to later calls to functions in the auditing library in order to "
6836 "identify this object. This identifier is initialized to point to object's "
6837 "link map, but the audit library can change the identifier to some other "
6838 "value that it may prefer to use to identify the object."
6842 #: build/C/man7/rtld-audit.7:203
6844 "As its return value, B<la_objopen>() returns a bit mask created by ORing "
6845 "zero or more of the following constants, which allow the auditing library to "
6846 "select the objects to be monitored by B<la_symbind*>():"
6850 #: build/C/man7/rtld-audit.7:203
6852 msgid "B<LA_FLG_BINDTO>"
6856 #: build/C/man7/rtld-audit.7:206
6857 msgid "Audit symbol bindings to this object."
6861 #: build/C/man7/rtld-audit.7:206
6863 msgid "B<LA_FLG_BINDFROM>"
6867 #: build/C/man7/rtld-audit.7:209
6868 msgid "Audit symbol bindings from this object."
6872 #: build/C/man7/rtld-audit.7:213
6874 "A return value of 0 from B<la_objopen>() indicates that no symbol bindings "
6875 "should be audited for this object."
6879 #: build/C/man7/rtld-audit.7:213
6881 msgid "la_objclose()"
6885 #: build/C/man7/rtld-audit.7:217
6887 msgid "B<unsigned int la_objclose(uintptr_t *>I<cookie>B<);>\n"
6891 #: build/C/man7/rtld-audit.7:226
6893 "The dynamic linker invokes this function after any finalization code for the "
6894 "object has been executed, before the object is unloaded. The I<cookie> "
6895 "argument is the identifier obtained from a previous invocation of "
6900 #: build/C/man7/rtld-audit.7:230
6902 "In the current implementation, the value returned by B<la_objclose>() is "
6907 #: build/C/man7/rtld-audit.7:230
6909 msgid "la_preinit()"
6913 #: build/C/man7/rtld-audit.7:234
6915 msgid "B<void la_preinit(uintptr_t *>I<cookie>B<);>\n"
6919 #: build/C/man7/rtld-audit.7:244
6921 "The dynamic linker invokes this function after all shared objects have been "
6922 "loaded, before control is passed to the application (i.e., before calling "
6923 "I<main>()). Note that I<main>() may still later dynamically load objects "
6924 "using B<dlopen>(3)."
6928 #: build/C/man7/rtld-audit.7:244
6930 msgid "la_symbind*()"
6934 #: build/C/man7/rtld-audit.7:253
6937 "B<uintptr_t la_symbind32(Elf32_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
6938 "B< uintptr_t *>I<refcook>B<, uintptr_t "
6939 "*>I<defcook>B<,>\n"
6940 "B< unsigned int *>I<flags>B<, const char "
6941 "*>I<symname>B<);>\n"
6942 "B<uintptr_t la_symbind64(Elf64_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
6943 "B< uintptr_t *>I<refcook>B<, uintptr_t "
6944 "*>I<defcook>B<,>\n"
6945 "B< unsigned int *>I<flags>B<, const char "
6946 "*>I<symname>B<);>\n"
6950 #: build/C/man7/rtld-audit.7:265
6952 "The dynamic linker invokes one of these functions when a symbol binding "
6953 "occurs between two shared objects that have been marked for auditing "
6954 "notification by B<la_objopen>(). The B<la_symbind32>() function is "
6955 "employed on 32-bit platforms; the B<la_symbind64>() function is employed on "
6960 #: build/C/man7/rtld-audit.7:275
6962 "The I<sym> argument is a pointer to a structure that provides information "
6963 "about the symbol being bound. The structure definition is shown in "
6964 "I<E<lt>elf.hE<gt>>. Among the fields of this structure, I<st_value> "
6965 "indicates the address to which the symbol is bound."
6969 #: build/C/man7/rtld-audit.7:280
6971 "The I<ndx> argument gives the index of the symbol in the symbol table of the "
6972 "bound shared object."
6976 #: build/C/man7/rtld-audit.7:295
6978 "The I<refcook> argument identifies the shared object that is making the "
6979 "symbol reference; this is the same identifier that is provided to the "
6980 "B<la_objopen>() function that returned B<LA_FLG_BINDFROM>. The I<defcook> "
6981 "argument identifies the shared object that defines the referenced symbol; "
6982 "this is the same identifier that is provided to the B<la_objopen>() "
6983 "function that returned B<LA_FLG_BINDTO>."
6987 #: build/C/man7/rtld-audit.7:299
6988 msgid "The I<symname> argument points a string containing the name of the symbol."
6991 #. LA_SYMB_STRUCTCALL appears to be unused
6993 #: build/C/man7/rtld-audit.7:307
6995 "The I<flags> argument is a bit mask that both provides information about the "
6996 "symbol and can be used to modify further auditing of this PLT (Procedure "
6997 "Linkage Table) entry. The dynamic linker may supply the following bit "
6998 "values in this argument:"
7002 #: build/C/man7/rtld-audit.7:307
7004 msgid "B<LA_SYMB_DLSYM>"
7008 #: build/C/man7/rtld-audit.7:311
7009 msgid "The binding resulted from a call to B<dlsym>(3)."
7013 #: build/C/man7/rtld-audit.7:311
7015 msgid "B<LA_SYMB_ALTVALUE>"
7019 #: build/C/man7/rtld-audit.7:316
7021 "A previous B<la_symbind*>() call returned an alternate value for this "
7025 #. pltenter/pltexit are called for non-dynamically loaded libraries,
7026 #. but don't seem to be called for dynamically loaded libs?
7027 #. Is this the same on Solaris?
7029 #: build/C/man7/rtld-audit.7:330
7031 "By default, if the auditing library implements B<la_pltenter>() and "
7032 "B<la_pltexit>() functions (see below), then these functions are invoked, "
7033 "after B<la_symbind>(), for PLT entries, each time the symbol is referenced. "
7034 "The following flags can be ORed into I<*flags> to change this default "
7039 #: build/C/man7/rtld-audit.7:330
7041 msgid "B<LA_SYMB_NOPLTENTER>"
7045 #: build/C/man7/rtld-audit.7:335
7046 msgid "Don't call B<la_pltenter>() for this symbol."
7050 #: build/C/man7/rtld-audit.7:335
7052 msgid "B<LA_SYMB_NOPLTEXIT>"
7056 #: build/C/man7/rtld-audit.7:340
7057 msgid "Don't call B<la_pltexit>() for this symbol."
7061 #: build/C/man7/rtld-audit.7:351
7063 "The return value of B<la_symbind32>() and B<la_symbind64>() is the address "
7064 "to which control should be passed after the function returns. If the "
7065 "auditing library is simply monitoring symbol bindings, then it should return "
7066 "I<sym-E<gt>st_value>. A different value may be returned if the library "
7067 "wishes to direct control to an alternate location."
7071 #: build/C/man7/rtld-audit.7:351
7073 msgid "la_pltenter()"
7077 #: build/C/man7/rtld-audit.7:357 build/C/man7/rtld-audit.7:417
7079 "The precise name and argument types for this function depend on the hardware "
7080 "platform. (The appropriate definition is supplied by I<E<lt>link.hE<gt>>.) "
7081 "Here is the definition for x86-32:"
7085 #: build/C/man7/rtld-audit.7:363
7088 "B<Elf32_Addr la_i86_gnu_pltenter(Elf32_Sym *>I<sym>B<, unsigned int "
7090 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
7091 "B< La_i86_regs *>I<regs>B<, unsigned int *>I<flags>B<,>\n"
7092 "B< const char *>I<symname>B<, long int "
7093 "*>I<framesizep>B<);>\n"
7097 #: build/C/man7/rtld-audit.7:367
7099 "This function is invoked just before a PLT entry is called, between two "
7100 "shared objects that have been marked for binding notification."
7104 #: build/C/man7/rtld-audit.7:377 build/C/man7/rtld-audit.7:440
7106 "The I<sym>, I<ndx>, I<refcook>, I<defcook>, and I<symname> are as for "
7111 #: build/C/man7/rtld-audit.7:384
7113 "The I<regs> argument points to a structure (defined in I<E<lt>link.hE<gt>>) "
7114 "containing the values of registers to be used for the call to this PLT "
7119 #: build/C/man7/rtld-audit.7:390
7121 "The I<flags> argument points to a bit mask that conveys information about, "
7122 "and can be used to modify subsequent auditing of, this PLT entry, as for "
7126 #. FIXME . Is the following correct?
7128 #: build/C/man7/rtld-audit.7:406
7130 "The I<framesizep> argument points to a I<long\\ int> buffer that can be used "
7131 "to explicitly set the frame size used for the call to this PLT entry. If "
7132 "different B<la_pltenter>() invocations for this symbol return different "
7133 "values, then the maximum returned value is used. The B<la_pltenter>() "
7134 "function is called only if this buffer is explicitly set to a suitable "
7139 #: build/C/man7/rtld-audit.7:411
7140 msgid "The return value of B<la_pltenter>() is as for B<la_symbind*>()."
7144 #: build/C/man7/rtld-audit.7:411
7146 msgid "la_pltexit()"
7150 #: build/C/man7/rtld-audit.7:423
7153 "B<unsigned int la_i86_gnu_pltexit(Elf32_Sym *>I<sym>B<, unsigned int "
7155 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
7156 "B< const La_i86_regs *>I<inregs>B<, La_i86_retval "
7157 "*>I<outregs>B<,>\n"
7158 "B< const char *>I<symname>B<);>\n"
7162 #: build/C/man7/rtld-audit.7:430
7164 "This function is called when a PLT entry, made between two shared objects "
7165 "that have been marked for binding notification, returns. The function is "
7166 "called just before control returns to the caller of the PLT entry."
7170 #: build/C/man7/rtld-audit.7:453
7172 "The I<inregs> argument points to a structure (defined in "
7173 "I<E<lt>link.hE<gt>>) containing the values of registers used for the call "
7174 "to this PLT entry. The I<outregs> argument points to a structure (defined "
7175 "in I<E<lt>link.hE<gt>>) containing return values for the call to this PLT "
7176 "entry. These values can be modified by the caller, and the changes will be "
7177 "visible to the caller of the PLT entry."
7180 #. This differs from Solaris, where an audit library that monitors
7181 #. symbol binding should return the value of the 'retval' argument
7182 #. (not provided by GNU, but equivalent to returning outregs->lrv_eax
7183 #. on (say) x86-32).
7185 #: build/C/man7/rtld-audit.7:461
7187 "In the current GNU implementation, the return value of B<la_pltexit>() is "
7192 #: build/C/man7/rtld-audit.7:467
7194 "This API is nonstandard, but very similar to the Solaris API, described in "
7195 "the Solaris I<Linker and Libraries Guide>, in the chapter I<Runtime Linker "
7196 "Auditing Interface>."
7200 #: build/C/man7/rtld-audit.7:470
7201 msgid "Note the following differences from the Solaris dynamic linker auditing API:"
7205 #: build/C/man7/rtld-audit.7:470 build/C/man7/rtld-audit.7:474 build/C/man7/rtld-audit.7:482
7211 #: build/C/man7/rtld-audit.7:474
7213 "The Solaris B<la_objfilter>() interface is not supported by the GNU "
7218 #: build/C/man7/rtld-audit.7:482
7220 "The Solaris B<la_symbind32>() and B<la_pltexit>() functions do not provide "
7221 "a I<symname> argument."
7225 #: build/C/man7/rtld-audit.7:492
7227 "The Solaris B<la_pltexit>() function does not provide I<inregs> and "
7228 "I<outregs> arguments (but does provide a I<retval> argument with the "
7229 "function return value)."
7232 #. FIXME . Specifying multiple audit libraries doesn't work on GNU.
7233 #. My simple tests on Solaris work okay, but not on Linux -- mtk, Jan 2009
7234 #. glibc bug filed: http://sourceware.org/bugzilla/show_bug.cgi?id=9733
7235 #. Reportedly, this is fixed on 16 Mar 2009 (i.e., for glibc 2.10)
7237 #: build/C/man7/rtld-audit.7:502
7239 "In glibc versions up to and include 2.9, specifying more than one audit "
7240 "library in B<LD_AUDIT> results in a run-time crash. This is reportedly "
7241 "fixed in glibc 2.10."
7245 #: build/C/man7/rtld-audit.7:506
7248 "#include E<lt>link.hE<gt>\n"
7249 "#include E<lt>stdio.hE<gt>\n"
7253 #: build/C/man7/rtld-audit.7:511
7257 "la_version(unsigned int version)\n"
7259 " printf(\"la_version(): %d\\en\", version);\n"
7263 #: build/C/man7/rtld-audit.7:514
7266 " return version;\n"
7271 #: build/C/man7/rtld-audit.7:527
7275 "la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)\n"
7277 " printf(\"la_objsearch(): name = %s; cookie = %x\", name, cookie);\n"
7278 " printf(\"; flag = %s\\en\",\n"
7279 " (flag == LA_SER_ORIG) ? \"LA_SER_ORIG\" :\n"
7280 " (flag == LA_SER_LIBPATH) ? \"LA_SER_LIBPATH\" :\n"
7281 " (flag == LA_SER_RUNPATH) ? \"LA_SER_RUNPATH\" :\n"
7282 " (flag == LA_SER_DEFAULT) ? \"LA_SER_DEFAULT\" :\n"
7283 " (flag == LA_SER_CONFIG) ? \"LA_SER_CONFIG\" :\n"
7284 " (flag == LA_SER_SECURE) ? \"LA_SER_SECURE\" :\n"
7289 #: build/C/man7/rtld-audit.7:530
7297 #: build/C/man7/rtld-audit.7:540
7301 "la_activity (uintptr_t *cookie, unsigned int flag)\n"
7303 " printf(\"la_activity(): cookie = %x; flag = %s\\en\", cookie,\n"
7304 " (flag == LA_ACT_CONSISTENT) ? \"LA_ACT_CONSISTENT\" :\n"
7305 " (flag == LA_ACT_ADD) ? \"LA_ACT_ADD\" :\n"
7306 " (flag == LA_ACT_DELETE) ? \"LA_ACT_DELETE\" :\n"
7312 #: build/C/man7/rtld-audit.7:550
7316 "la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie)\n"
7318 " printf(\"la_objopen(): loading \\e\"%s\\e\"; lmid = %s; "
7319 "cookie=%x\\en\",\n"
7320 " map-E<gt>l_name,\n"
7321 " (lmid == LM_ID_BASE) ? \"LM_ID_BASE\" :\n"
7322 " (lmid == LM_ID_NEWLM) ? \"LM_ID_NEWLM\" :\n"
7328 #: build/C/man7/rtld-audit.7:553
7331 " return LA_FLG_BINDTO | LA_FLG_BINDFROM;\n"
7336 #: build/C/man7/rtld-audit.7:558
7340 "la_objclose (uintptr_t *cookie)\n"
7342 " printf(\"la_objclose(): %x\\en\", cookie);\n"
7346 #: build/C/man7/rtld-audit.7:561
7354 #: build/C/man7/rtld-audit.7:567
7358 "la_preinit(uintptr_t *cookie)\n"
7360 " printf(\"la_preinit(): %x\\en\", cookie);\n"
7365 #: build/C/man7/rtld-audit.7:576
7369 "la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
7370 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
7372 " printf(\"la_symbind32(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
7373 " symname, sym-E<gt>st_value);\n"
7374 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
7375 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
7379 #: build/C/man7/rtld-audit.7:579 build/C/man7/rtld-audit.7:591 build/C/man7/rtld-audit.7:601
7382 " return sym-E<gt>st_value;\n"
7387 #: build/C/man7/rtld-audit.7:588
7391 "la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
7392 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
7394 " printf(\"la_symbind64(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
7395 " symname, sym-E<gt>st_value);\n"
7396 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
7397 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
7401 #: build/C/man7/rtld-audit.7:598
7405 "la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx,\n"
7406 " uintptr_t *refcook, uintptr_t *defcook, La_i86_regs *regs,\n"
7407 " unsigned int *flags, const char *symname, long int *framesizep)\n"
7409 " printf(\"la_i86_gnu_pltenter(): %s (%p)\\en\", symname, "
7410 "sym-E<gt>st_value);\n"
7414 #: build/C/man7/rtld-audit.7:607
7415 msgid "B<ldd>(1), B<dlopen>(3), B<ld.so>(8), B<ldconfig>(8)"
7419 #: build/C/man8/sln.8:25
7425 #: build/C/man8/sln.8:25
7431 #: build/C/man8/sln.8:28
7432 msgid "sln - create symbolic links"
7436 #: build/C/man8/sln.8:30
7437 msgid "B<sln>I< source dest>"
7441 #: build/C/man8/sln.8:32
7442 msgid "B<sln>I< filelist>"
7446 #: build/C/man8/sln.8:42
7448 "The B<sln> program creates symbolic links. Unlike the B<ln>(1) program, it "
7449 "is statically linked. This means that if for some reason the dynamic linker "
7450 "is not working, B<sln> can be used to make symbolic links to dynamic "
7455 #: build/C/man8/sln.8:48
7457 "The command line has two forms. In the first form, it creates I<dest> as a "
7458 "new symbolic link to I<source>."
7462 #: build/C/man8/sln.8:56
7464 "In the second form, I<filelist> is a list of space-separated pathname pairs, "
7465 "and the effect is as if B<sln> was executed once for each line of the file, "
7466 "with the two pathnames as the arguments."
7470 #: build/C/man8/sln.8:60
7471 msgid "The B<sln> program supports no command-line options."
7475 #: build/C/man8/sln.8:64
7476 msgid "B<ln>(1), B<ldconfig>(8), B<ld.so>(8)"
7480 #: build/C/man1/sprof.1:25
7486 #: build/C/man1/sprof.1:25
7492 #: build/C/man1/sprof.1:28
7493 msgid "sprof - read and display shared object profiling data"
7497 #: build/C/man1/sprof.1:32
7499 msgid "B<sprof> [I<option>]... I<shared-object-path> [I<profile-data-path>]\n"
7503 #: build/C/man1/sprof.1:46
7505 "The B<sprof> command displays a profiling summary for the shared object "
7506 "specified as its first command-line argument. The profiling summary is "
7507 "created using previously generated profiling data in the (optional) second "
7508 "command-line argument. If the profiling data pathname is omitted, then "
7509 "B<sprof> will attempt to deduce it using the soname of the shared object, "
7510 "looking for a file with the name I<E<lt>sonameE<gt>.profile> in the current "
7515 #: build/C/man1/sprof.1:49
7517 "The following command-line options specify the profile output to be "
7522 #: build/C/man1/sprof.1:49
7524 msgid "B<-c>, B<--call-pairs>"
7528 #: build/C/man1/sprof.1:54
7530 "Print a list of pairs of call paths for the interfaces exported by the "
7531 "shared object, along with the number of times each path is used."
7535 #: build/C/man1/sprof.1:54
7537 msgid "B<-p>, B<--flat-profile>"
7541 #: build/C/man1/sprof.1:58
7543 "Generate a flat profile of all of the functions in the monitored object, "
7544 "with counts and ticks."
7548 #: build/C/man1/sprof.1:58
7550 msgid "B<-q>, B<--graph>"
7554 #: build/C/man1/sprof.1:61
7555 msgid "Generate a call graph."
7559 #: build/C/man1/sprof.1:64
7561 "If none of the above options is specified, then the default behavior is to "
7562 "display a flat profile and a call graph."
7566 #: build/C/man1/sprof.1:66
7567 msgid "The following additional command-line options are available:"
7571 #: build/C/man1/sprof.1:69
7572 msgid "Display a summary of command-line options and arguments and exit."
7576 #: build/C/man1/sprof.1:72
7577 msgid "Display a short usage message and exit."
7581 #: build/C/man1/sprof.1:75
7582 msgid "Display the program version and exit."
7586 #: build/C/man1/sprof.1:79
7587 msgid "The B<sprof> command is a GNU extension, not present in POSIX.1."
7591 #: build/C/man1/sprof.1:85
7593 "The following example demonstrates the use of B<sprof>. The example "
7594 "consists of a main program that calls two functions in a shared library. "
7595 "First, the code of the main program:"
7599 #: build/C/man1/sprof.1:90
7603 "#include E<lt>stdlib.hE<gt>\n"
7607 #: build/C/man1/sprof.1:93
7615 #: build/C/man1/sprof.1:101
7619 "main(int argc, char *argv[])\n"
7623 " exit(EXIT_SUCCESS);\n"
7628 #: build/C/man1/sprof.1:110
7630 "The functions I<x1()> and I<x2()> are defined in the following source file "
7631 "that is used to construct the shared library:"
7635 #: build/C/man1/sprof.1:115
7638 "$ B<cat libdemo.c>\n"
7639 "#include E<lt>unistd.hE<gt>\n"
7643 #: build/C/man1/sprof.1:120
7647 "consumeCpu1(int lim)\n"
7653 #: build/C/man1/sprof.1:124 build/C/man1/sprof.1:141
7656 " for (j = 0; j E<lt> lim; j++)\n"
7662 #: build/C/man1/sprof.1:128
7671 #: build/C/man1/sprof.1:132
7674 " for (j = 0; j E<lt> 100; j++)\n"
7675 "\tconsumeCpu1(200000);\n"
7680 #: build/C/man1/sprof.1:137
7684 "consumeCpu2(int lim)\n"
7690 #: build/C/man1/sprof.1:146
7700 #: build/C/man1/sprof.1:150
7703 " for (j = 0; j E<lt> 1000; j++)\n"
7704 "\tconsumeCpu2(10000);\n"
7709 #: build/C/man1/sprof.1:157
7711 "Now we construct the shared library with the real name I<libdemo.so.1.0.1>, "
7712 "and the soname I<libdemo.so.1>:"
7716 #: build/C/man1/sprof.1:162
7719 "$ B<cc -g -fPIC -shared -Wl,-soname,libdemo.so.1 \\e>\n"
7720 " B<-o libdemo.so.1.0.1 libdemo.c>\n"
7724 #: build/C/man1/sprof.1:167
7726 "Then we construct symbolic links for the library soname and the library "
7731 #: build/C/man1/sprof.1:172
7734 "$ B<ln -sf libdemo.so.1.0.1 libdemo.so.1>\n"
7735 "$ B<ln -sf libdemo.so.1 libdemo.so>\n"
7739 #: build/C/man1/sprof.1:177
7741 "Next, we compile the main program, linking it against the shared library, "
7742 "and then list the dynamic dependencies of the program:"
7746 #: build/C/man1/sprof.1:186
7749 "$ B<cc -g -o prog prog.c -L. -ldemo>\n"
7751 "\tlinux-vdso.so.1 =E<gt> (0x00007fff86d66000)\n"
7752 "\tlibdemo.so.1 =E<gt> not found\n"
7753 "\tlibc.so.6 =E<gt> /lib64/libc.so.6 (0x00007fd4dc138000)\n"
7754 "\t/lib64/ld-linux-x86-64.so.2 (0x00007fd4dc51f000)\n"
7758 #: build/C/man1/sprof.1:193
7760 "In order to get profiling information for the shared library, we define the "
7761 "environment variable B<LD_PROFILE> with the soname of the library:"
7765 #: build/C/man1/sprof.1:197
7767 msgid "$ B<export LD_PROFILE=libdemo.so.1>\n"
7771 #: build/C/man1/sprof.1:204
7773 "We then define the environment variable B<LD_PROFILE_OUTPUT> with the "
7774 "pathname of the directory where profile output should be written, and create "
7775 "that directory if it does not exist already:"
7779 #: build/C/man1/sprof.1:209
7782 "$ B<export LD_PROFILE_OUTPUT=$(pwd)/prof_data>\n"
7783 "$ B<mkdir -p $LD_PROFILE_OUTPUT>\n"
7787 #: build/C/man1/sprof.1:217
7789 "B<LD_PROFILE> causes profiling output to be I<appended> to the output file "
7790 "if it already exists, so we ensure that there is no preexisting profiling "
7795 #: build/C/man1/sprof.1:221
7797 msgid "$ B<rm -f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile>\n"
7801 #: build/C/man1/sprof.1:227
7803 "We then run the program to produce the profiling output, which is written to "
7804 "a file in the directory specified in B<LD_PROFILE_OUTPUT>:"
7808 #: build/C/man1/sprof.1:233
7811 "$ B<LD_LIBRARY_PATH=. ./prog>\n"
7812 "$ B<ls prof_data>\n"
7813 "libdemo.so.1.profile\n"
7817 #: build/C/man1/sprof.1:239
7819 "We then use the B<sprof -p> option to generate a flat profile with counts "
7824 #: build/C/man1/sprof.1:244
7827 "$ B<sprof -p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile>\n"
7832 #: build/C/man1/sprof.1:252
7835 "Each sample counts as 0.01 seconds.\n"
7836 " % cumulative self self total\n"
7837 " time seconds seconds calls us/call us/call name\n"
7838 " 60.00 0.06 0.06 100 600.00 consumeCpu1\n"
7839 " 40.00 0.10 0.04 1000 40.00 consumeCpu2\n"
7840 " 0.00 0.10 0.00 1 0.00 x1\n"
7841 " 0.00 0.10 0.00 1 0.00 x2\n"
7845 #: build/C/man1/sprof.1:258
7846 msgid "The B<sprof -q> option generates a call graph:"
7850 #: build/C/man1/sprof.1:262
7852 msgid "$ B<sprof -q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile>\n"
7856 #: build/C/man1/sprof.1:264
7858 msgid "index % time self children called name\n"
7862 #: build/C/man1/sprof.1:279
7865 " 0.00 0.00 100/100 x1 [1]\n"
7866 "[0] 100.0 0.00 0.00 100 consumeCpu1 [0]\n"
7867 "-----------------------------------------------\n"
7868 " 0.00 0.00 1/1 E<lt>UNKNOWNE<gt>\n"
7869 "[1] 0.0 0.00 0.00 1 x1 [1]\n"
7870 " 0.00 0.00 100/100 consumeCpu1 [0]\n"
7871 "-----------------------------------------------\n"
7872 " 0.00 0.00 1000/1000 x2 [3]\n"
7873 "[2] 0.0 0.00 0.00 1000 consumeCpu2 [2]\n"
7874 "-----------------------------------------------\n"
7875 " 0.00 0.00 1/1 E<lt>UNKNOWNE<gt>\n"
7876 "[3] 0.0 0.00 0.00 1 x2 [3]\n"
7877 " 0.00 0.00 1000/1000 consumeCpu2 [2]\n"
7878 "-----------------------------------------------\n"
7882 #: build/C/man1/sprof.1:285
7884 "Above and below, the \"E<lt>UNKNOWNE<gt>\" strings represent identifiers "
7885 "that are outside of the profiled object (in this example, these are "
7886 "instances of I<main()>)."
7890 #: build/C/man1/sprof.1:289
7892 "The B<sprof -c> option generates a list of call pairs and the number of "
7893 "their occurrences:"
7897 #: build/C/man1/sprof.1:297
7900 "$ B<sprof -c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile>\n"
7901 "E<lt>UNKNOWNE<gt> x1 1\n"
7902 "x1 consumeCpu1 100\n"
7903 "E<lt>UNKNOWNE<gt> x2 1\n"
7904 "x2 consumeCpu2 1000\n"
7908 #: build/C/man1/sprof.1:303
7909 msgid "B<gprof>(1), B<ldd>(1), B<ld.so>(8)"