Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chatr(1) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

cachectl(3C)

a.out(4)

magic(4)

chatr(1)

NAME

chatr − change program’s internal attributes

SYNOPSIS

chatr [-l library] [-n] [-q] [-s] [-B bind] [+b flag] [+l library] [+pd size] [+pi size] [+r flag] [+s flag] file ...

DESCRIPTION

chatr, by default, prints each file’s magic number and file attributes to the standard output.

Options

chatr recognizes the following options:

-l library Indicate that the specified shared library is subject to run-time path lookup if directory path lists are provided (see +s and +b). 

-n Change file from demand-loaded to shared. 

-q Change file from shared to demand-loaded. 

-s Perform its operation silently. 

-B bind Select run-time binding behavior of a program using shared libraries.  One of the major binding modes immediate or deferred must be specified.  One or more of the binding modifiers nonfatal, verbose, or restricted can also be specified, each with a separate option.  See the Programming on HP-UX manual for a description of binding modes. 

+b flag Control whether the directory path list stored when the program was built can be used to locate shared libraries needed by the program.  The two flag values, enable and disable, respectively enable and disable use of the path list.  See the +s option. 

+l library Indicate that the specified shared library is not subject to run-time path lookup if directory path lists are provided (see +s and +b). 

+pd size Request a particular virtual memory page size that should be used for data.  Sizes of 4K, 16K, 64K, 256K, 1M, 4M, 16M, 64M, 256M, and L are supported.  A size of L will result in using the largest page size available.  The actual page size may vary if the requested size cannot be fulfilled. 

+pi size Request a particular virtual memory page size that should be used for instructions.  See the +pd option for additional information. 

+r flag Request static branch prediction when executing this program.  The flags enable and disable turn this request on and off, respectively. 

+s flag Control whether the directory path list specified with the SHLIB_PATH environment variable can be used to locate shared libraries needed by the program.  The two flag values, enable and disable, respectively enable and disable use of the environment variable.  If both +s and +b are used, their relative order on the command line indicates which path list will be searched first.  See the +b option. 

The term shared applies to the magic number SHARE_MAGIC while the term demand-loaded applies to the magic number DEMAND_MAGIC.  See magic(4) and the HP-UX Linker and Libraries Online User Guide for more information. 

Upon completion, chatr prints the file’s old and new values to standard output unless -s is specified. 

The +pd and +pi options only provide a hint for the virtual memory page size.  The actual page sizes may vary.  Under certain conditions, page size hints of L may result in better performance, depending on the specific memory requirements of the application. 

The performance of some applications may benefit from static branch prediction, others may not.  The +r option provides a hint for using or avoiding this feature. 

RETURN VALUE

chatr returns zero on success.  If the command line contents is syntactically incorrect, or one or more of the specified files cannot be acted upon, chatr returns the number of files whose attributes could not be modified.  If no files are specified, chatr returns decimal 255. 

EXTERNAL INFLUENCES

Environment Variables

The following internationalization variables affect the execution of chatr:

LANG

Determines the locale category for native language, local customs and coded character set in the absence of LC_ALL and other LC_* environment variables.  If LANG is not specified or is set to the empty string, a default of C (see lang(5)) is used instead of LANG. 

LC_ALL

Determines the values for all locale categories and has precedence over LANG and other LC_* environment variables. 

LC_CTYPE

Determines the locale category for character handling functions. 

 

LC_MESSAGES

Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. 

LC_NUMERIC

Determines the locale category for numeric formatting. 

NLSPATH

Determines the location of message catalogues for the processing of LC_MESSAGES. 

If any internationalization variable contains an invalid setting, chatr behaves as if all internationalization variables are set to C.  See environ(5).

In addition, the following environment variable affects chatr:

TMPDIR

Specifies a directory for temporary files (see tmpnam(3S)).

EXAMPLES

Change a.out to demand-loaded

chatr -q a.out

Change binding mode of program file that uses shared libraries to immediate and nonfatal.  Also enable usage of SHLIB_PATH environment variable:

chatr -B immediate -B nonfatal +s enable a.out

Disallow run-time path lookup for the shared library /usr/lib/libc.sl that the shared library libfoo.sl depends on:

chatr +l /usr/lib/libc.sl libfoo.sl

AUTHOR

chatr was developed by HP. 

SEE ALSO

System Tools:

ld(1) invoke the link editor

cachectl(3C) flush and/or purge the cache

Miscellaneous:

a.out(4) assembler, compiler, and linker output

magic(4) magic number for HP-UX implementations

Texts and Tutorials:

Programming on HP-UX

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026