|
|
elfmark -t osr5|udk|none file ...
5 platform supports
a different application binary interface (ABI) from UnixWare 7
and other platforms derived from UNIX System V, Release 4.
There are differences in the size of fundamental data types
like uid_t; differences in the layout of system data
structures like struct stat; differences in values for
system constants such as error numbers; and even differences
in fundamental compiler calling conventions. This means
that for an OpenServer binary to run correctly on
UnixWare 7 or for a UnixWare 7 binary to run correctly on
OpenServer, the systems must be able to tell for which platform
the binary was intended.
Most binaries compiled for OpenServer contain an identifying section added by the OpenServer assembler and linker. This section is called .note and is visible through an executable's or shared library's program header as a segment of type PT_NOTE. Unfortunately, the contents of this section are not made part of the program's or shared library's address space and are thus not easily accessible by the system. The system therefore uses the presence of the section and some heuristics about its size to determine whether a file is intended for OpenServer. elfmark is intended to be used in those rare occurrences where the heuristics break down and the system misidentifies an ELF file. elfmark changes the value in the ``e_flags'' field of an ELF file's ELF header. This value is normally zero.
elfmark accepts a single option, -t, whose argument identifies the intended target platform and governs the value inserted in the ``e_flags'' field. The argument can have the following values:
Architecture Processor
Supplement. Since a System V ABI conforming application
will have zero in the ``e_flags'' field of its ELF
header, a special mark is needed to distinguish it from an
OpenServer ELF binary, which also has zero in the ``e_flags''
field (unless elfmarked). This mark may also be inserted
using the -Kudk option to the UnixWare 7 cc and CC
commands.