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 2247 2011-11-29 08:41:34Z jkoshy $ 25.\" 26.Dd November 29, 2011 27.Os 28.Dt MCS 1 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 48The 49.Nm 50utility is used to manipulate comment sections in an ELF object. 51If a command-line argument 52.Ar file 53names an 54.Xr ar 1 55archive, then 56.Nm 57will operate on the ELF objects contained in the archive. 58.Pp 59By default 60.Nm 61operates on the ELF section named 62.Dq .comment . 63This may be changed using the 64.Fl n 65option. 66.Pp 67The 68.Nm 69utility supports the following options: 70.Bl -tag -width ".Fl a Ar string" 71.It Fl a Ar string 72Append the text in 73.Ar string 74to the comment section. 75This option may be specified multiple times. 76.It Fl c 77Compress the comment section by removing duplicate entries. 78.It Fl d 79Delete the comment section from the ELF object. 80.It Fl h | Fl -help 81Display a usage message and exit. 82.It Fl n Ar name 83Operate on the section named 84.Ar name . 85.It Fl p 86Print the contents of the comment section. 87This step is taken after actions specified by the 88.Fl a 89and 90.Fl c 91options (if any) are completed. 92.It Fl V | Fl -version 93Print a version identifier and exit. 94.El 95.Sh COMPATIBILITY 96The behavior of the 97.Nm 98utility differs from its SVR4 counterpart in the following ways: 99.Bl -bullet -compact 100.It 101If the 102.Fl d 103option is specified, it causes any 104.Fl a , 105.Fl c 106and 107.Fl p 108options present to be ignored. 109.It 110The order of options 111.Fl a , 112.Fl c , 113.Fl d , 114and 115.Fl p 116on 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 126