HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)
c
chatr(1) chatr(1)
NAME
chatr - change program’s internal attributes
SYNOPSIS
Format 1: for files with a single text segment and a single data segment
chatr [-s][-z][
-Z][-l library ][-B mode ][+as mode ][+b flag ][
+cd flag ][+ci flag ]
[
+dbg flag ][+es
flag ][+gst flag ][+gstsize size ][+id flag ][
+k flag ][+l library ]
[
+md flag ][+mergeseg flag ][
+mi flag ][+o flag ][+pd size ][
+pi size ][+s flag ][+z
flag ][+I flag ] file ...
Format 2: for explicit specification of segments
chatr { +sa address | +sall | +si
index }[-s][-B mode ][+c flag ][+dz flag ][
+k flag ]
[
+m flag ][+mergeseg
flag ][+p size ][+r flag ][+s flag ][
+z flag ][+I flag ] file ...
DESCRIPTION
chatr allows you to change a program’s internal attributes for 32-bit and 64-bit ELF files.
There are two syntactic forms that can be used to invoke
chatr.
• Format 1 allows easy manipulation of ordinary files that have only a single text segment and a single
data segment.
• Format 2 allows explicit specification of the segments to be modified.
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.
The
+gst and related options provide performance enhancements through use of global symbol table
which improves searching for exported symbols. See dld.so (5) and the HP-UX Linker and Libraries
Online User Guide for more information.
To use Format 2, first specify the segment you want to modify by address (with the
+sa option) or index
(with the
+si option), or specify all segments (with the +sall option). Then use the +c
, +m, +r, +s,or
+z options to modify the segment attributes. You can include more than one segment on the command
line as long as you specify each segment with an +sa address or +si index option, followed by the modi-
fying options.
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).
-s Perform its operation silently.
-z Enable run-time dereferencing of null pointers to produce a SIGSEGV signal. (This is
the complement of the -Z option.)
-B mode Select run-time binding behavior mode of a program using shared libraries. You must
specify one of the binding modes immediate or deferred. See the HP-UX Linker
and Libraries User’s Guide for a description of binding modes.
-Z Disable run-time dereferencing of null pointers. (This is the complement of the -z
option.)
+as mode Control the address space model to be used by the kernel. Possible values for mode are
default, share_magic, exec_magic, shmem_magic, and mpas. The default
value is currently equivalent to share_magic. In order to set the mode to any value
other than the default, the binary should have been built with the -N compiler option to
ensure that the text and data segments are contiguous.
+b flag Control whether the embedded path list stored when the program (if any) 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 embedded path list. However,
you cannot use disable on an ELF file, and a warning message is issued. See the +s
option. You can use the +b option to enable the embedded path for filter libraries.
HP-UX 11i Version 2: August 2003 − 1 − Hewlett-Packard Company Section 1−−75