Documentation for hide_syms.pl

NAME

hide_syms.pl

SYNOPSIS

Hides symbols in a COFF .out or .obj file

USAGE

hide_syms.pl [options] xml file sym1 sym2 ...

   ... OR ...

ofdXX -x out file | perl hide_syms.pl [options] sym1 sym2 ...

OPTIONS

 -h               : Output usage and quit
 --cg_xml_version : Print out the version of the cg_xml package in use

DESCRIPTION

The symbols to hide must be global and defined in the file (storage class C_EXT). Such symbols are associated with actual code or variable storage in the file. Global symbols only referenced in a file (storage class C_EXTREF) are NOT hidden. Hiding is implemented by changing the storage class of these symbols to static (C_STAT). Future links against this .out or .obj file will result in these symbols not being used to resolve other external references.

To verify the changes to the COFF file, perform steps similar to the following:

USING OFD

OFD stands for Object File Display utility. Examples include ofd6x for C6000 and ofd55 for C5500.

Use the -x option of OFD to create the XML file. Example ...

      ofd6x -x -o=file.xml file.out

You can avoid creating the XML file by piping the output from OFD into the script ...

      ofd6x -x file.out | perl hide_syms.pl [options] I<sym1 sym2 ...>

OFD OPTIONS

Recent releases of OFD support options for filtering the XML output down to what is strictly of interest. The best options to use in combination with this script are:

  -x --xml_indent=0 --obj_display=none,header,symbols

Filtering the XML in this way reduces the amount of data processed by this script, thus making it run faster.

PERL VERSION DETAILS

This script was written using Perl version 5.8.4. It may not work with earlier revisions of Perl.

 Documentation for hide_syms.pl