Ar Ar; On The Command Line - Red Hat ENTERPRISE LINUX 3 - USING BINUTILS Using Instructions

Using binutils, the gnu binary utilities
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING BINUTILS:
Table of Contents

Advertisement

ar [-]
[
[
p
mod
relpos
ar -M [
mri-script ]
The gnu
program creates, modifies, and extracts from archives. An archive is a single file holding
ar
a collection of other files in a structure that makes it possible to retrieve the original individual files
(called members of the archive).
The original files' contents, mode (permissions), timestamp, owner, and group are preserved in the
archive, and can be restored on extraction.
gnu
can maintain archives whose members have names of any length; however, depending on how
ar
is configured on your system, a limit on member-name length may be imposed for compatibility
ar
with archive formats maintained with other tools. If it exists, the limit is often 15 characters (typical
of formats related to a.out) or 16 characters (typical of formats related to coff).
is considered a binary utility because archives of this sort are most often used as libraries holding
ar
commonly needed subroutines.
creates an index to the symbols defined in relocatable object modules in the archive when you
ar
specify the modifier
s
to its contents (save for the
the library, and allows routines in the library to call each other without regard to their placement in
the archive.
You may use
or
nm -s
form of
called
ar
ranlib
gnu
is designed to be compatible with two different facilities. You can control its activity using
ar
command-line options, like the different varieties of
command-line option
"librarian" program.
2.1. Controlling
ar [
] [
]
-X32_64
-
p
When you use
in the Unix style,
ar
specifying the operation (optionally accompanied by other keyletters specifying modifiers), and the
archive name to act on.
Most operations can also accept further
gnu
allows you to mix the operation code
ar
command-line argument.
If you wish, you may begin the first command-line argument with a dash.
The
keyletter specifies what operation to execute; it may be any of the following, but you must
p
specify only one of them:
] [
]]
count
archive
. Once created, this index is updated in the archive whenever
update operation). An archive with such an index speeds up linking to
q
nm -print-armap
can be used to add just the table.
, you can control it with a script supplied via standard input, like the MRI
-M

on the Command Line

ar
[
[
] [
mod
relpos
count
insists on at least two arguments to execute: one keyletter
ar
member
[
...]
member
to list this index table. If an archive lacks the table, another
on Unix systems; or, if you specify the single
ar
]]
[
archive
member
arguments, specifying particular files to operate on.
and modifier flags
p
Chapter 2.
makes a change
ar
...]
in any order, within the first
mod
ar

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - USING BINUTILS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 3

Table of Contents