coordinate ELF library and application versions
cc [flag . . . ] file . . . -lelf [library] . . .
unsigned elf_version(unsigned ver);
explains, the program, the library,
and an object file have independent notions
of the ``latest''
lets a program determine the
It further lets the program specify what memory types it uses
by giving its own
to the library.
Every program that uses the
must coordinate versions as described below.
The header file
supplies the version to the program with the macro
If the library's internal version
(the highest version known to the library)
is lower than that known by the
program itself, the library may lack
semantic knowledge assumed by the program.
will not accept a working version unknown to the library.
return the library's internal version,
without altering the working version.
is a version known to the library,
returns the previous (or initial) working version number.
Otherwise, the working version remains unchanged and
Error conditions are identified through the routine
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 */
The working version should be the same for all
operations on a particular elf descriptor.
Changing the version between operations on a descriptor
will probably not give the expected results.
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003