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: 2012-03-19 23:50+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man3/dl_iterate_phdr.3:24
22 msgid "DL_ITERATE_PHDR"
26 #: build/C/man3/dl_iterate_phdr.3:24
32 #: build/C/man3/dl_iterate_phdr.3:24 build/C/man3/end.3:25 build/C/man8/ld.so.8:2 build/C/man8/ldconfig.8:22
38 #: build/C/man3/dl_iterate_phdr.3:24 build/C/man3/dlopen.3:35 build/C/man5/elf.5:33 build/C/man3/end.3:25 build/C/man8/ld.so.8:2 build/C/man8/ldconfig.8:22 build/C/man1/ldd.1:10 build/C/man7/rtld-audit.7:26
40 msgid "Linux Programmer's Manual"
44 #: build/C/man3/dl_iterate_phdr.3:25 build/C/man3/dlopen.3:36 build/C/man5/elf.5:34 build/C/man3/end.3:26 build/C/man8/ld.so.8:3 build/C/man8/ldconfig.8:23 build/C/man1/ldd.1:11 build/C/man7/rtld-audit.7:27
50 #: build/C/man3/dl_iterate_phdr.3:27
51 msgid "dl_iterate_phdr - walk through list of shared objects"
55 #: build/C/man3/dl_iterate_phdr.3:27 build/C/man3/dlopen.3:39 build/C/man5/elf.5:36 build/C/man3/end.3:28 build/C/man8/ld.so.8:5 build/C/man8/ldconfig.8:25 build/C/man1/ldd.1:13 build/C/man7/rtld-audit.7:29
61 #: build/C/man3/dl_iterate_phdr.3:31
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 (*>callbackB<) (struct dl_phdr_info *>infoB<,>\n"
74 " B<size_t> sizeB<, void *>dataB<),>\n"
75 " B<void *>dataB<);>\n"
79 #: build/C/man3/dl_iterate_phdr.3:38 build/C/man3/dlopen.3:51 build/C/man5/elf.5:41 build/C/man3/end.3:34 build/C/man8/ld.so.8:15 build/C/man8/ldconfig.8:54 build/C/man1/ldd.1:15 build/C/man7/rtld-audit.7: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
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:49 build/C/man7/rtld-audit.7:459
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:75 build/C/man7/rtld-audit.7:490
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:106
301 " exit(EXIT_SUCCESS);\n"
306 #: build/C/man3/dl_iterate_phdr.3:195 build/C/man3/dlopen.3:507 build/C/man5/elf.5:1934 build/C/man3/end.3:107 build/C/man8/ld.so.8:370 build/C/man8/ldconfig.8:175 build/C/man1/ldd.1:75 build/C/man7/rtld-audit.7:600
312 #: build/C/man3/dl_iterate_phdr.3:205
314 "B<ldd>(1), B<objdump>(1), B<readelf>(1), B<dlopen>(3), B<elf>(5), "
315 "B<ld.so>(8), and the I<Executable and Linking Format Specification> "
316 "available at various locations online."
320 #: build/C/man3/dl_iterate_phdr.3:205 build/C/man3/dlopen.3:515 build/C/man5/elf.5:1958 build/C/man3/end.3:112 build/C/man8/ld.so.8:380 build/C/man8/ldconfig.8:178 build/C/man1/ldd.1:78 build/C/man7/rtld-audit.7:605
326 #: build/C/man3/dl_iterate_phdr.3:212 build/C/man3/dlopen.3:522 build/C/man5/elf.5:1965 build/C/man3/end.3:119 build/C/man8/ld.so.8:387 build/C/man8/ldconfig.8:185 build/C/man1/ldd.1:85 build/C/man7/rtld-audit.7:612
328 "This page is part of release 3.35 of the Linux I<man-pages> project. A "
329 "description of the project, and information about reporting bugs, can be "
330 "found at http://man7.org/linux/man-pages/."
334 #: build/C/man3/dlopen.3:35
340 #: build/C/man3/dlopen.3:35
346 #: build/C/man3/dlopen.3:35 build/C/man5/elf.5:33 build/C/man7/rtld-audit.7:26
352 #: build/C/man3/dlopen.3:39
354 "dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to "
355 "dynamic linking loader"
359 #: build/C/man3/dlopen.3:41
360 msgid "B<#include E<lt>dlfcn.hE<gt>>"
364 #: build/C/man3/dlopen.3:43
365 msgid "B<void *dlopen(const char *>I<filename>B<, int >I<flag>B<);>"
369 #: build/C/man3/dlopen.3:45
370 msgid "B<char *dlerror(void);>"
374 #: build/C/man3/dlopen.3:47
375 msgid "B<void *dlsym(void *>I<handle>B<, const char *>I<symbol>B<);>"
379 #: build/C/man3/dlopen.3:49
380 msgid "B<int dlclose(void *>I<handle>B<);>"
384 #: build/C/man3/dlopen.3:51
385 msgid "Link with I<-ldl>."
389 #: build/C/man3/dlopen.3:58
391 "The four functions B<dlopen>(), B<dlsym>(), B<dlclose>(), B<dlerror>() "
392 "implement the interface to the dynamic linking loader."
396 #: build/C/man3/dlopen.3:58
402 #: build/C/man3/dlopen.3:71
404 "The function B<dlerror>() returns a human readable string describing the "
405 "most recent error that occurred from B<dlopen>(), B<dlsym>() or "
406 "B<dlclose>() since the last call to B<dlerror>(). It returns NULL if no "
407 "errors have occurred since initialization or since it was last called."
411 #: build/C/man3/dlopen.3:71
417 #: build/C/man3/dlopen.3:89
419 "The function B<dlopen>() loads the dynamic library file named by the "
420 "null-terminated string I<filename> and returns an opaque \"handle\" for the "
421 "dynamic library. If I<filename> is NULL, then the returned handle is for "
422 "the main program. If I<filename> contains a slash (\"/\"), then it is "
423 "interpreted as a (relative or absolute) pathname. Otherwise, the dynamic "
424 "linker searches for the library as follows (see B<ld.so>(8) for further "
429 #: 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:45 build/C/man8/ld.so.8:50 build/C/man8/ld.so.8:55 build/C/man8/ld.so.8:59 build/C/man8/ld.so.8:67
435 #: build/C/man3/dlopen.3:93
437 "(ELF only) If the executable file for the calling program contains a "
438 "DT_RPATH tag, and does not contain a DT_RUNPATH tag, then the directories "
439 "listed in the DT_RPATH tag are searched."
443 #: build/C/man3/dlopen.3:100
445 "If, at the time that the program was started, the environment variable "
446 "B<LD_LIBRARY_PATH> was defined to contain a colon-separated list of "
447 "directories, then these are searched. (As a security measure this variable "
448 "is ignored for set-user-ID and set-group-ID programs.)"
452 #: build/C/man3/dlopen.3:104
454 "(ELF only) If the executable file for the calling program contains a "
455 "DT_RUNPATH tag, then the directories listed in that tag are searched."
459 #: build/C/man3/dlopen.3:111
461 "The cache file I</etc/ld.so.cache> (maintained by B<ldconfig>(8)) is "
462 "checked to see whether it contains an entry for I<filename>."
466 #: build/C/man3/dlopen.3:117
467 msgid "The directories I</lib> and I</usr/lib> are searched (in that order)."
471 #: build/C/man3/dlopen.3:123
473 "If the library has dependencies on other shared libraries, then these are "
474 "also automatically loaded by the dynamic linker using the same rules. (This "
475 "process may occur recursively, if those libraries in turn have dependencies, "
480 #: build/C/man3/dlopen.3:126
481 msgid "One of the following two values must be included in I<flag>:"
485 #: build/C/man3/dlopen.3:126
491 #: build/C/man3/dlopen.3:134
493 "Perform lazy binding. Only resolve symbols as the code that references them "
494 "is executed. If the symbol is never referenced, then it is never resolved. "
495 "(Lazy binding is only performed for function references; references to "
496 "variables are always immediately bound when the library is loaded.)"
500 #: build/C/man3/dlopen.3:134
506 #: build/C/man3/dlopen.3:143
508 "If this value is specified, or the environment variable B<LD_BIND_NOW> is "
509 "set to a nonempty string, all undefined symbols in the library are resolved "
510 "before B<dlopen>() returns. If this cannot be done, an error is returned."
514 #: build/C/man3/dlopen.3:146
515 msgid "Zero or more of the following values may also be ORed in I<flag>:"
519 #: build/C/man3/dlopen.3:146
521 msgid "B<RTLD_GLOBAL>"
525 #: build/C/man3/dlopen.3:150
527 "The symbols defined by this library will be made available for symbol "
528 "resolution of subsequently loaded libraries."
532 #: build/C/man3/dlopen.3:150
534 msgid "B<RTLD_LOCAL>"
538 #: build/C/man3/dlopen.3:157
540 "This is the converse of B<RTLD_GLOBAL>, and the default if neither flag is "
541 "specified. Symbols defined in this library are not made available to "
542 "resolve references in subsequently loaded libraries."
546 #: build/C/man3/dlopen.3:157
548 msgid "B<RTLD_NODELETE> (since glibc 2.2)"
551 #. (But it is present on Solaris.)
553 #: build/C/man3/dlopen.3:167
555 "Do not unload the library during B<dlclose>(). Consequently, the library's "
556 "static variables are not reinitialized if the library is reloaded with "
557 "B<dlopen>() at a later time. This flag is not specified in POSIX.1-2001."
561 #: build/C/man3/dlopen.3:167
563 msgid "B<RTLD_NOLOAD> (since glibc 2.2)"
566 #. (But it is present on Solaris.)
568 #: build/C/man3/dlopen.3:182
570 "Don't load the library. This can be used to test if the library is already "
571 "resident (B<dlopen>() returns NULL if it is not, or the library's handle if "
572 "it is resident). This flag can also be used to promote the flags on a "
573 "library that is already loaded. For example, a library that was previously "
574 "loaded with B<RTLD_LOCAL> can be reopened with B<RTLD_NOLOAD\\ |\\ "
575 "RTLD_GLOBAL>. This flag is not specified in POSIX.1-2001."
579 #: build/C/man3/dlopen.3:182
581 msgid "B<RTLD_DEEPBIND> (since glibc 2.3.4)"
584 #. Inimitably described by UD in
585 #. http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
587 #: build/C/man3/dlopen.3:192
589 "Place the lookup scope of the symbols in this library ahead of the global "
590 "scope. This means that a self-contained library will use its own symbols in "
591 "preference to global symbols with the same name contained in libraries that "
592 "have already been loaded. This flag is not specified in POSIX.1-2001."
596 #: build/C/man3/dlopen.3:204
598 "If I<filename> is a NULL pointer, then the returned handle is for the main "
599 "program. When given to B<dlsym>(), this handle causes a search for a symbol "
600 "in the main program, followed by all shared libraries loaded at program "
601 "startup, and then all shared libraries loaded by B<dlopen>() with the flag "
606 #: build/C/man3/dlopen.3:214
608 "External references in the library are resolved using the libraries in that "
609 "library's dependency list and any other libraries previously opened with the "
610 "B<RTLD_GLOBAL> flag. If the executable was linked with the flag "
611 "\"-rdynamic\" (or, synonymously, \"--export-dynamic\"), then the global "
612 "symbols in the executable will also be used to resolve references in a "
613 "dynamically loaded library."
617 #: build/C/man3/dlopen.3:232
619 "If the same library is loaded again with B<dlopen>(), the same file handle "
620 "is returned. The dl library maintains reference counts for library handles, "
621 "so a dynamic library is not deallocated until B<dlclose>() has been called "
622 "on it as many times as B<dlopen>() has succeeded on it. The B<_init>() "
623 "routine, if present, is only called once. But a subsequent call with "
624 "B<RTLD_NOW> may force symbol resolution for a library earlier loaded with "
629 #: build/C/man3/dlopen.3:236
630 msgid "If B<dlopen>() fails for any reason, it returns NULL."
634 #: build/C/man3/dlopen.3:236
640 #: build/C/man3/dlopen.3:265
642 "The function B<dlsym>() takes a \"handle\" of a dynamic library returned by "
643 "B<dlopen>() and the null-terminated symbol name, returning the address "
644 "where that symbol is loaded into memory. If the symbol is not found, in the "
645 "specified library or any of the libraries that were automatically loaded by "
646 "B<dlopen>() when that library was loaded, B<dlsym>() returns NULL. (The "
647 "search performed by B<dlsym>() is breadth first through the dependency tree "
648 "of these libraries.) Since the value of the symbol could actually be NULL "
649 "(so that a NULL return from B<dlsym>() need not indicate an error), the "
650 "correct way to test for an error is to call B<dlerror>() to clear any old "
651 "error conditions, then call B<dlsym>(), and then call B<dlerror>() again, "
652 "saving its return value into a variable, and check whether this saved value "
657 #: build/C/man3/dlopen.3:277
659 "There are two special pseudo-handles, B<RTLD_DEFAULT> and B<RTLD_NEXT>. The "
660 "former will find the first occurrence of the desired symbol using the "
661 "default library search order. The latter will find the next occurrence of a "
662 "function in the search order after the current library. This allows one to "
663 "provide a wrapper around a function in another shared library."
667 #: build/C/man3/dlopen.3:277
673 #: build/C/man3/dlopen.3:284
675 "The function B<dlclose>() decrements the reference count on the dynamic "
676 "library handle I<handle>. If the reference count drops to zero and no other "
677 "loaded libraries use symbols in it, then the dynamic library is unloaded."
681 #: build/C/man3/dlopen.3:288
682 msgid "The function B<dlclose>() returns 0 on success, and nonzero on error."
686 #: build/C/man3/dlopen.3:288
688 msgid "The obsolete symbols _init() and _fini()"
692 #: build/C/man3/dlopen.3:306
694 "The linker recognizes special symbols B<_init> and B<_fini>. If a dynamic "
695 "library exports a routine named B<_init>(), then that code is executed after "
696 "the loading, before B<dlopen>() returns. If the dynamic library exports a "
697 "routine named B<_fini>(), then that routine is called just before the "
698 "library is unloaded. In case you need to avoid linking against the system "
699 "startup files, this can be done by using the B<gcc>(1) I<-nostartfiles> "
700 "command-line option."
703 #. void _init(void) __attribute__((constructor));
704 #. void _fini(void) __attribute__((destructor));
706 #: build/C/man3/dlopen.3:317
708 "Using these routines, or the gcc B<-nostartfiles> or B<-nostdlib> options, "
709 "is not recommended. Their use may result in undesired behavior, since the "
710 "constructor/destructor routines will not be executed (unless special "
711 "measures are taken)."
715 #: build/C/man3/dlopen.3:329
717 "Instead, libraries should export routines using the "
718 "B<__attribute__((constructor))> and B<__attribute__((destructor))> function "
719 "attributes. See the gcc info pages for information on these. Constructor "
720 "routines are executed before B<dlopen>() returns, and destructor routines "
721 "are executed before B<dlclose>() returns."
725 #: build/C/man3/dlopen.3:329
727 msgid "Glibc extensions: dladdr() and dlvsym()"
731 #: build/C/man3/dlopen.3:331
732 msgid "Glibc adds two functions not described by POSIX, with prototypes"
736 #: build/C/man3/dlopen.3:335
739 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
740 "B<#include E<lt>dlfcn.hE<gt>>\n"
744 #: build/C/man3/dlopen.3:337
746 msgid "B<int dladdr(void *>I<addr>B<, Dl_info *>I<info>B<);>\n"
750 #: build/C/man3/dlopen.3:339
753 "B<void *dlvsym(void *>I<handle>B<, char *>I<symbol>B<, char "
754 "*>I<version>B<);>\n"
758 #: build/C/man3/dlopen.3:348
760 "The function B<dladdr>() takes a function pointer and tries to resolve name "
761 "and file where it is located. Information is stored in the I<Dl_info> "
766 #: build/C/man3/dlopen.3:361
770 " const char *dli_fname; /* Pathname of shared object that\n"
771 " contains address */\n"
772 " void *dli_fbase; /* Address at which shared object\n"
774 " const char *dli_sname; /* Name of nearest symbol with address\n"
775 " lower than I<addr> */\n"
776 " void *dli_saddr; /* Exact address of symbol named\n"
777 " in I<dli_sname> */\n"
782 #: build/C/man3/dlopen.3:371
784 "If no symbol matching I<addr> could be found, then I<dli_sname> and "
785 "I<dli_saddr> are set to NULL."
789 #: build/C/man3/dlopen.3:374
790 msgid "B<dladdr>() returns 0 on error, and nonzero on success."
794 #: build/C/man3/dlopen.3:381
796 "The function B<dlvsym>(), provided by glibc since version 2.1, does the same "
797 "as B<dlsym>() but takes a version string as an additional argument."
801 #: build/C/man3/dlopen.3:388
803 "POSIX.1-2001 describes B<dlclose>(), B<dlerror>(), B<dlopen>(), and "
808 #: build/C/man3/dlopen.3:388 build/C/man5/elf.5:1907 build/C/man3/end.3:52 build/C/man8/ld.so.8:364 build/C/man1/ldd.1:42 build/C/man7/rtld-audit.7:465
814 #. The string returned by
816 #. should not be modified.
817 #. Some systems give the prototype as
820 #. .B "const char *dlerror(void);"
823 #: build/C/man3/dlopen.3:407
825 "The symbols B<RTLD_DEFAULT> and B<RTLD_NEXT> are defined by "
826 "I<E<lt>dlfcn.hE<gt>> only when B<_GNU_SOURCE> was defined before including "
831 #: build/C/man3/dlopen.3:412
833 "Since glibc 2.2.3, B<atexit>(3) can be used to register an exit handler "
834 "that is automatically called when a library is unloaded."
838 #: build/C/man3/dlopen.3:412
844 #: build/C/man3/dlopen.3:418
846 "The dlopen interface standard comes from SunOS. That system also has "
847 "B<dladdr>(), but not B<dlvsym>()."
851 #: build/C/man3/dlopen.3:418 build/C/man1/ldd.1:59 build/C/man7/rtld-audit.7:590
857 #: build/C/man3/dlopen.3:430
859 "Sometimes, the function pointers you pass to B<dladdr>() may surprise you. "
860 "On some architectures (notably i386 and x86_64), I<dli_fname> and "
861 "I<dli_fbase> may end up pointing back at the object from which you called "
862 "B<dladdr>(), even if the function used as an argument should come from a "
863 "dynamically linked library."
867 #: build/C/man3/dlopen.3:446
869 "The problem is that the function pointer will still be resolved at compile "
870 "time, but merely point to the I<plt> (Procedure Linkage Table) section of "
871 "the original object (which dispatches the call after asking the dynamic "
872 "linker to resolve the symbol). To work around this, you can try to compile "
873 "the code to be position-independent: then, the compiler cannot prepare the "
874 "pointer at compile time anymore and today's B<gcc>(1) will generate code "
875 "that just loads the final symbol address from the I<got> (Global Offset "
876 "Table) at run time before passing it to B<dladdr>()."
880 #: build/C/man3/dlopen.3:448
881 msgid "Load the math library, and print the cosine of 2.0:"
885 #: build/C/man3/dlopen.3:453
888 "#include E<lt>stdio.hE<gt>\n"
889 "#include E<lt>stdlib.hE<gt>\n"
890 "#include E<lt>dlfcn.hE<gt>\n"
894 #: build/C/man3/dlopen.3:460
898 "main(int argc, char **argv)\n"
901 " double (*cosine)(double);\n"
906 #: build/C/man3/dlopen.3:466
909 " handle = dlopen(\"libm.so\", RTLD_LAZY);\n"
911 " fprintf(stderr, \"%s\\en\", dlerror());\n"
912 " exit(EXIT_FAILURE);\n"
917 #: build/C/man3/dlopen.3:468
919 msgid " dlerror(); /* Clear any existing error */\n"
923 #: build/C/man3/dlopen.3:475
926 " /* Writing: cosine = (double (*)(double)) dlsym(handle, \"cos\");\n"
927 " would seem more natural, but the C99 standard leaves\n"
928 " casting from \"void *\" to a function pointer undefined.\n"
929 " The assignment used below is the POSIX.1-2003 (Technical\n"
930 " Corrigendum 1) workaround; see the Rationale for the\n"
931 " POSIX specification of dlsym(). */\n"
934 #. But in fact "gcc -O2 -Wall" will complain about the preceding cast.
936 #: build/C/man3/dlopen.3:478
938 msgid " *(void **) (&cosine) = dlsym(handle, \"cos\");\n"
942 #: build/C/man3/dlopen.3:483
945 " if ((error = dlerror()) != NULL) {\n"
946 " fprintf(stderr, \"%s\\en\", error);\n"
947 " exit(EXIT_FAILURE);\n"
952 #: build/C/man3/dlopen.3:488
955 " printf(\"%f\\en\", (*cosine)(2.0));\n"
956 " dlclose(handle);\n"
957 " exit(EXIT_SUCCESS);\n"
962 #: build/C/man3/dlopen.3:492
964 "If this program were in a file named \"foo.c\", you would build the program "
965 "with the following command:"
969 #: build/C/man3/dlopen.3:495
971 msgid " gcc -rdynamic -o foo foo.c -ldl\n"
975 #: build/C/man3/dlopen.3:503
977 "Libraries exporting B<_init>() and B<_fini>() will want to be compiled as "
978 "follows, using I<bar.c> as the example name:"
982 #: build/C/man3/dlopen.3:506
984 msgid " gcc -shared -nostartfiles -o bar bar.c\n"
988 #: build/C/man3/dlopen.3:515
990 "B<ld>(1), B<ldd>(1), B<dl_iterate_phdr>(3), B<rtld-audit>(7), B<ld.so>(8), "
991 "B<ldconfig>(8), ld.so info pages, gcc info pages, ld info pages"
995 #: build/C/man5/elf.5:33
1001 #: build/C/man5/elf.5:33
1007 #: build/C/man5/elf.5:36
1008 msgid "elf - format of Executable and Linking Format (ELF) files"
1011 #. .B #include <elf_abi.h>
1013 #: build/C/man5/elf.5:40
1015 msgid "B<#include E<lt>elf.hE<gt>>\n"
1019 #: build/C/man5/elf.5:48
1021 "The header file I<E<lt>elf.hE<gt>> defines the format of ELF executable "
1022 "binary files. Amongst these files are normal executable files, relocatable "
1023 "object files, core files and shared libraries."
1027 #: build/C/man5/elf.5:57
1029 "An executable file using the ELF file format consists of an ELF header, "
1030 "followed by a program header table or a section header table, or both. The "
1031 "ELF header is always at offset zero of the file. The program header table "
1032 "and the section header table's offset in the file are defined in the ELF "
1033 "header. The two tables describe the rest of the particularities of the "
1037 #. Applications which wish to process ELF binary files for their native
1038 #. architecture only should include
1040 #. in their source code.
1041 #. These applications should need to refer to
1042 #. all the types and structures by their generic names
1044 #. and to the macros by
1046 #. Applications written this way can be compiled on any architecture,
1047 #. regardless of whether the host is 32-bit or 64-bit.
1049 #. Should an application need to process ELF files of an unknown
1050 #. architecture, then the application needs to explicitly use either
1054 #. type and structure names.
1055 #. Likewise, the macros need to be identified by
1061 #: build/C/man5/elf.5:84
1063 "This header file describes the above mentioned headers as C structures and "
1064 "also includes structures for dynamic sections, relocation sections and "
1069 #: build/C/man5/elf.5:96
1071 "The following types are used for N-bit architectures (N=32,64, I<ElfN> "
1072 "stands for I<Elf32> or I<Elf64>, I<uintN_t> stands for I<uint32_t> or "
1076 #. Elf32_Size Unsigned object size
1078 #: build/C/man5/elf.5:110
1081 "ElfN_Addr Unsigned program address, uintN_t\n"
1082 "ElfN_Off Unsigned file offset, uintN_t\n"
1083 "ElfN_Section Unsigned section index, uint16_t\n"
1084 "ElfN_Versym Unsigned version symbol information, uint16_t\n"
1085 "Elf_Byte unsigned char\n"
1086 "ElfN_Half uint16_t\n"
1087 "ElfN_Sword int32_t\n"
1088 "ElfN_Word uint32_t\n"
1089 "ElfN_Sxword int64_t\n"
1090 "ElfN_Xword uint64_t\n"
1094 #: build/C/man5/elf.5:125
1096 "(Note: The *BSD terminology is a bit different. There I<Elf64_Half> is "
1097 "twice as large as I<Elf32_Half>, and I<Elf64Quarter> is used for "
1098 "I<uint16_t>. In order to avoid confusion these types are replaced by "
1099 "explicit ones in the below.)"
1103 #: build/C/man5/elf.5:132
1105 "All data structures that the file format defines follow the \"natural\" size "
1106 "and alignment guidelines for the relevant class. If necessary, data "
1107 "structures contain explicit padding to ensure 4-byte alignment for 4-byte "
1108 "objects, to force structure sizes to a multiple of 4, etc."
1112 #: build/C/man5/elf.5:137
1113 msgid "The ELF header is described by the type I<Elf32_Ehdr> or I<Elf64_Ehdr>:"
1117 #: build/C/man5/elf.5:141
1119 msgid "#define EI_NIDENT 16\n"
1123 #: build/C/man5/elf.5:158
1126 "typedef struct {\n"
1127 " unsigned char e_ident[EI_NIDENT];\n"
1128 " uint16_t e_type;\n"
1129 " uint16_t e_machine;\n"
1130 " uint32_t e_version;\n"
1131 " ElfN_Addr e_entry;\n"
1132 " ElfN_Off e_phoff;\n"
1133 " ElfN_Off e_shoff;\n"
1134 " uint32_t e_flags;\n"
1135 " uint16_t e_ehsize;\n"
1136 " uint16_t e_phentsize;\n"
1137 " uint16_t e_phnum;\n"
1138 " uint16_t e_shentsize;\n"
1139 " uint16_t e_shnum;\n"
1140 " uint16_t e_shstrndx;\n"
1144 #. .Bl -tag -width "e_phentsize"
1146 #: build/C/man5/elf.5:163
1147 msgid "The fields have the following meanings:"
1151 #: build/C/man5/elf.5:163
1157 #: build/C/man5/elf.5:173
1159 "This array of bytes specifies to interpret the file, independent of the "
1160 "processor or the file's remaining contents. Within this array everything is "
1161 "named by macros, which start with the prefix B<EI_> and may contain values "
1162 "which start with the prefix B<ELF>. The following macros are defined:"
1166 #: build/C/man5/elf.5:175
1172 #: build/C/man5/elf.5:181
1174 "The first byte of the magic number. It must be filled with B<ELFMAG0>. (0: "
1179 #: build/C/man5/elf.5:181
1185 #: build/C/man5/elf.5:187
1187 "The second byte of the magic number. It must be filled with B<ELFMAG1>. "
1192 #: build/C/man5/elf.5:187
1198 #: build/C/man5/elf.5:193
1200 "The third byte of the magic number. It must be filled with B<ELFMAG2>. (2: "
1205 #: build/C/man5/elf.5:193
1211 #: build/C/man5/elf.5:199
1213 "The fourth byte of the magic number. It must be filled with B<ELFMAG3>. "
1218 #: build/C/man5/elf.5:199
1224 #: build/C/man5/elf.5:202
1225 msgid "The fifth byte identifies the architecture for this binary:"
1229 #: build/C/man5/elf.5:204
1231 msgid "B<ELFCLASSNONE>"
1235 #: build/C/man5/elf.5:208
1236 msgid "This class is invalid."
1240 #: build/C/man5/elf.5:208
1242 msgid "B<ELFCLASS32>"
1246 #: build/C/man5/elf.5:213
1248 "This defines the 32-bit architecture. It supports machines with files and "
1249 "virtual address spaces up to 4 Gigabytes."
1253 #: build/C/man5/elf.5:213
1255 msgid "B<ELFCLASS64>"
1259 #: build/C/man5/elf.5:216
1260 msgid "This defines the 64-bit architecture."
1264 #: build/C/man5/elf.5:219
1269 #. .Bl -tag -width "ELFDATA2LSB" -compact
1271 #: build/C/man5/elf.5:225
1273 "The sixth byte specifies the data encoding of the processor-specific data in "
1274 "the file. Currently these encodings are supported:"
1278 #: build/C/man5/elf.5:226
1280 msgid "B<ELFDATANONE>"
1284 #: build/C/man5/elf.5:230
1285 msgid "Unknown data format."
1289 #: build/C/man5/elf.5:230
1291 msgid "B<ELFDATA2LSB>"
1295 #: build/C/man5/elf.5:233
1296 msgid "Two's complement, little-endian."
1300 #: build/C/man5/elf.5:233
1302 msgid "B<ELFDATA2MSB>"
1306 #: build/C/man5/elf.5:236
1307 msgid "Two's complement, big-endian."
1311 #: build/C/man5/elf.5:239
1313 msgid "B<EI_VERSION>"
1316 #. .Bl -tag -width "EV_CURRENT" -compact
1318 #: build/C/man5/elf.5:244
1319 msgid "The version number of the ELF specification:"
1323 #: build/C/man5/elf.5:245 build/C/man5/elf.5:498
1329 #: build/C/man5/elf.5:248 build/C/man5/elf.5:502
1330 msgid "Invalid version."
1334 #: build/C/man5/elf.5:248 build/C/man5/elf.5:502
1336 msgid "B<EV_CURRENT>"
1341 #: build/C/man5/elf.5:251 build/C/man5/elf.5:506
1342 msgid "Current version."
1346 #: build/C/man5/elf.5:254
1351 #. .Bl -tag -width "ELFOSABI_STANDALONE" -compact
1353 #: build/C/man5/elf.5:263
1355 "This byte identifies the operating system and ABI to which the object is "
1356 "targeted. Some fields in other ELF structures have flags and values that "
1357 "have platform-specific meanings; the interpretation of those fields is "
1358 "determined by the value of this byte. E.g.:"
1362 #: build/C/man5/elf.5:264
1364 msgid "B<ELFOSABI_NONE>"
1369 #: build/C/man5/elf.5:269
1370 msgid "Same as ELFOSABI_SYSV"
1374 #: build/C/man5/elf.5:269
1376 msgid "B<ELFOSABI_SYSV>"
1380 #. synonym: ELFOSABI_NONE
1382 #: build/C/man5/elf.5:274
1383 msgid "UNIX System V ABI."
1387 #: build/C/man5/elf.5:274
1389 msgid "B<ELFOSABI_HPUX>"
1394 #: build/C/man5/elf.5:278
1399 #: build/C/man5/elf.5:278
1401 msgid "B<ELFOSABI_NETBSD>"
1406 #: build/C/man5/elf.5:282
1411 #: build/C/man5/elf.5:282
1413 msgid "B<ELFOSABI_LINUX>"
1418 #. .BR ELFOSABI_HURD
1422 #. .BR ELFOSABI_86OPEN
1423 #. 86Open Common IA32 ABI.
1426 #: build/C/man5/elf.5:294
1431 #: build/C/man5/elf.5:294
1433 msgid "B<ELFOSABI_SOLARIS>"
1438 #. .BR ELFOSABI_MONTEREY
1439 #. Monterey project ABI. Now replaced by
1443 #: build/C/man5/elf.5:303
1444 msgid "Solaris ABI."
1448 #: build/C/man5/elf.5:303
1450 msgid "B<ELFOSABI_IRIX>"
1455 #: build/C/man5/elf.5:307
1460 #: build/C/man5/elf.5:307
1462 msgid "B<ELFOSABI_FREEBSD>"
1467 #: build/C/man5/elf.5:311
1468 msgid "FreeBSD ABI."
1472 #: build/C/man5/elf.5:311
1474 msgid "B<ELFOSABI_TRU64>"
1483 #: build/C/man5/elf.5:319
1484 msgid "TRU64 UNIX ABI."
1488 #: build/C/man5/elf.5:319
1490 msgid "B<ELFOSABI_ARM>"
1495 #: build/C/man5/elf.5:323
1496 msgid "ARM architecture ABI."
1500 #: build/C/man5/elf.5:323
1502 msgid "B<ELFOSABI_STANDALONE>"
1508 #: build/C/man5/elf.5:328
1509 msgid "Stand-alone (embedded) ABI."
1513 #: build/C/man5/elf.5:330
1515 msgid "B<EI_ABIVERSION>"
1519 #: build/C/man5/elf.5:340
1521 "This byte identifies the version of the ABI to which the object is "
1522 "targeted. This field is used to distinguish among incompatible versions of "
1523 "an ABI. The interpretation of this version number is dependent on the ABI "
1524 "identified by the B<EI_OSABI> field. Applications conforming to this "
1525 "specification use the value 0."
1529 #: build/C/man5/elf.5:340
1534 #. As reported by Yuri Kozlov and confirmed by Mike Frysinger, EI_BRAND is
1535 #. not in GABI (http://www.sco.com/developers/gabi/latest/ch4.eheader.html)
1536 #. It looks to be a BSDism
1539 #. Start of architecture identification.
1541 #: build/C/man5/elf.5:356
1543 "Start of padding. These bytes are reserved and set to zero. Programs which "
1544 "read them should ignore them. The value for B<EI_PAD> will change in the "
1545 "future if currently unused bytes are given meanings."
1549 #: build/C/man5/elf.5:356
1551 msgid "B<EI_NIDENT>"
1556 #: build/C/man5/elf.5:362
1557 msgid "The size of the I<e_ident> array."
1561 #: build/C/man5/elf.5:363
1567 #: build/C/man5/elf.5:366
1568 msgid "This member of the structure identifies the object file type:"
1572 #: build/C/man5/elf.5:368
1578 #: build/C/man5/elf.5:372
1579 msgid "An unknown type."
1583 #: build/C/man5/elf.5:372
1589 #: build/C/man5/elf.5:375
1590 msgid "A relocatable file."
1594 #: build/C/man5/elf.5:375
1600 #: build/C/man5/elf.5:378
1601 msgid "An executable file."
1605 #: build/C/man5/elf.5:378
1611 #: build/C/man5/elf.5:381
1612 msgid "A shared object."
1616 #: build/C/man5/elf.5:381
1622 #: build/C/man5/elf.5:384
1623 msgid "A core file."
1627 #: build/C/man5/elf.5:387
1629 msgid "I<e_machine>"
1633 #: build/C/man5/elf.5:391
1635 "This member specifies the required architecture for an individual file. "
1640 #: build/C/man5/elf.5:393
1647 #: build/C/man5/elf.5:398
1648 msgid "An unknown machine."
1652 #: build/C/man5/elf.5:398
1659 #: build/C/man5/elf.5:402
1660 msgid "AT&T WE 32100."
1664 #: build/C/man5/elf.5:402
1671 #: build/C/man5/elf.5:406
1672 msgid "Sun Microsystems SPARC."
1676 #: build/C/man5/elf.5:406
1683 #: build/C/man5/elf.5:410
1684 msgid "Intel 80386."
1688 #: build/C/man5/elf.5:410
1695 #: build/C/man5/elf.5:414
1696 msgid "Motorola 68000."
1700 #: build/C/man5/elf.5:414
1711 #: build/C/man5/elf.5:422
1712 msgid "Motorola 88000."
1716 #: build/C/man5/elf.5:422
1723 #: build/C/man5/elf.5:426
1724 msgid "Intel 80860."
1728 #: build/C/man5/elf.5:426
1737 #. .BR EM_MIPS_RS4_BE
1738 #. MIPS RS4000 (big-endian only). Deprecated.
1740 #. EM_MIPS_RS3_LE (MIPS R3000 little-endian)
1743 #: build/C/man5/elf.5:438
1744 msgid "MIPS RS3000 (big-endian only)."
1748 #: build/C/man5/elf.5:438
1750 msgid "B<EM_PARISC>"
1755 #: build/C/man5/elf.5:442
1760 #: build/C/man5/elf.5:442
1762 msgid "B<EM_SPARC32PLUS>"
1767 #: build/C/man5/elf.5:446
1768 msgid "SPARC with enhanced instruction set."
1772 #: build/C/man5/elf.5:446
1779 #: build/C/man5/elf.5:450
1784 #: build/C/man5/elf.5:450
1791 #: build/C/man5/elf.5:454
1792 msgid "PowerPC 64-bit."
1796 #: build/C/man5/elf.5:454
1803 #: build/C/man5/elf.5:458
1808 #: build/C/man5/elf.5:458
1815 #: build/C/man5/elf.5:462
1816 msgid "Advanced RISC Machines"
1820 #: build/C/man5/elf.5:462
1827 #: build/C/man5/elf.5:466
1828 msgid "Renesas SuperH"
1832 #: build/C/man5/elf.5:466
1834 msgid "B<EM_SPARCV9>"
1839 #: build/C/man5/elf.5:470
1840 msgid "SPARC v9 64-bit."
1844 #: build/C/man5/elf.5:470
1851 #: build/C/man5/elf.5:474
1852 msgid "Intel Itanium"
1856 #: build/C/man5/elf.5:474
1858 msgid "B<EM_X86_64>"
1863 #: build/C/man5/elf.5:478
1868 #: build/C/man5/elf.5:478
1878 #. Compaq [DEC] Alpha.
1881 #. Compaq [DEC] Alpha with enhanced instruction set.
1883 #: build/C/man5/elf.5:490
1888 #: build/C/man5/elf.5:493
1890 msgid "I<e_version>"
1893 #. .Bl -tag -width "EV_CURRENT" -compact
1895 #: build/C/man5/elf.5:497
1896 msgid "This member identifies the file version:"
1900 #: build/C/man5/elf.5:508
1906 #: build/C/man5/elf.5:514
1908 "This member gives the virtual address to which the system first transfers "
1909 "control, thus starting the process. If the file has no associated entry "
1910 "point, this member holds zero."
1914 #: build/C/man5/elf.5:514
1920 #: build/C/man5/elf.5:519
1922 "This member holds the program header table's file offset in bytes. If the "
1923 "file has no program header table, this member holds zero."
1927 #: build/C/man5/elf.5:519
1933 #: build/C/man5/elf.5:524
1935 "This member holds the section header table's file offset in bytes. If the "
1936 "file has no section header table this member holds zero."
1940 #: build/C/man5/elf.5:524
1946 #: build/C/man5/elf.5:529
1948 "This member holds processor-specific flags associated with the file. Flag "
1949 "names take the form EF_`machine_flag'. Currently no flags have been "
1954 #: build/C/man5/elf.5:529
1960 #: build/C/man5/elf.5:532
1961 msgid "This member holds the ELF header's size in bytes."
1965 #: build/C/man5/elf.5:532
1967 msgid "I<e_phentsize>"
1971 #: build/C/man5/elf.5:536
1973 "This member holds the size in bytes of one entry in the file's program "
1974 "header table; all entries are the same size."
1978 #: build/C/man5/elf.5:536
1984 #: build/C/man5/elf.5:549
1986 "This member holds the number of entries in the program header table. Thus "
1987 "the product of I<e_phentsize> and I<e_phnum> gives the table's size in "
1988 "bytes. If a file has no program header, I<e_phnum> holds the value zero."
1991 #. This is a Linux extension, added in Linux 2.6.34.
1992 #. .Bl -tag -width "PN_XNUM"
1994 #: build/C/man5/elf.5:563
1996 "If the number of entries in the program header table is larger than or equal "
1997 "to B<PN_XNUM> (0xffff), this member holds B<PN_XNUM> (0xffff) and the real "
1998 "number of entries in the program header table is held in the I<sh_info> "
1999 "member of the initial entry in section header table. Otherwise, the "
2000 "I<sh_info> member of the initial entry contains the value zero."
2004 #: build/C/man5/elf.5:564
2010 #: build/C/man5/elf.5:569
2012 "This is defined as 0xffff, the largest number I<e_phnum> can have, "
2013 "specifying where the actual number of program headers is assigned."
2017 #: build/C/man5/elf.5:573
2019 msgid "I<e_shentsize>"
2023 #: build/C/man5/elf.5:578
2025 "This member holds a sections header's size in bytes. A section header is "
2026 "one entry in the section header table; all entries are the same size."
2030 #: build/C/man5/elf.5:578
2036 #: build/C/man5/elf.5:591
2038 "This member holds the number of entries in the section header table. Thus "
2039 "the product of I<e_shentsize> and I<e_shnum> gives the section header "
2040 "table's size in bytes. If a file has no section header table, I<e_shnum> "
2041 "holds the value of zero."
2045 #: build/C/man5/elf.5:603
2047 "If the number of entries in the section header table is larger than or equal "
2048 "to B<SHN_LORESERVE> (0xff00), I<e_shnum> holds the value zero and the real "
2049 "number of entries in the section header table is held in the I<sh_size> "
2050 "member of the initial entry in section header table. Otherwise, the "
2051 "I<sh_size> member of the initial entry in the section header table holds the "
2056 #: build/C/man5/elf.5:603
2058 msgid "I<e_shstrndx>"
2062 #: build/C/man5/elf.5:610
2064 "This member holds the section header table index of the entry associated "
2065 "with the section name string table. If the file has no section name string "
2066 "table, this member holds the value B<SHN_UNDEF>."
2070 #: build/C/man5/elf.5:621
2072 "If the index of section name string table section is larger than or equal to "
2073 "B<SHN_LORESERVE> (0xff00), this member holds B<SHN_XINDEX> (0xffff) and the "
2074 "real index of the section name string table section is held in the "
2075 "I<sh_link> member of the initial entry in section header table. Otherwise, "
2076 "the I<sh_link> member of the initial entry in section header table contains "
2081 #: build/C/man5/elf.5:623 build/C/man5/elf.5:909
2083 msgid "B<SHN_UNDEF>"
2087 #: build/C/man5/elf.5:632
2089 "This value marks an undefined, missing, irrelevant, or otherwise meaningless "
2090 "section reference. For example, a symbol \"defined\" relative to section "
2091 "number B<SHN_UNDEF> is an undefined symbol."
2095 #: build/C/man5/elf.5:632 build/C/man5/elf.5:913
2097 msgid "B<SHN_LORESERVE>"
2101 #: build/C/man5/elf.5:635 build/C/man5/elf.5:916
2102 msgid "This value specifies the lower bound of the range of reserved indices."
2106 #: build/C/man5/elf.5:635 build/C/man5/elf.5:916
2108 msgid "B<SHN_LOPROC>"
2112 #: build/C/man5/elf.5:640 build/C/man5/elf.5:921
2114 "Values greater than or equal to B<SHN_HIPROC> are reserved for "
2115 "processor-specific semantics."
2119 #: build/C/man5/elf.5:640 build/C/man5/elf.5:921
2121 msgid "B<SHN_HIPROC>"
2125 #: build/C/man5/elf.5:645 build/C/man5/elf.5:926
2127 "Values less than or equal to B<SHN_LOPROC> are reserved for "
2128 "processor-specific semantics."
2132 #: build/C/man5/elf.5:645 build/C/man5/elf.5:926
2138 #: build/C/man5/elf.5:652
2140 "This value specifies absolute values for the corresponding reference. For "
2141 "example, symbols defined relative to section number B<SHN_ABS> have absolute "
2142 "values and are not affected by relocation."
2146 #: build/C/man5/elf.5:652 build/C/man5/elf.5:933
2148 msgid "B<SHN_COMMON>"
2152 #: build/C/man5/elf.5:656
2154 "Symbols defined relative to this section are common symbols, such as Fortran "
2155 "COMMON or unallocated C external variables."
2159 #: build/C/man5/elf.5:656 build/C/man5/elf.5:937
2161 msgid "B<SHN_HIRESERVE>"
2165 #: build/C/man5/elf.5:669
2167 "This value specifies the upper bound of the range of reserved indices "
2168 "between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, inclusive; the values do not "
2169 "reference the section header table. That is, the section header table does "
2170 "I<not> contain entries for the reserved indices."
2174 #: build/C/man5/elf.5:691
2176 "An executable or shared object file's program header table is an array of "
2177 "structures, each describing a segment or other information the system needs "
2178 "to prepare the program for execution. An object file I<segment> contains "
2179 "one or more I<sections>. Program headers are meaningful only for executable "
2180 "and shared object files. A file specifies its own program header size with "
2181 "the ELF header's I<e_phentsize> and I<e_phnum> members. The ELF program "
2182 "header is described by the type I<Elf32_Phdr> or I<Elf64_Phdr> depending on "
2187 #: build/C/man5/elf.5:704
2190 "typedef struct {\n"
2191 " uint32_t p_type;\n"
2192 " Elf32_Off p_offset;\n"
2193 " Elf32_Addr p_vaddr;\n"
2194 " Elf32_Addr p_paddr;\n"
2195 " uint32_t p_filesz;\n"
2196 " uint32_t p_memsz;\n"
2197 " uint32_t p_flags;\n"
2198 " uint32_t p_align;\n"
2203 #: build/C/man5/elf.5:719
2206 "typedef struct {\n"
2207 " uint32_t p_type;\n"
2208 " uint32_t p_flags;\n"
2209 " Elf64_Off p_offset;\n"
2210 " Elf64_Addr p_vaddr;\n"
2211 " Elf64_Addr p_paddr;\n"
2212 " uint64_t p_filesz;\n"
2213 " uint64_t p_memsz;\n"
2214 " uint64_t p_align;\n"
2218 #. .Bl -tag -width "p_offset"
2220 #: build/C/man5/elf.5:727
2222 "The main difference between the 32-bit and the 64-bit program header lies in "
2223 "the location of the I<p_flags> member in the total struct."
2227 #: build/C/man5/elf.5:727
2232 #. .Bl -tag -width "PT_DYNAMIC"
2234 #: build/C/man5/elf.5:732
2236 "This member of the Phdr struct tells what kind of segment this array element "
2237 "describes or how to interpret the array element's information."
2241 #: build/C/man5/elf.5:733
2247 #: build/C/man5/elf.5:737
2249 "The array element is unused and the other members' values are undefined. "
2250 "This lets the program header have ignored entries."
2254 #: build/C/man5/elf.5:737
2260 #: build/C/man5/elf.5:758
2262 "The array element specifies a loadable segment, described by I<p_filesz> and "
2263 "I<p_memsz>. The bytes from the file are mapped to the beginning of the "
2264 "memory segment. If the segment's memory size I<p_memsz> is larger than the "
2265 "file size I<p_filesz>, the \"extra\" bytes are defined to hold the value 0 "
2266 "and to follow the segment's initialized area. The file size may not be "
2267 "larger than the memory size. Loadable segment entries in the program header "
2268 "table appear in ascending order, sorted on the I<p_vaddr> member."
2272 #: build/C/man5/elf.5:758
2274 msgid "B<PT_DYNAMIC>"
2278 #: build/C/man5/elf.5:761
2279 msgid "The array element specifies dynamic linking information."
2283 #: build/C/man5/elf.5:761
2285 msgid "B<PT_INTERP>"
2289 #: build/C/man5/elf.5:769
2291 "The array element specifies the location and size of a null-terminated "
2292 "pathname to invoke as an interpreter. This segment type is meaningful only "
2293 "for executable files (though it may occur for shared objects). However it "
2294 "may not occur more than once in a file. If it is present, it must precede "
2295 "any loadable segment entry."
2299 #: build/C/man5/elf.5:769
2305 #: build/C/man5/elf.5:772
2306 msgid "The array element specifies the location and size for auxiliary information."
2310 #: build/C/man5/elf.5:772
2316 #: build/C/man5/elf.5:777
2318 "This segment type is reserved but has unspecified semantics. Programs that "
2319 "contain an array element of this type do not conform to the ABI."
2323 #: build/C/man5/elf.5:777
2329 #: build/C/man5/elf.5:786
2331 "The array element, if present, specifies the location and size of the "
2332 "program header table itself, both in the file and in the memory image of the "
2333 "program. This segment type may not occur more than once in a file. "
2334 "Moreover, it may only occur if the program header table is part of the "
2335 "memory image of the program. If it is present, it must precede any loadable "
2340 #: build/C/man5/elf.5:786
2342 msgid "B<PT_LOPROC>"
2346 #: build/C/man5/elf.5:791
2348 "Values greater than or equal to B<PT_HIPROC> are reserved for "
2349 "processor-specific semantics."
2353 #: build/C/man5/elf.5:791
2355 msgid "B<PT_HIPROC>"
2360 #: build/C/man5/elf.5:802
2362 "Values less than or equal to B<PT_LOPROC> are reserved for "
2363 "processor-specific semantics. B<PT_GNU_STACK> GNU extension which is used "
2364 "by the Linux kernel to control the state of the stack via the flags set in "
2365 "the I<p_flags> member."
2369 #: build/C/man5/elf.5:803
2375 #: build/C/man5/elf.5:807
2377 "This member holds the offset from the beginning of the file at which the "
2378 "first byte of the segment resides."
2382 #: build/C/man5/elf.5:807
2388 #: build/C/man5/elf.5:811
2390 "This member holds the virtual address at which the first byte of the segment "
2391 "resides in memory."
2395 #: build/C/man5/elf.5:811
2401 #: build/C/man5/elf.5:819
2403 "On systems for which physical addressing is relevant, this member is "
2404 "reserved for the segment's physical address. Under BSD this member is not "
2405 "used and must be zero."
2409 #: build/C/man5/elf.5:819
2415 #: build/C/man5/elf.5:823
2417 "This member holds the number of bytes in the file image of the segment. It "
2422 #: build/C/man5/elf.5:823
2428 #: build/C/man5/elf.5:827
2430 "This member holds the number of bytes in the memory image of the segment. "
2435 #: build/C/man5/elf.5:827
2440 #. .Bl -tag -width "PF_X" -compact
2442 #: build/C/man5/elf.5:831
2443 msgid "This member holds a bitmask of flags relevant to the segment:"
2447 #: build/C/man5/elf.5:832
2453 #: build/C/man5/elf.5:836
2454 msgid "An executable segment."
2458 #: build/C/man5/elf.5:836
2464 #: build/C/man5/elf.5:839
2465 msgid "A writable segment."
2469 #: build/C/man5/elf.5:839
2475 #: build/C/man5/elf.5:842
2476 msgid "A readable segment."
2480 #: build/C/man5/elf.5:855
2482 "A text segment commonly has the flags B<PF_X> and B<PF_R>. A data segment "
2483 "commonly has B<PF_X>, B<PF_W> and B<PF_R>."
2487 #: build/C/man5/elf.5:855
2494 #: build/C/man5/elf.5:874
2496 "This member holds the value to which the segments are aligned in memory and "
2497 "in the file. Loadable process segments must have congruent values for "
2498 "I<p_vaddr> and I<p_offset>, modulo the page size. Values of zero and one "
2499 "mean no alignment is required. Otherwise, I<p_align> should be a positive, "
2500 "integral power of two, and I<p_vaddr> should equal I<p_offset>, modulo "
2505 #: build/C/man5/elf.5:891
2507 "A file's section header table lets one locate all the file's sections. The "
2508 "section header table is an array of I<Elf32_Shdr> or I<Elf64_Shdr> "
2509 "structures. The ELF header's I<e_shoff> member gives the byte offset from "
2510 "the beginning of the file to the section header table. I<e_shnum> holds the "
2511 "number of entries the section header table contains. I<e_shentsize> holds "
2512 "the size in bytes of each entry."
2515 #. .Bl -tag -width "SHN_LORESERVE"
2517 #: build/C/man5/elf.5:908
2519 "A section header table index is a subscript into this array. Some section "
2520 "header table indices are reserved: the initial entry and the indices between "
2521 "B<SHN_LORESERVE> and B<SHN_HIRESERVE>. The initial entry is used in ELF "
2522 "extensions for I<e_phnum>, I<e_shnum> and I<e_strndx>; in other cases, each "
2523 "field in the initial entry is set to zero. An object file does not have "
2524 "sections for these special indices:"
2528 #: build/C/man5/elf.5:913
2530 "This value marks an undefined, missing, irrelevant or otherwise meaningless "
2531 "section reference."
2535 #: build/C/man5/elf.5:933
2537 "This value specifies the absolute value for the corresponding reference. "
2538 "For example, a symbol defined relative to section number B<SHN_ABS> has an "
2539 "absolute value and is not affected by relocation."
2543 #: build/C/man5/elf.5:937
2545 "Symbols defined relative to this section are common symbols, such as FORTRAN "
2546 "COMMON or unallocated C external variables."
2550 #: build/C/man5/elf.5:948
2552 "This value specifies the upper bound of the range of reserved indices. The "
2553 "system reserves indices between B<SHN_LORESERVE> and B<SHN_HIRESERVE>, "
2554 "inclusive. The section header table does not contain entries for the "
2559 #: build/C/man5/elf.5:952
2560 msgid "The section header has the following structure:"
2564 #: build/C/man5/elf.5:967
2567 "typedef struct {\n"
2568 " uint32_t sh_name;\n"
2569 " uint32_t sh_type;\n"
2570 " uint32_t sh_flags;\n"
2571 " Elf32_Addr sh_addr;\n"
2572 " Elf32_Off sh_offset;\n"
2573 " uint32_t sh_size;\n"
2574 " uint32_t sh_link;\n"
2575 " uint32_t sh_info;\n"
2576 " uint32_t sh_addralign;\n"
2577 " uint32_t sh_entsize;\n"
2582 #: build/C/man5/elf.5:984
2585 "typedef struct {\n"
2586 " uint32_t sh_name;\n"
2587 " uint32_t sh_type;\n"
2588 " uint64_t sh_flags;\n"
2589 " Elf64_Addr sh_addr;\n"
2590 " Elf64_Off sh_offset;\n"
2591 " uint64_t sh_size;\n"
2592 " uint32_t sh_link;\n"
2593 " uint32_t sh_info;\n"
2594 " uint64_t sh_addralign;\n"
2595 " uint64_t sh_entsize;\n"
2599 #. .Bl -tag -width "sh_addralign"
2601 #: build/C/man5/elf.5:989
2602 msgid "No real differences exist between the 32-bit and 64-bit section headers."
2606 #: build/C/man5/elf.5:989
2612 #: build/C/man5/elf.5:995
2614 "This member specifies the name of the section. Its value is an index into "
2615 "the section header string table section, giving the location of a "
2616 "null-terminated string."
2620 #: build/C/man5/elf.5:995
2625 #. .Bl -tag -width "SHT_PROGBITS"
2627 #: build/C/man5/elf.5:999
2628 msgid "This member categorizes the section's contents and semantics."
2632 #: build/C/man5/elf.5:1000
2638 #: build/C/man5/elf.5:1007
2640 "This value marks the section header as inactive. It does not have an "
2641 "associated section. Other members of the section header have undefined "
2646 #: build/C/man5/elf.5:1007
2648 msgid "B<SHT_PROGBITS>"
2652 #: build/C/man5/elf.5:1011
2654 "This section holds information defined by the program, whose format and "
2655 "meaning are determined solely by the program."
2659 #: build/C/man5/elf.5:1011
2661 msgid "B<SHT_SYMTAB>"
2665 #: build/C/man5/elf.5:1024
2667 "This section holds a symbol table. Typically, B<SHT_SYMTAB> provides "
2668 "symbols for link editing, though it may also be used for dynamic linking. "
2669 "As a complete symbol table, it may contain many symbols unnecessary for "
2670 "dynamic linking. An object file can also contain a B<SHT_DYNSYM> section."
2674 #: build/C/man5/elf.5:1024
2676 msgid "B<SHT_STRTAB>"
2680 #: build/C/man5/elf.5:1029
2682 "This section holds a string table. An object file may have multiple string "
2687 #: build/C/man5/elf.5:1029
2693 #: build/C/man5/elf.5:1037
2695 "This section holds relocation entries with explicit addends, such as type "
2696 "I<Elf32_Rela> for the 32-bit class of object files. An object may have "
2697 "multiple relocation sections."
2701 #: build/C/man5/elf.5:1037
2707 #: build/C/man5/elf.5:1044
2709 "This section holds a symbol hash table. An object participating in dynamic "
2710 "linking must contain a symbol hash table. An object file may have only one "
2715 #: build/C/man5/elf.5:1044
2717 msgid "B<SHT_DYNAMIC>"
2721 #: build/C/man5/elf.5:1049
2723 "This section holds information for dynamic linking. An object file may have "
2724 "only one dynamic section."
2728 #: build/C/man5/elf.5:1049
2734 #: build/C/man5/elf.5:1052
2735 msgid "This section holds information that marks the file in some way."
2739 #: build/C/man5/elf.5:1052
2741 msgid "B<SHT_NOBITS>"
2745 #: build/C/man5/elf.5:1060
2747 "A section of this type occupies no space in the file but otherwise resembles "
2748 "B<SHT_PROGBITS>. Although this section contains no bytes, the I<sh_offset> "
2749 "member contains the conceptual file offset."
2753 #: build/C/man5/elf.5:1060
2759 #: build/C/man5/elf.5:1068
2761 "This section holds relocation offsets without explicit addends, such as type "
2762 "I<Elf32_Rel> for the 32-bit class of object files. An object file may have "
2763 "multiple relocation sections."
2767 #: build/C/man5/elf.5:1068
2769 msgid "B<SHT_SHLIB>"
2773 #: build/C/man5/elf.5:1071
2774 msgid "This section is reserved but has unspecified semantics."
2778 #: build/C/man5/elf.5:1071
2780 msgid "B<SHT_DYNSYM>"
2784 #: build/C/man5/elf.5:1078
2786 "This section holds a minimal set of dynamic linking symbols. An object file "
2787 "can also contain a B<SHT_SYMTAB> section."
2791 #: build/C/man5/elf.5:1078
2793 msgid "B<SHT_LOPROC>"
2797 #: build/C/man5/elf.5:1083
2799 "This value up to and including B<SHT_HIPROC> is reserved for "
2800 "processor-specific semantics."
2804 #: build/C/man5/elf.5:1083
2806 msgid "B<SHT_HIPROC>"
2810 #: build/C/man5/elf.5:1088
2812 "This value down to and including B<SHT_LOPROC> is reserved for "
2813 "processor-specific semantics."
2817 #: build/C/man5/elf.5:1088
2819 msgid "B<SHT_LOUSER>"
2823 #: build/C/man5/elf.5:1092
2825 "This value specifies the lower bound of the range of indices reserved for "
2826 "application programs."
2830 #: build/C/man5/elf.5:1092
2832 msgid "B<SHT_HIUSER>"
2837 #: build/C/man5/elf.5:1103
2839 "This value specifies the upper bound of the range of indices reserved for "
2840 "application programs. Section types between B<SHT_LOUSER> and B<SHT_HIUSER> "
2841 "may be used by the application, without conflicting with current or future "
2842 "system-defined section types."
2846 #: build/C/man5/elf.5:1104
2851 #. .Bl -tag -width "SHF_EXECINSTR" -compact
2853 #: build/C/man5/elf.5:1117
2855 "Sections support one-bit flags that describe miscellaneous attributes. If a "
2856 "flag bit is set in I<sh_flags>, the attribute is \"on\" for the section. "
2857 "Otherwise, the attribute is \"off\" or does not apply. Undefined attributes "
2862 #: build/C/man5/elf.5:1118
2864 msgid "B<SHF_WRITE>"
2868 #: build/C/man5/elf.5:1122
2869 msgid "This section contains data that should be writable during process execution."
2873 #: build/C/man5/elf.5:1122
2875 msgid "B<SHF_ALLOC>"
2879 #: build/C/man5/elf.5:1129
2881 "This section occupies memory during process execution. Some control "
2882 "sections do not reside in the memory image of an object file. This "
2883 "attribute is off for those sections."
2887 #: build/C/man5/elf.5:1129
2889 msgid "B<SHF_EXECINSTR>"
2893 #: build/C/man5/elf.5:1132
2894 msgid "This section contains executable machine instructions."
2898 #: build/C/man5/elf.5:1132
2900 msgid "B<SHF_MASKPROC>"
2904 #: build/C/man5/elf.5:1136
2906 "All bits included in this mask are reserved for processor-specific "
2911 #: build/C/man5/elf.5:1138
2917 #: build/C/man5/elf.5:1143
2919 "If this section appears in the memory image of a process, this member holds "
2920 "the address at which the section's first byte should reside. Otherwise, the "
2921 "member contains zero."
2925 #: build/C/man5/elf.5:1143
2927 msgid "I<sh_offset>"
2931 #: build/C/man5/elf.5:1152
2933 "This member's value holds the byte offset from the beginning of the file to "
2934 "the first byte in the section. One section type, B<SHT_NOBITS>, occupies no "
2935 "space in the file, and its I<sh_offset> member locates the conceptual "
2936 "placement in the file."
2940 #: build/C/man5/elf.5:1152
2946 #: build/C/man5/elf.5:1164
2948 "This member holds the section's size in bytes. Unless the section type is "
2949 "B<SHT_NOBITS>, the section occupies I<sh_size> bytes in the file. A section "
2950 "of type B<SHT_NOBITS> may have a nonzero size, but it occupies no space in "
2955 #: build/C/man5/elf.5:1164
2961 #: build/C/man5/elf.5:1168
2963 "This member holds a section header table index link, whose interpretation "
2964 "depends on the section type."
2968 #: build/C/man5/elf.5:1168
2974 #: build/C/man5/elf.5:1172
2976 "This member holds extra information, whose interpretation depends on the "
2981 #: build/C/man5/elf.5:1172
2983 msgid "I<sh_addralign>"
2987 #: build/C/man5/elf.5:1185
2989 "Some sections have address alignment constraints. If a section holds a "
2990 "doubleword, the system must ensure doubleword alignment for the entire "
2991 "section. That is, the value of I<sh_addr> must be congruent to zero, modulo "
2992 "the value of I<sh_addralign>. Only zero and positive integral powers of two "
2993 "are allowed. Values of zero or one mean the section has no alignment "
2998 #: build/C/man5/elf.5:1185
3000 msgid "I<sh_entsize>"
3005 #: build/C/man5/elf.5:1192
3007 "Some sections hold a table of fixed-sized entries, such as a symbol table. "
3008 "For such a section, this member gives the size in bytes for each entry. "
3009 "This member contains zero if the section does not hold a table of fixed-size "
3013 #. .Bl -tag -width ".shstrtab"
3015 #: build/C/man5/elf.5:1195
3016 msgid "Various sections hold program and control information:"
3020 #: build/C/man5/elf.5:1195
3026 #: build/C/man5/elf.5:1207
3028 "This section holds uninitialized data that contributes to the program's "
3029 "memory image. By definition, the system initializes the data with zeros "
3030 "when the program begins to run. This section is of type B<SHT_NOBITS>. The "
3031 "attribute types are B<SHF_ALLOC> and B<SHF_WRITE>."
3035 #: build/C/man5/elf.5:1207
3041 #: build/C/man5/elf.5:1213
3043 "This section holds version control information. This section is of type "
3044 "B<SHT_PROGBITS>. No attribute types are used."
3048 #: build/C/man5/elf.5:1213
3054 #: build/C/man5/elf.5:1222
3056 "This section holds initialized pointers to the C++ constructor functions. "
3057 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3058 "B<SHF_ALLOC> and B<SHF_WRITE>."
3062 #: build/C/man5/elf.5:1222
3068 #: build/C/man5/elf.5:1232 build/C/man5/elf.5:1242
3070 "This section holds initialized data that contribute to the program's memory "
3071 "image. This section is of type B<SHT_PROGBITS>. The attribute types are "
3072 "B<SHF_ALLOC> and B<SHF_WRITE>."
3076 #: build/C/man5/elf.5:1232
3082 #: build/C/man5/elf.5:1242
3088 #: build/C/man5/elf.5:1250
3090 "This section holds information for symbolic debugging. The contents are "
3091 "unspecified. This section is of type B<SHT_PROGBITS>. No attribute types "
3096 #: build/C/man5/elf.5:1250
3102 #: build/C/man5/elf.5:1259
3104 "This section holds initialized pointers to the C++ destructor functions. "
3105 "This section is of type B<SHT_PROGBITS>. The attribute types are "
3106 "B<SHF_ALLOC> and B<SHF_WRITE>."
3110 #: build/C/man5/elf.5:1259
3116 #: build/C/man5/elf.5:1272
3118 "This section holds dynamic linking information. The section's attributes "
3119 "will include the B<SHF_ALLOC> bit. Whether the B<SHF_WRITE> bit is set is "
3120 "processor-specific. This section is of type B<SHT_DYNAMIC>. See the "
3125 #: build/C/man5/elf.5:1272
3131 #: build/C/man5/elf.5:1280
3133 "This section holds strings needed for dynamic linking, most commonly the "
3134 "strings that represent the names associated with symbol table entries. This "
3135 "section is of type B<SHT_STRTAB>. The attribute type used is B<SHF_ALLOC>."
3139 #: build/C/man5/elf.5:1280
3145 #: build/C/man5/elf.5:1287
3147 "This section holds the dynamic linking symbol table. This section is of "
3148 "type B<SHT_DYNSYM>. The attribute used is B<SHF_ALLOC>."
3152 #: build/C/man5/elf.5:1287
3158 #: build/C/man5/elf.5:1299
3160 "This section holds executable instructions that contribute to the process "
3161 "termination code. When a program exits normally the system arranges to "
3162 "execute the code in this section. This section is of type B<SHT_PROGBITS>. "
3163 "The attributes used are B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3167 #: build/C/man5/elf.5:1299
3169 msgid "I<.gnu.version>"
3173 #: build/C/man5/elf.5:1308
3175 "This section holds the version symbol table, an array of I<ElfN_Half> "
3176 "elements. This section is of type B<SHT_GNU_versym>. The attribute type "
3177 "used is B<SHF_ALLOC>."
3181 #: build/C/man5/elf.5:1308
3183 msgid "I<.gnu.version_d>"
3187 #: build/C/man5/elf.5:1317
3189 "This section holds the version symbol definitions, a table of I<ElfN_Verdef> "
3190 "structures. This section is of type B<SHT_GNU_verdef>. The attribute type "
3191 "used is B<SHF_ALLOC>."
3195 #: build/C/man5/elf.5:1317
3197 msgid "I<.gnu.version_r>"
3201 #: build/C/man5/elf.5:1327
3203 "This section holds the version symbol needed elements, a table of "
3204 "I<ElfN_Verneed> structures. This section is of type B<SHT_GNU_versym>. The "
3205 "attribute type used is B<SHF_ALLOC>."
3209 #: build/C/man5/elf.5:1327
3215 #: build/C/man5/elf.5:1333
3217 "This section holds the global offset table. This section is of type "
3218 "B<SHT_PROGBITS>. The attributes are processor specific."
3222 #: build/C/man5/elf.5:1333
3228 #: build/C/man5/elf.5:1340
3230 "This section holds a symbol hash table. This section is of type "
3231 "B<SHT_HASH>. The attribute used is B<SHF_ALLOC>."
3235 #: build/C/man5/elf.5:1340
3241 #: build/C/man5/elf.5:1352
3243 "This section holds executable instructions that contribute to the process "
3244 "initialization code. When a program starts to run the system arranges to "
3245 "execute the code in this section before calling the main program entry "
3246 "point. This section is of type B<SHT_PROGBITS>. The attributes used are "
3247 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3251 #: build/C/man5/elf.5:1352
3257 #: build/C/man5/elf.5:1363
3259 "This section holds the pathname of a program interpreter. If the file has a "
3260 "loadable segment that includes the section, the section's attributes will "
3261 "include the B<SHF_ALLOC> bit. Otherwise, that bit will be off. This "
3262 "section is of type B<SHT_PROGBITS>."
3266 #: build/C/man5/elf.5:1363
3272 #: build/C/man5/elf.5:1371
3274 "This section holds line number information for symbolic debugging, which "
3275 "describes the correspondence between the program source and the machine "
3276 "code. The contents are unspecified. This section is of type "
3277 "B<SHT_PROGBITS>. No attribute types are used."
3281 #: build/C/man5/elf.5:1371
3287 #: build/C/man5/elf.5:1384
3289 "This section holds information in the \"Note Section\" format. This section "
3290 "is of type B<SHT_NOTE>. No attribute types are used. OpenBSD native "
3291 "executables usually contain a I<.note.openbsd.ident> section to identify "
3292 "themselves, for the kernel to bypass any compatibility ELF binary emulation "
3293 "tests when loading the file."
3297 #: build/C/man5/elf.5:1384
3299 msgid "I<.note.GNU-stack>"
3303 #: build/C/man5/elf.5:1393
3305 "This section is used in Linux object files for declaring stack attributes. "
3306 "This section is of type B<SHT_PROGBITS>. The only attribute used is "
3307 "B<SHF_EXECINSTR>. This indicates to the GNU linker that the object file "
3308 "requires an executable stack."
3312 #: build/C/man5/elf.5:1393
3318 #: build/C/man5/elf.5:1399
3320 "This section holds the procedure linkage table. This section is of type "
3321 "B<SHT_PROGBITS>. The attributes are processor specific."
3325 #: build/C/man5/elf.5:1399
3331 #: build/C/man5/elf.5:1418
3333 "This section holds relocation information as described below. If the file "
3334 "has a loadable segment that includes relocation, the section's attributes "
3335 "will include the B<SHF_ALLOC> bit. Otherwise the bit will be off. By "
3336 "convention, \"NAME\" is supplied by the section to which the relocations "
3337 "apply. Thus a relocation section for B<.text> normally would have the name "
3338 "B<.rel.text>. This section is of type B<SHT_REL>."
3342 #: build/C/man5/elf.5:1418
3344 msgid "I<.relaNAME>"
3348 #: build/C/man5/elf.5:1437
3350 "This section holds relocation information as described below. If the file "
3351 "has a loadable segment that includes relocation, the section's attributes "
3352 "will include the B<SHF_ALLOC> bit. Otherwise the bit will be off. By "
3353 "convention, \"NAME\" is supplied by the section to which the relocations "
3354 "apply. Thus a relocation section for B<.text> normally would have the name "
3355 "B<.rela.text>. This section is of type B<SHT_RELA>."
3359 #: build/C/man5/elf.5:1437
3365 #: build/C/man5/elf.5:1445 build/C/man5/elf.5:1453
3367 "This section holds read-only data that typically contributes to a "
3368 "nonwritable segment in the process image. This section is of type "
3369 "B<SHT_PROGBITS>. The attribute used is B<SHF_ALLOC>."
3373 #: build/C/man5/elf.5:1445
3379 #: build/C/man5/elf.5:1453
3381 msgid "I<.shstrtab>"
3385 #: build/C/man5/elf.5:1459
3387 "This section holds section names. This section is of type B<SHT_STRTAB>. "
3388 "No attribute types are used."
3392 #: build/C/man5/elf.5:1459
3398 #: build/C/man5/elf.5:1471
3400 "This section holds strings, most commonly the strings that represent the "
3401 "names associated with symbol table entries. If the file has a loadable "
3402 "segment that includes the symbol string table, the section's attributes will "
3403 "include the B<SHF_ALLOC> bit. Otherwise the bit will be off. This section "
3404 "is of type B<SHT_STRTAB>."
3408 #: build/C/man5/elf.5:1471
3414 #: build/C/man5/elf.5:1482
3416 "This section holds a symbol table. If the file has a loadable segment that "
3417 "includes the symbol table, the section's attributes will include the "
3418 "B<SHF_ALLOC> bit. Otherwise the bit will be off. This section is of type "
3423 #: build/C/man5/elf.5:1482
3430 #: build/C/man5/elf.5:1494
3432 "This section holds the \"text\", or executable instructions, of a program. "
3433 "This section is of type B<SHT_PROGBITS>. The attributes used are "
3434 "B<SHF_ALLOC> and B<SHF_EXECINSTR>."
3438 #: build/C/man5/elf.5:1505
3440 "String table sections hold null-terminated character sequences, commonly "
3441 "called strings. The object file uses these strings to represent symbol and "
3442 "section names. One references a string as an index into the string table "
3443 "section. The first byte, which is index zero, is defined to hold a null "
3444 "byte (\\(aq\\e0\\(aq). Similarly, a string table's last byte is defined to "
3445 "hold a null byte, ensuring null termination for all strings."
3449 #: build/C/man5/elf.5:1510
3451 "An object file's symbol table holds information needed to locate and "
3452 "relocate a program's symbolic definitions and references. A symbol table "
3453 "index is a subscript into this array."
3457 #: build/C/man5/elf.5:1521
3460 "typedef struct {\n"
3461 " uint32_t st_name;\n"
3462 " Elf32_Addr st_value;\n"
3463 " uint32_t st_size;\n"
3464 " unsigned char st_info;\n"
3465 " unsigned char st_other;\n"
3466 " uint16_t st_shndx;\n"
3471 #: build/C/man5/elf.5:1534
3474 "typedef struct {\n"
3475 " uint32_t st_name;\n"
3476 " unsigned char st_info;\n"
3477 " unsigned char st_other;\n"
3478 " uint16_t st_shndx;\n"
3479 " Elf64_Addr st_value;\n"
3480 " uint64_t st_size;\n"
3484 #. .Bl -tag -width "st_value"
3486 #: build/C/man5/elf.5:1540
3488 "The 32-bit and 64-bit versions have the same members, just in a different "
3493 #: build/C/man5/elf.5:1540
3499 #: build/C/man5/elf.5:1548
3501 "This member holds an index into the object file's symbol string table, which "
3502 "holds character representations of the symbol names. If the value is "
3503 "nonzero, it represents a string table index that gives the symbol name. "
3504 "Otherwise, the symbol table has no name."
3508 #: build/C/man5/elf.5:1548
3514 #: build/C/man5/elf.5:1551
3515 msgid "This member gives the value of the associated symbol."
3519 #: build/C/man5/elf.5:1551
3525 #: build/C/man5/elf.5:1556
3527 "Many symbols have associated sizes. This member holds zero if the symbol "
3528 "has no size or an unknown size."
3532 #: build/C/man5/elf.5:1556
3537 #. .Bl -tag -width "STT_SECTION"
3539 #: build/C/man5/elf.5:1560
3540 msgid "This member specifies the symbol's type and binding attributes:"
3544 #: build/C/man5/elf.5:1561
3546 msgid "B<STT_NOTYPE>"
3550 #: build/C/man5/elf.5:1564
3551 msgid "The symbol's type is not defined."
3555 #: build/C/man5/elf.5:1564
3557 msgid "B<STT_OBJECT>"
3561 #: build/C/man5/elf.5:1567
3562 msgid "The symbol is associated with a data object."
3566 #: build/C/man5/elf.5:1567
3572 #: build/C/man5/elf.5:1570
3573 msgid "The symbol is associated with a function or other executable code."
3577 #: build/C/man5/elf.5:1570
3579 msgid "B<STT_SECTION>"
3583 #: build/C/man5/elf.5:1577
3585 "The symbol is associated with a section. Symbol table entries of this type "
3586 "exist primarily for relocation and normally have B<STB_LOCAL> bindings."
3590 #: build/C/man5/elf.5:1577
3596 #: build/C/man5/elf.5:1588
3598 "By convention, the symbol's name gives the name of the source file "
3599 "associated with the object file. A file symbol has B<STB_LOCAL> bindings, "
3600 "its section index is B<SHN_ABS>, and it precedes the other B<STB_LOCAL> "
3601 "symbols of the file, if it is present."
3605 #: build/C/man5/elf.5:1588
3607 msgid "B<STT_LOPROC>"
3611 #: build/C/man5/elf.5:1593
3613 "This value up to and including B<STT_HIPROC> is reserved for "
3614 "processor-specific semantics."
3618 #: build/C/man5/elf.5:1593
3620 msgid "B<STT_HIPROC>"
3624 #. .Bl -tag -width "STB_GLOBAL"
3626 #: build/C/man5/elf.5:1600
3628 "This value down to and including B<STT_LOPROC> is reserved for "
3629 "processor-specific semantics."
3633 #: build/C/man5/elf.5:1600
3635 msgid "B<STB_LOCAL>"
3639 #: build/C/man5/elf.5:1606
3641 "Local symbols are not visible outside the object file containing their "
3642 "definition. Local symbols of the same name may exist in multiple files "
3643 "without interfering with each other."
3647 #: build/C/man5/elf.5:1606
3649 msgid "B<STB_GLOBAL>"
3653 #: build/C/man5/elf.5:1612
3655 "Global symbols are visible to all object files being combined. One file's "
3656 "definition of a global symbol will satisfy another file's undefined "
3657 "reference to the same symbol."
3661 #: build/C/man5/elf.5:1612
3667 #: build/C/man5/elf.5:1616
3669 "Weak symbols resemble global symbols, but their definitions have lower "
3674 #: build/C/man5/elf.5:1616
3676 msgid "B<STB_LOPROC>"
3680 #: build/C/man5/elf.5:1621
3682 "This value up to and including B<STB_HIPROC> is reserved for "
3683 "processor-specific semantics."
3687 #: build/C/man5/elf.5:1621
3689 msgid "B<STB_HIPROC>"
3693 #: build/C/man5/elf.5:1626
3695 "This value down to and including B<STB_LOPROC> is reserved for "
3696 "processor-specific semantics."
3700 #: build/C/man5/elf.5:1628
3701 msgid "There are macros for packing and unpacking the binding and type fields:"
3705 #: build/C/man5/elf.5:1635
3707 "B<ELF32_ST_BIND>(info) or B<ELF64_ST_BIND>(info) extract a binding from an "
3712 #: build/C/man5/elf.5:1639
3713 msgid "B<ELF32_ST_TYPE>(info) or B<ELF64_ST_TYPE>(info)"
3717 #: build/C/man5/elf.5:1643
3718 msgid "extract a type from an I<st_info> value."
3722 #: build/C/man5/elf.5:1647
3723 msgid "B<ELF32_ST_INFO>(bind, type) or B<ELF64_ST_INFO>(bind, type)"
3727 #: build/C/man5/elf.5:1651
3728 msgid "convert a binding and a type into an I<st_info> value."
3732 #: build/C/man5/elf.5:1653
3737 #. .Bl -tag -width "STV_PROTECTED"
3739 #: build/C/man5/elf.5:1657
3740 msgid "This member defines the symbol visibility."
3744 #: build/C/man5/elf.5:1658
3746 msgid "B<STV_DEFAULT>"
3750 #: build/C/man5/elf.5:1662
3751 msgid "Default symbol visibility rules."
3755 #: build/C/man5/elf.5:1662
3757 msgid "B<STV_INTERNAL>"
3761 #: build/C/man5/elf.5:1665
3762 msgid "Processor-specific hidden class."
3766 #: build/C/man5/elf.5:1665
3768 msgid "B<STV_HIDDEN>"
3772 #: build/C/man5/elf.5:1668
3773 msgid "Symbol is unavailable in other modules."
3777 #: build/C/man5/elf.5:1668
3779 msgid "B<STV_PROTECTED>"
3783 #: build/C/man5/elf.5:1671
3784 msgid "Not preemptible, not exported."
3788 #: build/C/man5/elf.5:1674
3789 msgid "There are macros for extracting the visibility type:"
3793 #: build/C/man5/elf.5:1678
3794 msgid "B<ELF32_ST_VISIBILITY>(other) or B<ELF64_ST_VISIBILITY>(other)"
3798 #: build/C/man5/elf.5:1680
3805 #: build/C/man5/elf.5:1688
3807 "Every symbol table entry is \"defined\" in relation to some section. This "
3808 "member holds the relevant section header table index."
3812 #: build/C/man5/elf.5:1696
3814 "Relocation is the process of connecting symbolic references with symbolic "
3815 "definitions. Relocatable files must have information that describes how to "
3816 "modify their section contents, thus allowing executable and shared object "
3817 "files to hold the right information for a process's program image. "
3818 "Relocation entries are these data."
3822 #: build/C/man5/elf.5:1698
3823 msgid "Relocation structures that do not need an addend:"
3827 #: build/C/man5/elf.5:1705
3830 "typedef struct {\n"
3831 " Elf32_Addr r_offset;\n"
3832 " uint32_t r_info;\n"
3837 #: build/C/man5/elf.5:1714
3840 "typedef struct {\n"
3841 " Elf64_Addr r_offset;\n"
3842 " uint64_t r_info;\n"
3847 #: build/C/man5/elf.5:1718
3848 msgid "Relocation structures that need an addend:"
3852 #: build/C/man5/elf.5:1726
3855 "typedef struct {\n"
3856 " Elf32_Addr r_offset;\n"
3857 " uint32_t r_info;\n"
3858 " int32_t r_addend;\n"
3863 #: build/C/man5/elf.5:1736
3866 "typedef struct {\n"
3867 " Elf64_Addr r_offset;\n"
3868 " uint64_t r_info;\n"
3869 " int64_t r_addend;\n"
3874 #: build/C/man5/elf.5:1739
3880 #: build/C/man5/elf.5:1747
3882 "This member gives the location at which to apply the relocation action. For "
3883 "a relocatable file, the value is the byte offset from the beginning of the "
3884 "section to the storage unit affected by the relocation. For an executable "
3885 "file or shared object, the value is the virtual address of the storage unit "
3886 "affected by the relocation."
3890 #: build/C/man5/elf.5:1747
3896 #: build/C/man5/elf.5:1762
3898 "This member gives both the symbol table index with respect to which the "
3899 "relocation must be made and the type of relocation to apply. Relocation "
3900 "types are processor specific. When the text refers to a relocation entry's "
3901 "relocation type or symbol table index, it means the result of applying "
3902 "B<ELF_[32|64]_R_TYPE> or B<ELF[32|64]_R_SYM>, respectively, to the entry's "
3907 #: build/C/man5/elf.5:1762
3914 #: build/C/man5/elf.5:1767
3916 "This member specifies a constant addend used to compute the value to be "
3917 "stored into the relocatable field."
3921 #: build/C/man5/elf.5:1772
3923 "The .dynamic section contains a series of structures that hold relevant "
3924 "dynamic linking information. The d_tag member controls the interpretation "
3929 #: build/C/man5/elf.5:1783
3932 "typedef struct {\n"
3933 " Elf32_Sword d_tag;\n"
3935 " Elf32_Word d_val;\n"
3936 " Elf32_Addr d_ptr;\n"
3939 "extern Elf32_Dyn _DYNAMIC[];\n"
3943 #: build/C/man5/elf.5:1796
3946 "typedef struct {\n"
3947 " Elf64_Sxword d_tag;\n"
3949 " Elf64_Xword d_val;\n"
3950 " Elf64_Addr d_ptr;\n"
3953 "extern Elf64_Dyn _DYNAMIC[];\n"
3957 #: build/C/man5/elf.5:1799
3962 #. .Bl -tag -width "DT_SYMBOLIC"
3964 #: build/C/man5/elf.5:1803
3965 msgid "This member may have any of the following values:"
3969 #: build/C/man5/elf.5:1804
3975 #: build/C/man5/elf.5:1807
3976 msgid "Marks end of dynamic section"
3980 #: build/C/man5/elf.5:1807
3982 msgid "B<DT_NEEDED>"
3986 #: build/C/man5/elf.5:1810
3987 msgid "String table offset to name of a needed library"
3991 #: build/C/man5/elf.5:1810
3993 msgid "B<DT_PLTRELSZ>"
3997 #: build/C/man5/elf.5:1813
3998 msgid "Size in bytes of PLT relocs"
4002 #: build/C/man5/elf.5:1813
4004 msgid "B<DT_PLTGOT>"
4008 #: build/C/man5/elf.5:1816
4009 msgid "Address of PLT and/or GOT"
4013 #: build/C/man5/elf.5:1816
4019 #: build/C/man5/elf.5:1819
4020 msgid "Address of symbol hash table"
4024 #: build/C/man5/elf.5:1819
4026 msgid "B<DT_STRTAB>"
4030 #: build/C/man5/elf.5:1822
4031 msgid "Address of string table"
4035 #: build/C/man5/elf.5:1822
4037 msgid "B<DT_SYMTAB>"
4041 #: build/C/man5/elf.5:1825
4042 msgid "Address of symbol table"
4046 #: build/C/man5/elf.5:1825
4052 #: build/C/man5/elf.5:1828
4053 msgid "Address of Rela relocs table"
4057 #: build/C/man5/elf.5:1828
4059 msgid "B<DT_RELASZ>"
4063 #: build/C/man5/elf.5:1831
4064 msgid "Size in bytes of Rela table"
4068 #: build/C/man5/elf.5:1831
4070 msgid "B<DT_RELAENT>"
4074 #: build/C/man5/elf.5:1834
4075 msgid "Size in bytes of a Rela table entry"
4079 #: build/C/man5/elf.5:1834
4085 #: build/C/man5/elf.5:1837
4086 msgid "Size in bytes of string table"
4090 #: build/C/man5/elf.5:1837
4092 msgid "B<DT_SYMENT>"
4096 #: build/C/man5/elf.5:1840
4097 msgid "Size in bytes of a symbol table entry"
4101 #: build/C/man5/elf.5:1840
4107 #: build/C/man5/elf.5:1843
4108 msgid "Address of the initialization function"
4112 #: build/C/man5/elf.5:1843
4118 #: build/C/man5/elf.5:1846
4119 msgid "Address of the termination function"
4123 #: build/C/man5/elf.5:1846
4125 msgid "B<DT_SONAME>"
4129 #: build/C/man5/elf.5:1849
4130 msgid "String table offset to name of shared object"
4134 #: build/C/man5/elf.5:1849
4140 #: build/C/man5/elf.5:1852
4141 msgid "String table offset to library search path (deprecated)"
4145 #: build/C/man5/elf.5:1852
4147 msgid "B<DT_SYMBOLIC>"
4151 #: build/C/man5/elf.5:1855
4152 msgid "Alert linker to search this shared object before the executable for symbols"
4156 #: build/C/man5/elf.5:1855
4162 #: build/C/man5/elf.5:1858
4163 msgid "Address of Rel relocs table"
4167 #: build/C/man5/elf.5:1858
4173 #: build/C/man5/elf.5:1861
4174 msgid "Size in bytes of Rel table"
4178 #: build/C/man5/elf.5:1861
4180 msgid "B<DT_RELENT>"
4184 #: build/C/man5/elf.5:1864
4185 msgid "Size in bytes of a Rel table entry"
4189 #: build/C/man5/elf.5:1864
4191 msgid "B<DT_PLTREL>"
4195 #: build/C/man5/elf.5:1867
4196 msgid "Type of reloc the PLT refers (Rela or Rel)"
4200 #: build/C/man5/elf.5:1867
4206 #: build/C/man5/elf.5:1870
4207 msgid "Undefined use for debugging"
4211 #: build/C/man5/elf.5:1870
4213 msgid "B<DT_TEXTREL>"
4217 #: build/C/man5/elf.5:1873
4218 msgid "Absence of this indicates no relocs should apply to a nonwritable segment"
4222 #: build/C/man5/elf.5:1873
4224 msgid "B<DT_JMPREL>"
4228 #: build/C/man5/elf.5:1876
4229 msgid "Address of reloc entries solely for the PLT"
4233 #: build/C/man5/elf.5:1876
4235 msgid "B<DT_BIND_NOW>"
4239 #: build/C/man5/elf.5:1880
4241 "Instruct dynamic linker to process all relocs before transferring control to "
4246 #: build/C/man5/elf.5:1880
4248 msgid "B<DT_RUNPATH>"
4252 #: build/C/man5/elf.5:1883
4253 msgid "String table offset to library search path"
4257 #: build/C/man5/elf.5:1883
4259 msgid "B<DT_LOPROC>"
4263 #: build/C/man5/elf.5:1886
4264 msgid "Start of processor-specific semantics"
4268 #: build/C/man5/elf.5:1886
4270 msgid "B<DT_HIPROC>"
4274 #: build/C/man5/elf.5:1889
4275 msgid "End of processor-specific semantics"
4279 #: build/C/man5/elf.5:1891
4285 #: build/C/man5/elf.5:1894
4286 msgid "This member represents integer values with various interpretations."
4290 #: build/C/man5/elf.5:1894
4296 #: build/C/man5/elf.5:1902
4298 "This member represents program virtual addresses. When interpreting these "
4299 "addresses, the actual address should be computed based on the original file "
4300 "value and memory base address. Files do not contain relocation entries to "
4301 "fixup these addresses."
4305 #: build/C/man5/elf.5:1902
4312 #: build/C/man5/elf.5:1907
4314 "Array containing all the dynamic structures in the .dynamic section. This "
4315 "is automatically populated by the linker."
4319 #. ELF support first appeared in
4321 #. although not all supported platforms use it as the native
4322 #. binary file format.
4324 #: build/C/man5/elf.5:1916
4325 msgid "ELF first appeared in System V. The ELF format is an adopted standard."
4329 #. The original version of this manual page was written by
4330 #. .An Jeroen Ruigrok van der Werven
4331 #. .Aq asmodai@FreeBSD.org
4332 #. with inspiration from BSDi's
4337 #: build/C/man5/elf.5:1934
4339 "The extensions for I<e_phnum>, I<e_shnum> and I<e_strndx> respectively are "
4340 "Linux extensions. Sun, BSD and AMD64 also support them; for further "
4341 "information, look under SEE ALSO."
4345 #: build/C/man5/elf.5:1941
4346 msgid "B<as>(1), B<gdb>(1), B<ld>(1), B<objdump>(1), B<execve>(2), B<core>(5)"
4350 #: build/C/man5/elf.5:1944
4351 msgid "Hewlett-Packard, I<Elf-64 Object File Format>."
4355 #: build/C/man5/elf.5:1947
4356 msgid "Santa Cruz Operation, I<System V Application Binary Interface>."
4360 #: build/C/man5/elf.5:1951
4362 "UNIX System Laboratories, \"Object Files\", I<Executable and Linking Format "
4367 #: build/C/man5/elf.5:1954
4368 msgid "Sun Microsystems, I<Linker and Libraries Guide>."
4372 #: build/C/man5/elf.5:1957
4374 "AMD64 ABI Draft, I<System V Application Binary Interface AMD64 Architecture "
4375 "Processor Supplement>."
4379 #: build/C/man3/end.3:25
4385 #: build/C/man3/end.3:25
4391 #: build/C/man3/end.3:28
4392 msgid "etext, edata, end - end of program segments"
4396 #: build/C/man3/end.3:33
4399 "B<extern>I< etext>B<;>\n"
4400 "B<extern>I< edata>B<;>\n"
4401 "B<extern>I< end>B<;>\n"
4405 #: build/C/man3/end.3:37
4406 msgid "The addresses of these symbols indicate the end of various program segments:"
4410 #: build/C/man3/end.3:37
4416 #: build/C/man3/end.3:41
4418 "This is the first address past the end of the text segment (the program "
4423 #: build/C/man3/end.3:41
4429 #: build/C/man3/end.3:45
4430 msgid "This is the first address past the end of the initialized data segment."
4434 #: build/C/man3/end.3:45
4440 #: build/C/man3/end.3:49
4442 "This is the first address past the end of the uninitialized data segment "
4443 "(also known as the BSS segment)."
4447 #: build/C/man3/end.3:52
4449 "Although these symbols have long been provided on most UNIX systems, they "
4450 "are not standardized; use with caution."
4454 #: build/C/man3/end.3:55
4456 "The program must explicitly declare these symbols; they are not defined in "
4461 #: build/C/man3/end.3:63
4463 "On some systems the names of these symbols are preceded by underscores, "
4464 "thus: I<_etext>, I<_edata>, and I<_end>. These symbols are also defined for "
4465 "programs compiled on Linux."
4469 #: build/C/man3/end.3:75
4471 "At the start of program execution, the program break will be somewhere near "
4472 "I<&end> (perhaps at the start of the following page). However, the break "
4473 "will change as memory is allocated via B<brk>(2) or B<malloc>(3). Use "
4474 "B<sbrk>(2) with an argument of zero to find the current value of the "
4479 #: build/C/man3/end.3:77
4480 msgid "When run, the program below produces output such as the following:"
4484 #: build/C/man3/end.3:85
4488 "First address past:\n"
4489 " program text (etext) 0x8048568\n"
4490 " initialized data (edata) 0x804a01c\n"
4491 " uninitialized data (end) 0x804a024\n"
4495 #: build/C/man3/end.3:87
4497 msgid "Program source"
4501 #: build/C/man3/end.3:92
4504 "#include E<lt>stdio.hE<gt>\n"
4505 "#include E<lt>stdlib.hE<gt>\n"
4509 #: build/C/man3/end.3:95
4512 "extern char etext, edata, end; /* The symbols must have some type,\n"
4513 " or \"gcc -Wall\" complains */\n"
4517 #: build/C/man3/end.3:103
4521 "main(int argc, char *argv[])\n"
4523 " printf(\"First address past:\\en\");\n"
4524 " printf(\" program text (etext) %10p\\en\", &etext);\n"
4525 " printf(\" initialized data (edata) %10p\\en\", &edata);\n"
4526 " printf(\" uninitialized data (end) %10p\\en\", &end);\n"
4530 #: build/C/man3/end.3:112
4531 msgid "B<objdump>(1), B<readelf>(1), B<sbrk>(2), B<elf>(5)"
4535 #: build/C/man8/ld.so.8:2
4541 #: build/C/man8/ld.so.8:2
4547 #: build/C/man8/ld.so.8:5
4548 msgid "ld.so, ld-linux.so* - dynamic linker/loader"
4552 #: build/C/man8/ld.so.8:12
4554 "The dynamic linker can be run either indirectly by running some dynamically "
4555 "linked program or library (in which case no command-line options to the "
4556 "dynamic linker can be passed and, in the ELF case, the dynamic linker which "
4557 "is stored in the B<.interp> section of the program is executed) or directly "
4562 #: build/C/man8/ld.so.8:15
4563 msgid "I</lib/ld-linux.so.*> [OPTIONS] [PROGRAM [ARGUMENTS]]"
4567 #: build/C/man8/ld.so.8:22
4569 "The programs B<ld.so> and B<ld-linux.so*> find and load the shared libraries "
4570 "needed by a program, prepare the program to run, and then run it."
4574 #: build/C/man8/ld.so.8:29
4576 "Linux binaries require dynamic linking (linking at run time) unless the "
4577 "B<-static> option was given to B<ld>(1) during compilation."
4581 #: build/C/man8/ld.so.8:42
4583 "The program B<ld.so> handles a.out binaries, a format used long ago; "
4584 "B<ld-linux.so*> handles ELF (I</lib/ld-linux.so.1> for libc5, "
4585 "I</lib/ld-linux.so.2> for glibc2), which everybody has been using for years "
4586 "now. Otherwise both have the same behavior, and use the same support files "
4587 "and programs B<ldd>(1), B<ldconfig>(8) and I</etc/ld.so.conf>."
4591 #: build/C/man8/ld.so.8:45
4593 "The shared libraries needed by the program are searched for in the following "
4598 #: build/C/man8/ld.so.8:50
4600 "(ELF only) Using the directories specified in the DT_RPATH dynamic section "
4601 "attribute of the binary if present and DT_RUNPATH attribute does not exist. "
4602 "Use of DT_RPATH is deprecated."
4606 #: build/C/man8/ld.so.8:55
4608 "Using the environment variable B<LD_LIBRARY_PATH>. Except if the executable "
4609 "is a set-user-ID/set-group-ID binary, in which case it is ignored."
4613 #: build/C/man8/ld.so.8:59
4615 "(ELF only) Using the directories specified in the DT_RUNPATH dynamic section "
4616 "attribute of the binary if present."
4620 #: build/C/man8/ld.so.8:67
4622 "From the cache file I</etc/ld.so.cache> which contains a compiled list of "
4623 "candidate libraries previously found in the augmented library path. If, "
4624 "however, the binary was linked with the B<-z nodeflib> linker option, "
4625 "libraries in the default library paths are skipped."
4629 #: build/C/man8/ld.so.8:75
4631 "In the default path I</lib>, and then I</usr/lib>. If the binary was linked "
4632 "with the B<-z nodeflib> linker option, this step is skipped."
4636 #: build/C/man8/ld.so.8:75
4638 msgid "$ORIGIN and rpath"
4641 #. ld.so also understands $LIB, with the same meaning as $ORIGIN/lib,
4644 #. There is also $PLATFORM. This is a kind of wildcard
4645 #. of directories related at AT_HWCAP. To get an idea of the
4646 #. places that $PLATFORM would match, look at the output of the
4650 #. LD_LIBRARY_PATH=/tmp/d strace -e open /bin/date 2>&1 | grep /tmp/d
4652 #. ld.so lets names be abbreviated, so $O will work for $ORIGIN;
4655 #: build/C/man8/ld.so.8:110
4657 "B<ld.so> understands the string I<$ORIGIN> (or equivalently I<${ORIGIN}>) "
4658 "in an rpath specification (DT_RPATH or DT_RUNPATH) to mean the directory "
4659 "containing the application executable. Thus, an application located in "
4660 "I<somedir/app> could be compiled with I<gcc "
4661 "-Wl,-rpath,\\(aq$ORIGIN/../lib\\(aq> so that it finds an associated shared "
4662 "library in I<somedir/lib> no matter where I<somedir> is located in the "
4663 "directory hierarchy. This facilitates the creation of \"turn-key\" "
4664 "applications that do not need to be installed into special directories, but "
4665 "can instead be unpacked into any directory and still find their own shared "
4670 #: build/C/man8/ld.so.8:110 build/C/man8/ldconfig.8:100 build/C/man1/ldd.1:19
4676 #: build/C/man8/ld.so.8:111
4682 #: build/C/man8/ld.so.8:114
4683 msgid "List all dependencies and how they are resolved."
4687 #: build/C/man8/ld.so.8:114
4693 #: build/C/man8/ld.so.8:118
4695 "Verify that program is dynamically linked and this dynamic linker can handle "
4700 #: build/C/man8/ld.so.8:118
4702 msgid "B<--library-path PATH>"
4706 #: build/C/man8/ld.so.8:123
4707 msgid "Override B<LD_LIBRARY_PATH> environment variable setting (see below)."
4711 #: build/C/man8/ld.so.8:123
4713 msgid "B<--inhibit-rpath LIST>"
4717 #: build/C/man8/ld.so.8:129
4719 "Ignore RPATH and RUNPATH information in object names in LIST. This option "
4720 "is ignored if B<ld.so> is set-user-ID or set-group-ID."
4724 #: build/C/man8/ld.so.8:129
4730 #: build/C/man8/ld.so.8:131
4731 msgid "There are four important environment variables."
4735 #: build/C/man8/ld.so.8:131
4737 msgid "B<LD_BIND_NOW>"
4741 #: build/C/man8/ld.so.8:139
4743 "(libc5; glibc since 2.1.1) If set to a nonempty string, causes the dynamic "
4744 "linker to resolve all symbols at program startup instead of deferring "
4745 "function call resolution to the point when they are first referenced. This "
4746 "is useful when using a debugger."
4750 #: build/C/man8/ld.so.8:139
4752 msgid "B<LD_LIBRARY_PATH>"
4756 #: build/C/man8/ld.so.8:146
4758 "A colon-separated list of directories in which to search for ELF libraries "
4759 "at execution-time. Similar to the B<PATH> environment variable."
4763 #: build/C/man8/ld.so.8:146
4765 msgid "B<LD_PRELOAD>"
4769 #: build/C/man8/ld.so.8:154
4771 "A whitespace-separated list of additional, user-specified, ELF shared "
4772 "libraries to be loaded before all others. This can be used to selectively "
4773 "override functions in other shared libraries. For set-user-ID/set-group-ID "
4774 "ELF binaries, only libraries in the standard search directories that are "
4775 "also set-user-ID will be loaded."
4779 #: build/C/man8/ld.so.8:154
4781 msgid "B<LD_TRACE_LOADED_OBJECTS>"
4785 #: build/C/man8/ld.so.8:161
4787 "(ELF only) If set to a nonempty string, causes the program to list its "
4788 "dynamic library dependencies, as if run by B<ldd>(1), instead of running "
4793 #: build/C/man8/ld.so.8:164
4795 "Then there are lots of more or less obscure variables, many obsolete or only "
4800 #: build/C/man8/ld.so.8:164
4802 msgid "B<LD_AOUT_LIBRARY_PATH>"
4806 #: build/C/man8/ld.so.8:172
4808 "(libc5) Version of B<LD_LIBRARY_PATH> for a.out binaries only. Old "
4809 "versions of ld-linux.so.1 also supported B<LD_ELF_LIBRARY_PATH>."
4813 #: build/C/man8/ld.so.8:172
4815 msgid "B<LD_AOUT_PRELOAD>"
4819 #: build/C/man8/ld.so.8:180
4821 "(libc5) Version of B<LD_PRELOAD> for a.out binaries only. Old versions of "
4822 "ld-linux.so.1 also supported B<LD_ELF_PRELOAD>."
4826 #: build/C/man8/ld.so.8:180
4832 #: build/C/man8/ld.so.8:190
4834 "(glibc since 2.4) A colon-separated list of user-specified, ELF shared "
4835 "objects to be loaded before all others in a separate linker namespace (i.e., "
4836 "one that does not intrude upon the normal symbol bindings that would occur "
4837 "in the process). These libraries can be used to audit the operation of the "
4838 "dynamic linker. B<LD_AUDIT> is ignored for set-user-ID/set-group-ID "
4843 #: build/C/man8/ld.so.8:203
4845 "The dynamic linker will notify the audit libraries at so-called auditing "
4846 "checkpoints\\(emfor example, loading a new library, resolving a symbol, or "
4847 "calling a symbol from another shared object\\(emby calling an appropriate "
4848 "function within the audit library. For details, see B<rtld-audit>(7). The "
4849 "auditing interface is largely compatible with that provided on Solaris, as "
4850 "described in its I<Linker and Libraries Guide>, in the chapter I<Runtime "
4851 "Linker Auditing Interface>."
4855 #: build/C/man8/ld.so.8:203
4857 msgid "B<LD_BIND_NOT>"
4861 #: build/C/man8/ld.so.8:208
4863 "(glibc since 2.1.95) Do not update the GOT (global offset table) and PLT "
4864 "(procedure linkage table) after resolving a symbol."
4868 #: build/C/man8/ld.so.8:208
4874 #: build/C/man8/ld.so.8:221
4876 "(glibc since 2.1) Output verbose debugging information about the dynamic "
4877 "linker. If set to B<all> prints all debugging information it has, if set to "
4878 "B<help> prints a help message about which categories can be specified in "
4879 "this environment variable. Since glibc 2.3.4, B<LD_DEBUG> is ignored for "
4880 "set-user-ID/set-group-ID binaries."
4884 #: build/C/man8/ld.so.8:221
4886 msgid "B<LD_DEBUG_OUTPUT>"
4890 #: build/C/man8/ld.so.8:229
4892 "(glibc since 2.1) File where B<LD_DEBUG> output should be fed into, default "
4893 "is standard output. B<LD_DEBUG_OUTPUT> is ignored for "
4894 "set-user-ID/set-group-ID binaries."
4898 #: build/C/man8/ld.so.8:229
4900 msgid "B<LD_DYNAMIC_WEAK>"
4904 #: build/C/man8/ld.so.8:236
4906 "(glibc since 2.1.91) Allow weak symbols to be overridden (reverting to old "
4907 "glibc behavior). For security reasons, since glibc 2.3.4, "
4908 "B<LD_DYNAMIC_WEAK> is ignored for set-user-ID/set-group-ID binaries."
4912 #: build/C/man8/ld.so.8:236
4914 msgid "B<LD_HWCAP_MASK>"
4918 #: build/C/man8/ld.so.8:240
4919 msgid "(glibc since 2.1) Mask for hardware capabilities."
4923 #: build/C/man8/ld.so.8:240
4925 msgid "B<LD_KEEPDIR>"
4929 #: build/C/man8/ld.so.8:245
4931 "(a.out only)(libc5) Don't ignore the directory in the names of a.out "
4932 "libraries to be loaded. Use of this option is strongly discouraged."
4936 #: build/C/man8/ld.so.8:245
4938 msgid "B<LD_NOWARN>"
4942 #: build/C/man8/ld.so.8:250
4944 "(a.out only)(libc5) Suppress warnings about a.out libraries with "
4945 "incompatible minor version numbers."
4949 #: build/C/man8/ld.so.8:250
4951 msgid "B<LD_ORIGIN_PATH>"
4954 #. Only used if $ORIGIN can't be determined by normal means
4955 #. (from the origin path saved at load time, or from /proc/self/exe)?
4957 #: build/C/man8/ld.so.8:259
4959 "(glibc since 2.1) Path where the binary is found (for non-set-user-ID "
4960 "programs). For security reasons, since glibc 2.4, B<LD_ORIGIN_PATH> is "
4961 "ignored for set-user-ID/set-group-ID binaries."
4965 #: build/C/man8/ld.so.8:259
4967 msgid "B<LD_POINTER_GUARD>"
4971 #: build/C/man8/ld.so.8:271
4973 "(glibc since 2.4) Set to 0 to disable pointer guarding. Any other value "
4974 "enables pointer guarding, which is also the default. Pointer guarding is a "
4975 "security mechanism whereby some pointers to code stored in writable program "
4976 "memory (return addresses saved by B<setjmp>(3) or function pointers used by "
4977 "various glibc internals) are mangled semi-randomly to make it more difficult "
4978 "for an attacker to hijack the pointers for use in the event of a buffer "
4979 "overrun or stack-smashing attack."
4983 #: build/C/man8/ld.so.8:271
4985 msgid "B<LD_PROFILE>"
4989 #: build/C/man8/ld.so.8:278
4991 "(glibc since 2.1) Shared object to be profiled, specified either as a "
4992 "pathname or a soname. Profiling output is written to the file whose name "
4993 "is: \"I<$LD_PROFILE_OUTPUT>/I<$LD_PROFILE>.profile\"."
4997 #: build/C/man8/ld.so.8:278
4999 msgid "B<LD_PROFILE_OUTPUT>"
5003 #: build/C/man8/ld.so.8:291
5005 "(glibc since 2.1) Directory where B<LD_PROFILE> output should be written. "
5006 "If this variable is not defined, or is defined as an empty string, then the "
5007 "default is I</var/tmp>. B<LD_PROFILE_OUTPUT> is ignored for set-user-ID and "
5008 "set-group-ID programs, which always use I</var/profile>."
5012 #: build/C/man8/ld.so.8:291
5014 msgid "B<LD_SHOW_AUXV>"
5018 #. Document LD_TRACE_PRELINKING (e.g.: LD_TRACE_PRELINKING=libx1.so ./prog)
5020 #. Also enables DL_DEBUG_PRELINK
5022 #: build/C/man8/ld.so.8:302
5024 "(glibc since 2.1) Show auxiliary array passed up from the kernel. For "
5025 "security reasons, since glibc 2.3.5, B<LD_SHOW_AUXV> is ignored for "
5026 "set-user-ID/set-group-ID binaries."
5030 #: build/C/man8/ld.so.8:302
5032 msgid "B<LD_USE_LOAD_BIAS>"
5035 #. http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
5036 #. Subject: [PATCH] Support LD_USE_LOAD_BIAS
5039 #: build/C/man8/ld.so.8:321
5041 "By default (i.e., if this variable is not defined) executables and "
5042 "prelinked shared objects will honor base addresses of their dependent "
5043 "libraries and (nonprelinked) position-independent executables (PIEs) and "
5044 "other shared objects will not honor them. If B<LD_USE_LOAD_BIAS> is defined "
5045 "wit the value, both executables and PIEs will honor the base addresses. If "
5046 "B<LD_USE_LOAD_BIAS> is defined with the value 0, neither executables nor "
5047 "PIEs will honor the base addresses. This variable is ignored by set-user-ID "
5048 "and set-group-ID programs."
5052 #: build/C/man8/ld.so.8:321
5054 msgid "B<LD_VERBOSE>"
5058 #: build/C/man8/ld.so.8:333
5060 "(glibc since 2.1) If set to a nonempty string, output symbol versioning "
5061 "information about the program if querying information about the program "
5062 "(i.e., either B<LD_TRACE_LOADED_OBJECTS> has been set, or B<--list> or "
5063 "B<--verify> options have been given to the dynamic linker)."
5067 #: build/C/man8/ld.so.8:333
5073 #: build/C/man8/ld.so.8:337
5075 "(ELF only)(glibc since 2.1.3) If set to a nonempty string, warn about "
5076 "unresolved symbols."
5080 #: build/C/man8/ld.so.8:337
5082 msgid "B<LDD_ARGV0>"
5086 #: build/C/man8/ld.so.8:344
5087 msgid "(libc5) I<argv>[0] to be used by B<ldd>(1) when none is present."
5091 #: build/C/man8/ld.so.8:344 build/C/man8/ldconfig.8:156
5097 #: build/C/man8/ld.so.8:346 build/C/man8/ldconfig.8:158
5099 msgid "I</lib/ld.so>"
5103 #: build/C/man8/ld.so.8:349
5104 msgid "a.out dynamic linker/loader"
5108 #: build/C/man8/ld.so.8:349
5110 msgid "I</lib/ld-linux.so.>{I<1>,I<2>}"
5114 #: build/C/man8/ld.so.8:352
5115 msgid "ELF dynamic linker/loader"
5119 #: build/C/man8/ld.so.8:352 build/C/man8/ldconfig.8:165
5121 msgid "I</etc/ld.so.cache>"
5125 #: build/C/man8/ld.so.8:356
5127 "File containing a compiled list of directories in which to search for "
5128 "libraries and an ordered list of candidate libraries."
5132 #: build/C/man8/ld.so.8:356
5134 msgid "I</etc/ld.so.preload>"
5138 #: build/C/man8/ld.so.8:360
5140 "File containing a whitespace separated list of ELF shared libraries to be "
5141 "loaded before the program."
5145 #: build/C/man8/ld.so.8:360
5151 #: build/C/man8/ld.so.8:363
5152 msgid "shared libraries"
5156 #: build/C/man8/ld.so.8:370
5158 "The B<ld.so> functionality is available for executables compiled using libc "
5159 "version 4.4.3 or greater. ELF functionality is available since Linux 1.1.52 "
5164 #. ld.so: David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
5165 #. Torvalds, Lars Wirzenius and Mitch D'Souza
5166 #. ld-linux.so: Roland McGrath, Ulrich Drepper and others.
5168 #. In the above, (libc5) stands for David Engel's ld.so/ld-linux.so.
5170 #: build/C/man8/ld.so.8:380
5171 msgid "B<ldd>(1), B<rtld-audit>(7), B<ldconfig>(8)"
5175 #: build/C/man8/ldconfig.8:22
5181 #: build/C/man8/ldconfig.8:22
5187 #: build/C/man8/ldconfig.8:25
5188 msgid "/sbin/ldconfig - configure dynamic linker run-time bindings"
5192 #: build/C/man8/ldconfig.8:40
5194 "B</sbin/ldconfig> [ B<-nNvXV> ] [ B<-f\\ conf> ] [ B<-C\\ cache> ] [ B<-r\\ "
5195 "root> ] I<directory>\\ ..."
5199 #: build/C/man8/ldconfig.8:49
5200 msgid "B</sbin/ldconfig> B<-l> [ B<-v> ] I<library>\\ ..."
5204 #: build/C/man8/ldconfig.8:54
5205 msgid "B</sbin/ldconfig> B<-p>"
5209 #: build/C/man8/ldconfig.8:71
5211 "B<ldconfig> creates the necessary links and cache to the most recent shared "
5212 "libraries found in the directories specified on the command line, in the "
5213 "file I</etc/ld.so.conf>, and in the trusted directories (I</lib> and "
5214 "I</usr/lib>). The cache is used by the run-time linker, I<ld.so> or "
5215 "I<ld-linux.so>. B<ldconfig> checks the header and filenames of the "
5216 "libraries it encounters when determining which versions should have their "
5220 #. The following sentence looks suspect
5221 #. (perhaps historical cruft) -- MTK, Jul 2005
5222 #. Therefore, when making dynamic libraries,
5223 #. it is wise to explicitly link against libc (use \-lc).
5225 #: build/C/man8/ldconfig.8:79
5227 "B<ldconfig> will attempt to deduce the type of ELF libs (i.e., libc5 or "
5228 "libc6/glibc) based on what C libs, if any, the library was linked against."
5232 #: build/C/man8/ldconfig.8:100
5234 "Some existing libs do not contain enough information to allow the deduction "
5235 "of their type. Therefore, the I</etc/ld.so.conf> file format allows the "
5236 "specification of an expected type. This is I<only> used for those ELF libs "
5237 "which we can not work out. The format is \"dirname=TYPE\", where TYPE can "
5238 "be libc4, libc5, or libc6. (This syntax also works on the command line.) "
5239 "Spaces are I<not> allowed. Also see the B<-p> option. B<ldconfig> should "
5240 "normally be run by the superuser as it may require write permission on some "
5241 "root owned directories and files."
5245 #: build/C/man8/ldconfig.8:101
5251 #: build/C/man8/ldconfig.8:107
5253 "Verbose mode. Print current version number, the name of each directory as "
5254 "it is scanned, and any links that are created. Overrides quiet mode."
5258 #: build/C/man8/ldconfig.8:107
5264 #: build/C/man8/ldconfig.8:118
5266 "Only process directories specified on the command line. Don't process the "
5267 "trusted directories (I</lib> and I</usr/lib>) nor those specified in "
5268 "I</etc/ld.so.conf>. Implies B<-N>."
5272 #: build/C/man8/ldconfig.8:118
5278 #: build/C/man8/ldconfig.8:124
5280 "Don't rebuild the cache. Unless B<-X> is also specified, links are still "
5285 #: build/C/man8/ldconfig.8:124
5291 #: build/C/man8/ldconfig.8:130
5293 "Don't update links. Unless B<-N> is also specified, the cache is still "
5298 #: build/C/man8/ldconfig.8:130
5304 #: build/C/man8/ldconfig.8:136
5305 msgid "Use B<conf> instead of I</etc/ld.so.conf>."
5309 #: build/C/man8/ldconfig.8:136
5315 #: build/C/man8/ldconfig.8:142
5316 msgid "Use B<cache> instead of I</etc/ld.so.cache>."
5320 #: build/C/man8/ldconfig.8:142
5326 #: build/C/man8/ldconfig.8:147
5327 msgid "Change to and use I<root> as the root directory."
5331 #: build/C/man8/ldconfig.8:147
5337 #: build/C/man8/ldconfig.8:152
5339 "Library mode. Manually link individual libraries. Intended for use by "
5344 #: build/C/man8/ldconfig.8:152
5350 #: build/C/man8/ldconfig.8:156
5352 "Print the lists of directories and candidate libraries stored in the current "
5357 #: build/C/man8/ldconfig.8:161
5358 msgid "run-time linker/loader"
5362 #: build/C/man8/ldconfig.8:161
5364 msgid "I</etc/ld.so.conf>"
5368 #: build/C/man8/ldconfig.8:165
5370 "File containing a list of colon, space, tab, newline, or comma-separated "
5371 "directories in which to search for libraries."
5375 #: build/C/man8/ldconfig.8:174
5377 "File containing an ordered list of libraries found in the directories "
5378 "specified in I</etc/ld.so.conf>, as well as those found in I</lib> and "
5383 #: build/C/man8/ldconfig.8:178
5384 msgid "B<ldd>(1), B<ld.so>(8)"
5388 #: build/C/man1/ldd.1:10
5394 #: build/C/man1/ldd.1:10
5400 #: build/C/man1/ldd.1:13
5401 msgid "ldd - print shared library dependencies"
5405 #: build/C/man1/ldd.1:15
5406 msgid "B<ldd> [OPTION]... FILE..."
5410 #: build/C/man1/ldd.1:19
5412 "B<ldd> prints the shared libraries required by each program or shared "
5413 "library specified on the command line."
5417 #: build/C/man1/ldd.1:20
5419 msgid "B<--version>"
5423 #: build/C/man1/ldd.1:24
5424 msgid "Print the version number of B<ldd>."
5428 #: build/C/man1/ldd.1:24
5430 msgid "B<-v\\ --verbose>"
5434 #: build/C/man1/ldd.1:28
5436 "Print all information, including, for example, symbol versioning "
5441 #: build/C/man1/ldd.1:28
5443 msgid "B<-u\\ --unused>"
5447 #: build/C/man1/ldd.1:32
5448 msgid "Print unused direct dependencies. (Since glibc 2.3.4.)"
5452 #: build/C/man1/ldd.1:32
5454 msgid "B<-d\\ --data-relocs>"
5458 #: build/C/man1/ldd.1:35
5459 msgid "Perform relocations and report any missing objects (ELF only)."
5463 #: build/C/man1/ldd.1:35
5465 msgid "B<-r\\ --function-relocs>"
5469 #: build/C/man1/ldd.1:39
5471 "Perform relocations for both data objects and functions, and report any "
5472 "missing objects or functions (ELF only)."
5476 #: build/C/man1/ldd.1:39
5482 #: build/C/man1/ldd.1:42
5483 msgid "Usage information."
5487 #: build/C/man1/ldd.1:53
5489 "The standard version of B<ldd> comes with glibc2. Libc5 came with an older "
5490 "version, still present on some systems. The long options are not supported "
5491 "by the libc5 version. On the other hand, the glibc2 version does not "
5492 "support B<-V> and only has the equivalent B<--version>."
5496 #: build/C/man1/ldd.1:59
5498 "The libc5 version of this program will use the name of a library given on "
5499 "the command line as-is when it contains a \\(aq/\\(aq; otherwise it searches "
5500 "for the library in the standard locations. To run it on a shared library in "
5501 "the current directory, prefix the name with \"./\"."
5505 #: build/C/man1/ldd.1:62
5506 msgid "B<ldd> does not work on a.out shared libraries."
5511 #. Roland McGrath and Ulrich Drepper.
5513 #: build/C/man1/ldd.1:75
5515 "B<ldd> does not work with some extremely old a.out programs which were built "
5516 "before B<ldd> support was added to the compiler releases. If you use B<ldd> "
5517 "on one of these programs, the program will attempt to run with I<argc> = 0 "
5518 "and the results will be unpredictable."
5522 #: build/C/man1/ldd.1:78
5523 msgid "B<ld.so>(8), B<ldconfig>(8)"
5527 #: build/C/man7/rtld-audit.7:26
5533 #: build/C/man7/rtld-audit.7:26
5539 #: build/C/man7/rtld-audit.7:29
5540 msgid "rtld-audit - auditing API for the dynamic linker"
5544 #: build/C/man7/rtld-audit.7:31
5545 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
5549 #: build/C/man7/rtld-audit.7:33
5550 msgid "B<#include E<lt>link.hE<gt>>"
5554 #: build/C/man7/rtld-audit.7:41
5556 "The GNU dynamic linker (run-time linker) provides an auditing API that "
5557 "allows an application to be notified when various dynamic linking events "
5558 "occur. This API is very similar to the auditing interface provided by the "
5559 "Solaris run-time linker. The necessary constants and prototypes are defined "
5560 "by including I<E<lt>link.hE<gt>>."
5564 #: build/C/man7/rtld-audit.7:48
5566 "To use this interface, the programmer creates a shared library that "
5567 "implements a standard set of function names. Not all of the functions need "
5568 "to be implemented: in most cases, if the programmer is not interested in a "
5569 "particular class of auditing event, then no implementation needs to be "
5570 "provided for the corresponding auditing function."
5574 #: build/C/man7/rtld-audit.7:56
5576 "To employ the auditing interface, the environment variable B<LD_AUDIT> must "
5577 "be defined to contain a colon-separated list of shared libraries, each of "
5578 "which can implement (parts of) the auditing API. When an auditable event "
5579 "occurs, the corresponding function is invoked in each library, in the order "
5580 "that the libraries are listed."
5584 #: build/C/man7/rtld-audit.7:56
5586 msgid "la_version()"
5590 #: build/C/man7/rtld-audit.7:60
5592 msgid "B<unsigned int la_version(unsigned int >I<version>B<);>\n"
5596 #: build/C/man7/rtld-audit.7:72
5598 "This is the only function that I<must> be defined by an auditing library: it "
5599 "performs the initial handshake between the dynamic linker and the auditing "
5600 "library. When invoking this function, the dynamic linker passes, in "
5601 "I<version>, the highest version of the auditing interface that the linker "
5602 "supports. If necessary, the auditing library can check that this version is "
5603 "sufficient for its requirements."
5607 #: build/C/man7/rtld-audit.7:81
5609 "As its function result, this function should return the version of the "
5610 "auditing interface that this auditing library expects to use (returning "
5611 "I<version> is acceptable). If the returned value is 0, or a version that is "
5612 "greater than that supported by the dynamic linker, then the audit library is "
5617 #: build/C/man7/rtld-audit.7:81
5619 msgid "la_objsearch()"
5623 #: build/C/man7/rtld-audit.7:86
5626 "B<char *la_objsearch(const char *>I<name>B<, uintptr_t *>I<cookie>B<,>\n"
5627 "B< unsigned int >I<flag>B<);>\n"
5631 #: build/C/man7/rtld-audit.7:97
5633 "The dynamic linker invokes this function to inform the auditing library that "
5634 "it is about to search for a shared object. The I<name> argument is the "
5635 "filename or pathname that is to be searched for. I<cookie> identifies the "
5636 "shared object that initiated the search. I<flag> is set to one of the "
5641 #: build/C/man7/rtld-audit.7:97
5643 msgid "B<LA_SER_ORIG>"
5647 #: build/C/man7/rtld-audit.7:106
5649 "This is the original name that is being searched for. Typically, this name "
5650 "comes from an ELF B<DT_NEEDED> entry, or is the I<filename> argument given "
5655 #: build/C/man7/rtld-audit.7:106
5657 msgid "B<LA_SER_LIBPATH>"
5661 #: build/C/man7/rtld-audit.7:111
5662 msgid "I<name> was created using a directory specified in B<LD_LIBRARY_PATH>."
5666 #: build/C/man7/rtld-audit.7:111
5668 msgid "B<LA_SER_RUNPATH>"
5672 #: build/C/man7/rtld-audit.7:119
5674 "I<name> was created using a directory specified in an ELF B<DT_RPATH> or "
5675 "B<DT_RUNPATH> list."
5679 #: build/C/man7/rtld-audit.7:119
5681 msgid "B<LA_SER_CONFIG>"
5685 #: build/C/man7/rtld-audit.7:126
5686 msgid "I<name> was found via the B<ldconfig>(8) cache (I</etc/ld.so.cache>)."
5690 #: build/C/man7/rtld-audit.7:126
5692 msgid "B<LA_SER_DEFAULT>"
5696 #: build/C/man7/rtld-audit.7:130
5697 msgid "I<name> was found via a search of one of the default directories."
5701 #: build/C/man7/rtld-audit.7:130
5703 msgid "B<LA_SER_SECURE>"
5707 #: build/C/man7/rtld-audit.7:134
5708 msgid "I<name> is specific to a secure object (unused on Linux)."
5712 #: build/C/man7/rtld-audit.7:143
5714 "As its function result, B<la_objsearch>() returns the pathname that the "
5715 "dynamic linker should use for further processing. If NULL is returned, then "
5716 "this pathname is ignored for further processing. If this audit library "
5717 "simply intends to monitor search paths, then I<name> should be returned."
5721 #: build/C/man7/rtld-audit.7:143
5723 msgid "la_activity()"
5727 #: build/C/man7/rtld-audit.7:147
5729 msgid "B<void la_activity( uintptr_t *>I<cookie>B<, unsigned int >I<flag>B<);>\n"
5733 #: build/C/man7/rtld-audit.7:156
5735 "The dynamic linker calls this function to inform the auditing library that "
5736 "link-map activity is occurring. I<cookie> identifies the object at the head "
5737 "of the link map. When the dynamic linker invokes this function, I<flag> is "
5738 "set to one of the following values:"
5742 #: build/C/man7/rtld-audit.7:156
5744 msgid "B<LA_ACT_ADD>"
5748 #: build/C/man7/rtld-audit.7:159
5749 msgid "New objects are being added to the link map."
5753 #: build/C/man7/rtld-audit.7:159
5755 msgid "B<LA_ACT_DELETE>"
5759 #: build/C/man7/rtld-audit.7:162
5760 msgid "Objects are being removed from the link map."
5764 #: build/C/man7/rtld-audit.7:162
5766 msgid "B<LA_ACT_CONSISTENT>"
5770 #: build/C/man7/rtld-audit.7:165
5771 msgid "Link-map activity has been completed: the map is once again consistent."
5775 #: build/C/man7/rtld-audit.7:165
5777 msgid "la_objopen()"
5781 #: build/C/man7/rtld-audit.7:170
5784 "B<unsigned int la_objopen(struct link_map *>I<map>B<, Lmid_t >I<lmid>B<,>\n"
5785 "B< uintptr_t *>I<cookie>B<);>\n"
5789 #: build/C/man7/rtld-audit.7:179
5791 "The dynamic linker calls this function when a new shared object is loaded. "
5792 "The I<map> argument is a pointer to a link-map structure that describes the "
5793 "object. The I<lmid> field has one of the following values"
5797 #: build/C/man7/rtld-audit.7:179
5799 msgid "B<LM_ID_BASE>"
5803 #: build/C/man7/rtld-audit.7:182
5804 msgid "Link map is part of the initial namespace."
5808 #: build/C/man7/rtld-audit.7:182
5810 msgid "B<LM_ID_NEWLM>"
5814 #: build/C/man7/rtld-audit.7:186
5815 msgid "Link map is part of a new namespace requested via B<dlmopen>(3)."
5819 #: build/C/man7/rtld-audit.7:194
5821 "I<cookie> is a pointer to an identifier for this object. The identifier is "
5822 "provided to later calls to functions in the auditing library in order to "
5823 "identify this object. This identifier is initialized to point to object's "
5824 "link map, but the audit library can change the identifier to some other "
5825 "value that it may prefer to use to identify the object."
5829 #: build/C/man7/rtld-audit.7:201
5831 "As its return value, B<la_objopen>() returns a bit mask created by ORing "
5832 "zero or more of the following constants, which allow the auditing library to "
5833 "select the objects to be monitored by B<la_symbind*>():"
5837 #: build/C/man7/rtld-audit.7:201
5839 msgid "B<LA_FLG_BINDTO>"
5843 #: build/C/man7/rtld-audit.7:204
5844 msgid "Audit symbol bindings to this object."
5848 #: build/C/man7/rtld-audit.7:204
5850 msgid "B<LA_FLG_BINDFROM>"
5854 #: build/C/man7/rtld-audit.7:207
5855 msgid "Audit symbol bindings from this object."
5859 #: build/C/man7/rtld-audit.7:211
5861 "A return value of 0 from B<la_objopen>() indicates that no symbol bindings "
5862 "should be audited for this object."
5866 #: build/C/man7/rtld-audit.7:211
5868 msgid "la_objclose()"
5872 #: build/C/man7/rtld-audit.7:215
5874 msgid "B<unsigned int la_objclose(uintptr_t *>I<cookie);>\n"
5878 #: build/C/man7/rtld-audit.7:224
5880 "The dynamic linker invokes this function after any finalization code for the "
5881 "object has been executed, before the object is unloaded. The I<cookie> "
5882 "argument is the identifier obtained from a previous invocation of "
5887 #: build/C/man7/rtld-audit.7:228
5889 "In the current implementation, the value returned by B<la_objclose>() is "
5894 #: build/C/man7/rtld-audit.7:228
5896 msgid "la_preinit()"
5900 #: build/C/man7/rtld-audit.7:232
5902 msgid "B<void la_preinit(uintptr_t *>I<cookie>B<);>\n"
5906 #: build/C/man7/rtld-audit.7:242
5908 "The dynamic linker invokes this function after all shared objects have been "
5909 "loaded, before control is passed to the application (i.e., before calling "
5910 "I<main>()). Note that I<main>() may still later dynamically load objects "
5911 "using B<dlopen>(3)."
5915 #: build/C/man7/rtld-audit.7:242
5917 msgid "la_symbind*()"
5921 #: build/C/man7/rtld-audit.7:251
5924 "B<uintptr_t la_symbind32(Elf32_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
5925 "B< uintptr_t *>I<refcook>B<, uintptr_t "
5926 "*>I<defcook>B<,>\n"
5927 "B< unsigned int *>I<flags>B<, const char "
5928 "*>I<symname>B<);>\n"
5929 "B<uintptr_t la_symbind64(Elf64_Sym *>I<sym>B<, unsigned int >I<ndx>B<,>\n"
5930 "B< uintptr_t *>I<refcook>B<, uintptr_t "
5931 "*>I<defcook>B<,>\n"
5932 "B< unsigned int *>I<flags>B<, const char "
5933 "*>I<symname>B<);>\n"
5937 #: build/C/man7/rtld-audit.7:263
5939 "The dynamic linker invokes one of these functions when a symbol binding "
5940 "occurs between two shared objects that have been marked for auditing "
5941 "notification by B<la_objopen>(). The B<la_symbind32>() function is "
5942 "employed on 32-bit platforms; the B<la_symbind64>() function is employed on "
5947 #: build/C/man7/rtld-audit.7:273
5949 "The I<sym> argument is a pointer to a structure that provides information "
5950 "about the symbol being bound. The structure definition is shown in "
5951 "I<E<lt>elf.hE<gt>>. Among the fields of this structure, I<st_value> "
5952 "indicates the address to which the symbol is bound."
5956 #: build/C/man7/rtld-audit.7:278
5958 "The I<ndx> argument gives the index of the symbol in the symbol table of the "
5959 "bound shared object."
5963 #: build/C/man7/rtld-audit.7:293
5965 "The I<refcook> argument identifies the shared object that is making the "
5966 "symbol reference; this is the same identifier that is provided to the "
5967 "B<la_objopen>() function that returned B<LA_FLG_BINDFROM>. The I<defcook> "
5968 "argument identifies the shared object that defines the referenced symbol; "
5969 "this is the same identifier that is provided to the B<la_objopen>() "
5970 "function that returned B<LA_FLG_BINDTO>."
5974 #: build/C/man7/rtld-audit.7:297
5975 msgid "The I<symname> argument points a string containing the name of the symbol."
5978 #. LA_SYMB_STRUCTCALL appears to be unused
5980 #: build/C/man7/rtld-audit.7:305
5982 "The I<flags> argument is a bit mask that both provides information about the "
5983 "symbol and can be used to modify further auditing of this PLT (Procedure "
5984 "Linkage Table) entry. The dynamic linker may supply the following bit "
5985 "values in this argument:"
5989 #: build/C/man7/rtld-audit.7:305
5991 msgid "B<LA_SYMB_DLSYM>"
5995 #: build/C/man7/rtld-audit.7:309
5996 msgid "The binding resulted from a call to B<dlsym>(3)."
6000 #: build/C/man7/rtld-audit.7:309
6002 msgid "B<LA_SYMB_ALTVALUE>"
6006 #: build/C/man7/rtld-audit.7:314
6008 "A previous B<la_symbind*>() call returned an alternate value for this "
6012 #. pltenter/pltexit are called for non-dynamically loaded libraries,
6013 #. but don't seem to be called for dynamically loaded libs?
6014 #. Is this the same on Solaris?
6016 #: build/C/man7/rtld-audit.7:328
6018 "By default, if the auditing library implements B<la_pltenter>() and "
6019 "B<la_pltexit>() functions (see below), then these functions are invoked, "
6020 "after B<la_symbind>(), for PLT entries, each time the symbol is referenced. "
6021 "The following flags can be ORed into I<*flags> to change this default "
6026 #: build/C/man7/rtld-audit.7:328
6028 msgid "B<LA_SYMB_NOPLTENTER>"
6032 #: build/C/man7/rtld-audit.7:333
6033 msgid "Don't call B<la_pltenter>() for this symbol."
6037 #: build/C/man7/rtld-audit.7:333
6039 msgid "B<LA_SYMB_NOPLTEXIT>"
6043 #: build/C/man7/rtld-audit.7:338
6044 msgid "Don't call B<la_pltexit>() for this symbol."
6048 #: build/C/man7/rtld-audit.7:349
6050 "The return value of B<la_symbind32>() and B<la_symbind64>() is the address "
6051 "to which control should be passed after the function returns. If the "
6052 "auditing library is simply monitoring symbol bindings, then it should return "
6053 "I<sym-E<gt>st_name>. A different value may be returned if the library "
6054 "wishes to direct control to an alternate location."
6058 #: build/C/man7/rtld-audit.7:349
6060 msgid "la_pltenter()"
6064 #: build/C/man7/rtld-audit.7:355 build/C/man7/rtld-audit.7:415
6066 "The precise name and argument types for this function depend on the hardware "
6067 "platform. (The appropriate definition is supplied by I<E<lt>link.hE<gt>>.) "
6068 "Here is the definition for x86-32:"
6072 #: build/C/man7/rtld-audit.7:361
6075 "B<Elf32_Addr la_i86_gnu_pltenter(Elf32_Sym *>I<sym>B<, unsigned int "
6077 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
6078 "B< La_i86_regs *>I<regs>B<, unsigned int *>I<flags>B<,>\n"
6079 "B< const char *>I<symname>B<, long int "
6080 "*>I<framesizep>B<);>\n"
6084 #: build/C/man7/rtld-audit.7:365
6086 "This function is invoked just before a PLT entry is called, between two "
6087 "shared objects that have been marked for binding notification."
6091 #: build/C/man7/rtld-audit.7:375 build/C/man7/rtld-audit.7:438
6093 "The I<sym>, I<ndx>, I<refcook>, I<defcook>, and I<symname> are as for "
6098 #: build/C/man7/rtld-audit.7:382
6100 "The I<regs> argument points to a structure (defined in I<E<lt>link.hE<gt>>) "
6101 "containing the values of registers to be used for the call to this PLT "
6106 #: build/C/man7/rtld-audit.7:388
6108 "The I<flags> argument points to a bit mask that conveys information about, "
6109 "and can be used to modify subsequent auditing of, this PLT entry, as for "
6113 #. FIXME is the following correct?
6115 #: build/C/man7/rtld-audit.7:404
6117 "The I<framesizep> argument points to a I<long\\ int> buffer that can be used "
6118 "to explicitly set the frame size used for the call to this PLT entry. If "
6119 "different B<la_pltenter>() invocations for this symbol return different "
6120 "values, then the maximum returned value is used. The B<la_pltenter>() "
6121 "function is only called if this buffer is explicitly set to a suitable "
6126 #: build/C/man7/rtld-audit.7:409
6127 msgid "The return value of B<la_pltenter>() is as for B<la_symbind*>()."
6131 #: build/C/man7/rtld-audit.7:409
6133 msgid "la_pltexit()"
6137 #: build/C/man7/rtld-audit.7:421
6140 "B<unsigned int la_i86_gnu_pltexit(Elf32_Sym *>I<sym>B<, unsigned int "
6142 "B< uintptr_t *>I<refcook>B<, uintptr_t *>I<defcook>B<,>\n"
6143 "B< const La_i86_regs *>I<inregs>B<, La_i86_retval "
6144 "*>I<outregs>B<,>\n"
6145 "B< const char *>I<symname>B<);>\n"
6149 #: build/C/man7/rtld-audit.7:428
6151 "This function is called when a PLT entry, made between two shared objects "
6152 "that have been marked for binding notification, returns. The function is "
6153 "called just before control returns to the caller of the PLT entry."
6157 #: build/C/man7/rtld-audit.7:451
6159 "The I<inregs> argument points to a structure (defined in "
6160 "I<E<lt>link.hE<gt>>) containing the values of registers used for the call "
6161 "to this PLT entry. The I<outregs> argument points to a structure (defined "
6162 "in I<E<lt>link.hE<gt>>) containing return values for the call to this PLT "
6163 "entry. These values can be modified by the caller, and the changes will be "
6164 "visible to the caller of the PLT entry."
6167 #. This differs from Solaris, where an audit library that monitors
6168 #. symbol binding should return the value of the 'retval' argument
6169 #. (not provided by GNU, but equivalent to returning outregs->lrv_eax
6170 #. on (say) x86-32).
6172 #: build/C/man7/rtld-audit.7:459
6174 "In the current GNU implementation, the return value of B<la_pltexit>() is "
6179 #: build/C/man7/rtld-audit.7:465
6181 "This API is nonstandard, but very similar to the Solaris API, described in "
6182 "the Solaris I<Linker and Libraries Guide>, in the chapter I<Runtime Linker "
6183 "Auditing Interface>."
6187 #: build/C/man7/rtld-audit.7:468
6188 msgid "Note the following differences from the Solaris dynamic linker auditing API:"
6192 #: build/C/man7/rtld-audit.7:468 build/C/man7/rtld-audit.7:472 build/C/man7/rtld-audit.7:480
6198 #: build/C/man7/rtld-audit.7:472
6200 "The Solaris B<la_objfilter>() interface is not supported by the GNU "
6205 #: build/C/man7/rtld-audit.7:480
6207 "The Solaris B<la_symbind32>() and B<la_pltexit>() functions do not provide "
6208 "a I<symname> argument."
6212 #: build/C/man7/rtld-audit.7:490
6214 "The Solaris B<la_pltexit>() function does not provide I<inregs> and "
6215 "I<outregs> arguments (but does provide a I<retval> argument with the "
6216 "function return value)."
6220 #: build/C/man7/rtld-audit.7:494
6223 "#include E<lt>link.hE<gt>\n"
6224 "#include E<lt>stdio.hE<gt>\n"
6228 #: build/C/man7/rtld-audit.7:499
6232 "la_version(unsigned int version)\n"
6234 " printf(\"la_version(): %d\\en\", version);\n"
6238 #: build/C/man7/rtld-audit.7:502
6241 " return version;\n"
6246 #: build/C/man7/rtld-audit.7:515
6250 "la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)\n"
6252 " printf(\"la_objsearch(): name = %s; cookie = %x\", name, cookie);\n"
6253 " printf(\"; flag = %s\\en\",\n"
6254 " (flag == LA_SER_ORIG) ? \"LA_SER_ORIG\" :\n"
6255 " (flag == LA_SER_LIBPATH) ? \"LA_SER_LIBPATH\" :\n"
6256 " (flag == LA_SER_RUNPATH) ? \"LA_SER_RUNPATH\" :\n"
6257 " (flag == LA_SER_DEFAULT) ? \"LA_SER_DEFAULT\" :\n"
6258 " (flag == LA_SER_CONFIG) ? \"LA_SER_CONFIG\" :\n"
6259 " (flag == LA_SER_SECURE) ? \"LA_SER_SECURE\" :\n"
6264 #: build/C/man7/rtld-audit.7:518
6272 #: build/C/man7/rtld-audit.7:528
6276 "la_activity (uintptr_t *cookie, unsigned int flag)\n"
6278 " printf(\"la_activity(): cookie = %x; flag = %s\\en\", cookie,\n"
6279 " (flag == LA_ACT_CONSISTENT) ? \"LA_ACT_CONSISTENT\" :\n"
6280 " (flag == LA_ACT_ADD) ? \"LA_ACT_ADD\" :\n"
6281 " (flag == LA_ACT_DELETE) ? \"LA_ACT_DELETE\" :\n"
6287 #: build/C/man7/rtld-audit.7:538
6291 "la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie)\n"
6293 " printf(\"la_objopen(): loading \\e\"%s\\e\"; lmid = %s; "
6294 "cookie=%x\\en\",\n"
6295 " map-E<gt>l_name,\n"
6296 " (lmid == LM_ID_BASE) ? \"LM_ID_BASE\" :\n"
6297 " (lmid == LM_ID_NEWLM) ? \"LM_ID_NEWLM\" :\n"
6303 #: build/C/man7/rtld-audit.7:541
6306 " return LA_FLG_BINDTO | LA_FLG_BINDFROM;\n"
6311 #: build/C/man7/rtld-audit.7:546
6315 "la_objclose (uintptr_t *cookie)\n"
6317 " printf(\"la_objclose(): %x\\en\", cookie);\n"
6321 #: build/C/man7/rtld-audit.7:549
6329 #: build/C/man7/rtld-audit.7:555
6333 "la_preinit(uintptr_t *cookie)\n"
6335 " printf(\"la_preinit(): %x\\en\", cookie);\n"
6340 #: build/C/man7/rtld-audit.7:564
6344 "la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
6345 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
6347 " printf(\"la_symbind32(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
6348 " symname, sym-E<gt>st_value);\n"
6349 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
6350 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
6354 #: build/C/man7/rtld-audit.7:567 build/C/man7/rtld-audit.7:579 build/C/man7/rtld-audit.7:589
6357 " return sym-E<gt>st_value;\n"
6362 #: build/C/man7/rtld-audit.7:576
6366 "la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,\n"
6367 " uintptr_t *defcook, unsigned int *flags, const char *symname)\n"
6369 " printf(\"la_symbind64(): symname = %s; sym-E<gt>st_value = %p\\en\",\n"
6370 " symname, sym-E<gt>st_value);\n"
6371 " printf(\" ndx = %d; flags = 0x%x\", ndx, *flags);\n"
6372 " printf(\"; refcook = %x; defcook = %x\\en\", refcook, defcook);\n"
6376 #: build/C/man7/rtld-audit.7:586
6380 "la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx,\n"
6381 " uintptr_t *refcook, uintptr_t *defcook, La_i86_regs *regs,\n"
6382 " unsigned int *flags, const char *symname, long int *framesizep)\n"
6384 " printf(\"la_i86_gnu_pltenter(): %s (%p)\\en\", symname, "
6385 "sym-E<gt>st_value);\n"
6388 #. FIXME Specifying multiple audit libraries doesn't work on GNU.
6389 #. My simple tests on Solaris work okay, but not on Linux -- mtk, Jan 2009
6390 #. glibc bug filed: http://sourceware.org/bugzilla/show_bug.cgi?id=9733
6391 #. Reportedly, this is fixed on 16 Mar 2009 (i.e., for glibc 2.10)
6393 #: build/C/man7/rtld-audit.7:600
6395 "In glibc versions up to and include 2.9, specifying more than one audit "
6396 "library in B<LD_AUDIT> results in a run-time crash. This is reportedly "
6397 "fixed in glibc 2.10."
6401 #: build/C/man7/rtld-audit.7:605
6402 msgid "B<ldd>(1), B<dlopen>(3), B<ld.so>(8), B<ldconfig>(8)"