svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
mcs(1)
mcs(1) User Commands mcs(1)
NAME
mcs - manipulate the comment section of an object file
SYNOPSIS
mcs [-cdHpVz] [-a string] [-A file] [-n name] file...
DESCRIPTION
The mcs command is used to display, deduplicate, or append content to
comment sections in an ELF object file. It can also be used to delete
comment or non-comment sections, and to zero SHT_PROGBITS sections.
Unless otherwise specified, the section named .comment is manipulated.
mcs cannot modify or delete a section that is contained within a seg‐
ment.
If the input file is an archive (see ar.h(3HEAD)), the archive is
treated as a set of individual files. For example, if the -a option is
specified, the string is appended to the comment section of each object
file in the archive; if the archive member is not an object file, then
it is left unchanged.
mcs must be given one or more of the options described below. It
applies each option, in the order given, to each file.
For append operations, if the object does not already contain a section
with the specified name, mcs will create a new empty section with that
name before performing the append operation.
OPTIONS
The following options are supported:
-a string Appends string to the comment section of the object files.
-A file Appends the contents of the given file to the comment sec‐
tion of the object files.
-c Compresses the contents of the comment section of the
object files by deduplication. All duplicate entries are
removed. The ordering of the remaining entries is not dis‐
turbed.
-d Deletes the specified section from the object files.
-H When -p is used, suppress the output of the name of the
file, as well as any blank lines normally inserted between
the output for each file.
-n name Specifies the name of the section to access if other than
.comment. By default, mcs deals with the section named
.comment. mcs can take multiple -n options to allow for
specification of multiple sections. mcs assumes that any
sections it manipulates have the format of a comment sec‐
tion.
-p Prints the contents of the comment section on the standard
output. Unless used with -H, each section printed is pre‐
fixed with the name of the file from which it was
extracted, using the format file[member_name]: for archive
files and file: for other files.
-V Print version information.
--version
-z Replaces any SHT_PROGBITS sections with zeros while
retaining the original attributes of the sections.
-? Print usage message and immediately exit.
--help
EXAMPLES
Example 1 Printing a file's comment section
The following entry
example% mcs -p elf.file
prints the comment section of the file elf.file.
Example 2 Appending a string to a comment section
The following entry
example% mcs -a xyz elf.file
appends string xyz to elf.file's comment section.
Example 3 Stripping a specified non-allocable section
Although used primarily with comment sections, mcs can operate on any
non-allocable section. In contrast to the strip command, which removes
a predefined selection of non-allocable sections, mcs can be used to
delete a specific section. The following entry
example% mcs -d -n .annotate elf.file
removes the section named .annotate from the file elf.file.
FILES
/tmp/mcs_* temporary files
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitydeveloper/base-developer-utilities _ Inter‐
face StabilityCommitted
SEE ALSO
ar(1), as(1), elfcompress(1), ld(1), strip(1), elf(3ELF), ar.h(3HEAD),
a.out(5), attributes(7)
NOTES
When mcs deletes a section using the -d option, it tries to bind
together sections of type SHT_REL and target sections pointed to by the
sh_info section header field. If one is to be deleted, mcs attempts to
delete the other of the pair.
The -z option removes the contents of SHT_PROGBITS sections while
retaining the original ELF structure of the object. The need for use of
the -z option is limited. However, the option can be used to deliver an
object file when the contents of SHT_PROGBITS sections are not rele‐
vant.
The mcs command is unable to modify core files.
Oracle Solaris 11.4 6 January 2020 mcs(1)