symcompact(1) General Commands Manual symcompact(1)NAME
symcompact - string compaction for object files
SYNOPSIS
symcompact [ object_name ... ]
DESCRIPTION
symcompact reduces the symbol table size of an executable file. This is done by removing unnecessary overlay transfer vectors (text sym-
bols beginning with a tilde). In a nonoverlaid program there is no need for both the underscore (_foo) and tilde (~foo) text symbol and
only the underscore form is kept. For overlaid programs if the symbol is in the base segment the tilde form is not needed and again only
the underscore form is preserved. Running symcompact typically reduces the kernel symbol table size by 250 or so symbols.
It is possible to run both symcompact and strcompact to achieve an even higher degree of symbol and string table compaction. The normal
sequence is to run symcompact first followed by strcompact. If symcompact runs out of memory it will be necessary to reverse the order and
run symcompact a second time - see the BUGS note below.
The user must have write permission to the object/executable file.
symcompact writes to stderr the count of symbols removed from the symbol table.
symcompact exits 0 if successful, and >0 if an error occurred.
SEE ALSO symcompact(1), symorder(1)BUGS
This program can partially negate the benefits of strcompact because multiple references to identical strings cause additional strings to
be placed in the string table. Running strcompact again after running this program fixes this problem.
The register local symbol type is removed from the executable/object file. Since the debugger really doesn't know how to deal with those
symbols this is not much of a loss and saves quite a bit of space both in the symbol table and the string table.
symcompact should not be run on .o files that will be passed to the linker. The linker will need the tilde form of the symbol if an over-
laid executable is being created.
3rd Berkeley Distribution January 25, 1994 symcompact(1)
Check Out this Related Man Page
syms(4) Kernel Interfaces Manual syms(4)NAME
syms - Symbol table
SYNOPSIS
#include <sym.h>
#include <symconst.h>
DESCRIPTION
The symbol table departs from the standard COFF symbol table. The symbol table consists of many tables unbundling information usually found
in the one COFF symbol table. The symbol table should be viewed as a handcrafted, network-style database designed for space and access
efficiency.
The following structures or tables appear in the symbol table:
--------------------------------------------------------------------------
Table Contents
--------------------------------------------------------------------------
Symbolic header Sizes and locations of all other tables
File descriptors Per file locations for other tables
Procedure descriptors Frame information and location of procedure
information
Local symbols Local type, local variable, and scoping informa-
tion
Local strings String space for local symbols
Line numbers Compacted by encoding, contains a line per
instruction
Relative file desc. Indirection for inter-file symbol access
Optimization symbols To be defined
Auxiliary symbols Data type information for local and external sym-
bols
External symbols Global text and data symbols
External strings String space for external symbols
Dense numbers Index pairs (file, symbol) for compiler use
(-oldc only)
--------------------------------------------------------------------------
External and local symbols are both represented using the following structure:
struct {
long iss; /* index into string space */
long value; /* address, size, etc.; depends on sc and st */
unsigned st: 6; /* symbol type (e.g., local, param, etc.) */
unsigned sc: 5; /* storage class (e.g., text, bss, etc.) */
unsigned reserved: 1;
unsigned index; /* index to symbol or auxiliary tables */ };
RELATED INFORMATION ldfcn(4). delim off
syms(4)