mcs man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

mcs(1)									mcs(1)

NAME
       mcs - Manipulates object file comment sections

SYNOPSIS
       mcs  [-v]  [-V] [[-a|r|R	 data] | [-D key] | [-d] ] [-t tag] [-g flags]
       [-p] obj1...objN

OPTIONS
       Add a new subsection or append to existing subsection data. By default,
       the  data  is treated as a character string and appended to the generic
       string space subsection. Use -t to specify a subsection.	 Delete a sub‐
       section.	 Use  -t  to  specify  the subsection that you want to delete.
       Delete one entry within a subsection. Use -t to specify the  subsection
       that this operation applies to. Currently, this option can only be used
       with the system subsections TAGDESC and TOOLVER.	  Set  tag  descriptor
       flags  for a subsection. Use -t to specify the subsection. If flag set‐
       tings already exist for this tag value, they are overwritten by the new
       settings.   Print  a  subsection	 or  the  entire  comment  section. By
       default, the whole section is dumped. Use -t to specify	a  subsection.
       By  default,  raw data is dumped in hexadecimal. Special formatting can
       be used for system-defined subsections.

	      Use with -v to view contents symbolically.

	      This option produces the same output as odump -cm. Use odump  -j
	      to  view compact relocations data stored in the comment section.
	      Replace subsection data. Use -t to specify the  subsection  that
	      you  want	 to  replace.  The same data interpretation applies to
	      both -r and -a.  Replace one entry  of  a	 subsection  with  the
	      given  data.  Use -t to specify the subsection that this applies
	      to. Currently, this option can only be used with the system sub‐
	      sections	TAGDESC	 and  TOOLVER.	 Specify subsection. Within an
	      object, a tag is a unique identifier;  only  one	subsection  is
	      permitted of each tag type.  Produce verbose output. Can be used
	      with -p.	Print version information for the mcs tool.

OPERANDS
       Character string.  Character strings containing	white  space  must  be
       enclosed in quotes.

	      For  certain  subsections, specially formatted data is accepted.
	      See Special Sections for more  information.   Unique  identifier
	      for  an entry within a subsection. See Special Sections for more
	      information.  An unsigned integer value or a system-defined  tag
	      name.   Comma-separated  tag  descriptor flag names. See Special
	      Sections for more information.  A Tru64 UNIX  object  file  that
	      contains	a  comment  section header. Archive files are not sup‐
	      ported. The object file can be  a	 file,	an  executable,	 or  a
	      shared library. It can be either compressed or uncompressed.

