]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/elftoolchain/elfcopy/mcs.1
MFV r361322:
[FreeBSD/FreeBSD.git] / contrib / elftoolchain / elfcopy / mcs.1
1 .\" Copyright (c) 2011 Joseph Koshy.  All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\"
12 .\" THIS SOFTWARE IS PROVIDED BY JOSEPH KOSHY ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED.  IN NO EVENT SHALL JOSEPH KOSHY BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 .\" SUCH DAMAGE.
23 .\"
24 .\" $Id: mcs.1 3642 2018-10-14 14:24:28Z jkoshy $
25 .\"
26 .Dd November 29, 2011
27 .Dt MCS 1
28 .Os
29 .Sh NAME
30 .Nm mcs
31 .Nd manipulate the comment section of an ELF object
32 .Sh SYNOPSIS
33 .Nm
34 .Op Fl a Ar string
35 .Op Fl c
36 .Op Fl n Ar name
37 .Op Fl p
38 .Ar
39 .Nm
40 .Fl d
41 .Op Fl n Ar name
42 .Ar
43 .Nm
44 .Fl h | Fl -help
45 .Nm
46 .Fl V | Fl -version
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility is used to manipulate comment sections in an ELF object.
51 If a command-line argument
52 .Ar file
53 names an
54 .Xr ar 1
55 archive, then
56 .Nm
57 will operate on the ELF objects contained in the archive.
58 .Pp
59 By default
60 .Nm
61 operates on the ELF section named
62 .Dq .comment .
63 This may be changed using the
64 .Fl n
65 option.
66 .Pp
67 The
68 .Nm
69 utility supports the following options:
70 .Bl -tag -width ".Fl a Ar string"
71 .It Fl a Ar string
72 Append the text in
73 .Ar string
74 to the comment section.
75 This option may be specified multiple times.
76 .It Fl c
77 Compress the comment section by removing duplicate entries.
78 .It Fl d
79 Delete the comment section from the ELF object.
80 .It Fl h | Fl -help
81 Display a usage message and exit.
82 .It Fl n Ar name
83 Operate on the section named
84 .Ar name .
85 .It Fl p
86 Print the contents of the comment section.
87 This step is taken after actions specified by the
88 .Fl a
89 and
90 .Fl c
91 options (if any) are completed.
92 .It Fl V | Fl -version
93 Print a version identifier and exit.
94 .El
95 .Sh COMPATIBILITY
96 The behavior of the
97 .Nm
98 utility differs from its SVR4 counterpart in the following ways:
99 .Bl -bullet -compact
100 .It
101 If the
102 .Fl d
103 option is specified, it causes any
104 .Fl a ,
105 .Fl c
106 and
107 .Fl p
108 options present to be ignored.
109 .It
110 The order of options
111 .Fl a ,
112 .Fl c ,
113 .Fl d ,
114 and
115 .Fl p
116 on the command line is not significant.
117 .El
118 .Sh DIAGNOSTICS
119 .Ex -std
120 .Sh SEE ALSO
121 .Xr ar 1 ,
122 .Xr elfcopy 1 ,
123 .Xr ld 1 ,
124 .Xr nm 1 ,
125 .Xr strip 1