Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

moe(1)

Name

moe - manifest the optimal expansion of a path name

Synopsis

moe [-cV] [-32 | -64] [-s | -v] path

Description

The moe utility manifests the optimal expansion of a path name containing reserved runtime linker tokens. These tokens can be used to define dependencies, filtees and runpaths within dynamic objects. The expansion of these tokens at runtime, provides a flexible mechanism for selecting objects and search paths that perform best on this machine. See ld.so.1(1).

For example, the token $HWCAP can be employed to represent filters and dependencies. The runtime interpretation of this token can result in a family of objects that are analyzed to determine their applicability for loading with a process. The objects are sorted based on the hardware capabilities that each object requires to execute. moe returns the name of the object optimally suited for execution on the current platform.

moe analyzes a path name by passing the supplied path to dlmopen(3C), together with the RTLD_FIRST flag. Reserved token expansion is therefore carried out by ld.so.1 as the expansion would occur in an executing process. Although multiple objects can be analyzed as a result of the dlmopen() call, the RTLD_FIRST flag insures only the optimal object is processed.

By default, moe analyzes the specified path twice. The first analysis looks for 32–bit objects. The second analysis, if applicable, looks for 64–bit objects. Typically, 32–bit objects and 64–bit objects are isolated to different directories. These directories are frequently named to reflect the class of object the directory contains. The multiple passes of moe catch any instances where 32–bit objects and 64–bit objects occupy the same directory. Multiple passes also provide flexibility when the path name that is specified does not convey to the user the class of object the directory might contain.

For a complete description of the reserved token expansion carried out by the runtime linker, refer to the Oracle Solaris 11.4 Linkers and Libraries Guide.

Options

The following options are supported:

–32

Only analyze 32–bit objects.

–64

Only analyze 64–bit objects.

–c

Prefix each path name with the class of the object.

–s

Silent. No optimal name, or error diagnostics are displayed. Only an error return is made available. This option is only meaningful with the –32 and –64 options. The –s option can not be used with the –v option.

–v

Verbose. If no optimal expansion name can be determined, an error diagnostic is written to standard error. The –v option can not be used with the –s option.

–V
–-version

Print version information and immediately exit.

–?
–-help

Print usage message and immediately exit.

Operands

The following operand is supported:

path

The path name to be expanded.

Examples

The following example uses moe to display the optimal expansion of objects in the directory /usr/lib/libc. This directory contains a family of Intel objects that are built to use various hardware capabilities.

% moe '/usr/lib/libc/$HWCAP'
/usr/lib/libc/libc_hwcap.so.1

The –c option can be used to clarify the class of the optimal object.

% moe -c '/usr/lib/libc/$HWCAP'
32-bit: /usr/lib/libc/libc_hwcap.so.1

Exit Status

When the –32 or –64 options are in effect, a successful optimal expansion returns 0, otherwise non-zero. Without the –32 or –64 options in effect, the return value is always 0.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/linker
Interface Stability
Committed

See Also

ld.so.1(1), dlmopen(3C), attributes(7)

Oracle Solaris 11.4 Linkers and Libraries Guide