DESCRIPTION
       The  mcs command allows users to perform operations on the comment sec‐
       tion (.comment) of HP (e)COFF object files. The comment section	of  an
       object can contain information such as the “ident” string from a source
       file and other information used by components of the Tru64 UNIX	devel‐
       opment  environment.  Users can optionally add their own information to
       the comment section by using the mcs tool.

   Special Symbols
       Definitions for symbols related to the comment section are  located  in
       /usr/include/scncomment.h.  The symbols recognized by mcs are shortened
       forms of the names defined in the header file.  The symbols consist  of
       the names of system-defined tags and tag descriptor flags.

       System-defined  tag  names  can be used with the -t option to specify a
       subsection. These tags are:

       CMSTAMP
       COMPACT_RLC
       STRSPACE
       TAGDESC
       IDENT
       TOOLVER
       LINKERDEF
       II_CHECKSUMS
       II_ATOMARGS
       II_TOOLARGS
       II_ANALADDRS
       II_OBJID

       Tag descriptor flag names can be used with the -g option to specify how
       other  tools should treat a specified subsection. The flag names recog‐
       nized by mcs are:

       KEEP
       STRIP
       LSTRIP
       APPEND
       CHOOSE
       DELETE
       ERRMULT
       ERROR
       COPY

       See Special Sections for more information on the	 TAGDESC  and  TOOLVER
       subsections.

   Special Sections
       Processing  of  the  TAGDESC and TOOLVER subsections differs from other
       sections due to the following factors: The -R and  -D  options  can  be
       used  for per-entry operations.	The data entry format is unique.  Sys‐
       tem tools that create or modify objects rely on tag descriptor flags in
       the  TAGDESC  section  to  know how to process subsections that are not
       recognized by the tool. This allows new subsection types	 to  be	 added
       without requiring changes to system tools that control how they process
       the new subsections.

	      Three sets of flags are supported:

	      ──────────────────────────
	      Strip    Combine	 Modify
	      ──────────────────────────
	      KEEP     APPEND	 COPY
	      STRIP    CHOOSE	 DELETE
	      LSTRIP   DELETE	 ERROR
		       ERRMULT
		       ERROR
	      ──────────────────────────

	      The “strip” flags tell the linker or stripping tools  what  sub‐
	      sections	belong	in a stripped or locally-stripped object: KEEP
	      means do not strip.  STRIP means delete if removing  the	symbol
	      table.   LSTRIP  means  delete if removing local symbol informa‐
	      tion.

	      The “combine” flags tell tools such as the linker and mcs how to
	      combine  data  from multiple input subsections of the same type:
	      APPEND means  to	concatenate  raw  data	for  each  subsection.
	      CHOOSE  means  to choose one (random) subsection's data.	DELETE
	      tells the tools that this subsection does not belong in an  out‐
	      put  object.  ERRMULT means raise an error if multiple instances
	      of the tag value are found.  ERROR means raise an error  if  the
	      tag value identifies an unknown subsection type.

	      The “modify” flags tell a tool that is modifying a single object
	      what to do with subsections it does not understand:  COPY	 means
	      output  a	 subsection  identical	to  the one found in the input
	      object.  DELETE means do not output the subsection.  ERROR means
	      raise an error if a subsection of this type is encountered.

	      One  value  from	each  set  is defined for each subsection. The
	      default flag settings are KEEP, APPEND, COPY.

	      Flags are	 specified  symbolically  on  the  command  line.  The
	      accepted	format	is  a comma-separated list of three flag names
	      with no white space.  For example, the default flag setting  for
	      a subsection with the tag TAG# is specified as follows:

	      mcs -t TAG# -gKEEP,APPEND,COPY obj

	      The  key	for  a TAGDESC entry is the tag value being described.
	      The   TOOLVER   subsection   accepts   data   of	  the	 form:
	      tool_name,tool_version_number,version_string

	      The   variables	tool_name  and	version_string	are  character
	      strings, and tool_version_number is a numeric value.  For	 exam‐
	      ple, to add tool version information for a program named mytool,
	      the command is:

	      mcs -t TOOLVER -a "mytool,0,Beta, 1/1/99" obj

	      This creates a new entry	for  the  tool	named  mytool  in  the
	      TOOLVER subsection. To update this entry, use the -R option:

	      mcs -t TOOLVER -R "mytool,1,SSB, 1/1/99" obj

	      Note  that double quotes have to be passed through the shell for
	      strings containing white space or commas.	 Make  sure  that  the
	      separator commas have no spaces around them.

	      The key for the TOOLVER entry is the tool name.

EXAMPLES
       The comment section of an executable file might appear as follows:

       % mcs -pv objname

	  Tag		 Length	     Value     Flags: Strip Combine Modify
	  CMSTAMP	 0x0	     0x0	      KEEP CHOOSE COPY
	  COMPACT_RLC	 0x208	     0x30	      STRIP DELETE DELETE

	       ---  freeform data ---		     Use odump -j to view com‐
       pact relocations.

	       ----   end   data   ---	   END		    0x0		   0x0
       KEEP CHOOSE COPY

       If you want to delete compact relocations: % mcs -d -t COMPACT_RLC obj‐
       name

       If you want to add a subsection and specify flags for it: % mcs -a DATA
       -t0x80000000 -g STRIP,APPEND,COPY objname

       The  new	 subsection, identified by a tag value of 0x80000000, contains
       the string “DATA” in its associated freeform data.  The	flag  settings
       indicate	 that  the  section  should be stripped if the symbol table is
       removed, have data appended if objects with this section are linked  or
       otherwise combined, and left unchanged by an object modifier.

ENVIRONMENT VARIABLES
       The  following  environment  variables  affect the execution of mcs: If
       set, this path is used for the creation of a temporary file.  A	tempo‐
       rary file is used if an input object is compressed.

SEE ALSO
       Commands:  odump(1)

									mcs(1)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net