elf_version(3elf) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

elf_version(3elf)

elf_version(3ELF)            ELF Library Functions           elf_version(3ELF)

NAME
       elf_version - coordinate ELF library and application versions

SYNOPSIS
       cc [ flag ... ] file ... -lelf [ library ... ]
       #include <libelf.h>

       uint_t elf_version(uint_t ver);

DESCRIPTION
       As  elf(3ELF)  explains,  the  program, the library, and an object file
       have independent notions of the latest ELF version. elf_version()  lets
       a program query the ELF library's internal version. It further lets the
       program  specify  what  memory  types it uses by giving its own working
       version, ver, to the library. Every program that uses the  ELF  library
       must coordinate versions as described below.


       The  header  <libelf.h>  supplies  the  version to the program with the
       macro EV_CURRENT. If the library's internal version (the  highest  ver‐
       sion  known to the library) is lower than that known by the program it‐
       self, the library may lack semantic knowledge assumed by  the  program.
       Accordingly, elf_version() will not accept a working version unknown to
       the library.


       Passing  ver  equal  to  EV_NONE causes elf_version() to return the li‐
       brary's internal version, without altering the working version. If  ver
       is  a  version known to the library, elf_version() returns the previous
       (or initial) working version number. Otherwise, the working version re‐
       mains unchanged and elf_version() returns EV_NONE.

EXAMPLES
       Example 1 A sample display of using the elf_version() function.




       The following excerpt from an application program protects itself  from
       using an older library:


         if (elf_version(EV_CURRENT) == EV_NONE) {
              /* library out of date */
              /* recover from error */
         }


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe


SEE ALSO
       elf(3ELF), elf32_xlatetof(3ELF), elf_begin(3ELF), libelf(3LIB), attrib‐
       utes(7)

NOTES
       The working version should be the same for all operations on a particu‐
       lar ELF descriptor. Changing the version between operations  on  a  de‐
       scriptor will probably not give the expected results.

Oracle Solaris 11.4            8 September 2014              elf_version(3ELF)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3