Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #83
Difficulty: Easy
BSD, Linux, Mac OS X, and other Unix-like operating systems did not inherit aspects of the original Unix design.
True or False?
Linux & Unix Commands - Search Man Pages

strcompact(1) [bsd man page]

strcompact(1)						      General Commands Manual						     strcompact(1)

NAME
strcompact - string compaction for object files SYNOPSIS
strcompact [ object_name ... ] DESCRIPTION
strcompact scans the symbol and string tables of an object file looking for multiple references in the symbol table to the same string. The string offset of symbol table entries is updated to preserve only one copy of the string. strcompact cut the size of the kernel string table by about 25%. The user must have write permission to the object/executable file. strcompact writes to stderr the number of shared strings found. strcompact exits 0 if successful, and >0 if an error occurred. SEE ALSO
sort(1), symcompact(1), symorder(1), uniq(1) BUGS
Execution speed leaves much to be desired - on a 11/73 it takes about 4 minutes to process the string table of the kernel. Fortunately this is only done once when the kernel is created. Although strcompact may be run on .o files as well as executables but this is probably not worth the trouble since the linker will not cre- ate shared strings in the final executable. 3rd Berkeley Distribution January 25, 1994 strcompact(1)

Check Out this Related Man Page

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)

8 More Discussions You Might Find Interesting

1. Programming

function call in executable

Hi, I want to write a program in C or in Perl which will tell me that a function is called in which executables. I tried to use the unix command like 'nm', 'strings' and so on to find out whether a function is called in that executable or not but could not able to find a clue. The whole... (1 Reply)
Discussion started by: rocky_74
1 Replies

2. Programming

shared object "undefined symbol: fstat" error

Didn't have this problem in AIX, but ported to Linux with GCC compiler and am now getting a runtime error: tssutil: symbol lookup error: /work/agility/devel/bin/libagam.so: undefined symbol: fstat I'm sure most of you know that fstat is an intrinsic function just like printf, memcpy, etc. When I... (5 Replies)
Discussion started by: marcus121
5 Replies

3. Filesystems, Disks and Memory

Inode number

as kernel keeps track of user activities on a file by its INODE number and I node table . what is the structure of Inode table. and where does this Inode table mapped into?user space or kernel space? is the Inode Number is fixed for a file till its deletion? thanks (1 Reply)
Discussion started by: compbug
1 Replies

4. Programming

Listing function exports from object file

Is it possible to view all the functions exported by a given object file? "dump -tv" comes the closest, but what exactly am I looking for to determine whether the symbol exists in the object file? Essentially, I have a library that requires a call to "xdr_sizeof" and the compile is failing... (5 Replies)
Discussion started by: DreamWarrior
5 Replies

5. UNIX for Dummies Questions & Answers

Problem: Run schedular to copy from one table to other

Check if records of table B are 1 month old. if yes then Truncate table B_SNAPSHOT and then copy data from B to SNAPSHOT_B table otherwise no need to copy. Run a schedular after every 15 minutes. The tables B and SNAPSHOT_B has the below structure(same for both): PROCESS_NAME MQ_NAME... (0 Replies)
Discussion started by: nehagupta2008
0 Replies

6. Programming

determining the object files...

hello, is there a utility to determine which object files are used to create a binary executable file?let me explain, please: for ex. there are three files: a.o b.o c.o and these files are used to create a binary called: prg namely, a.o b.o c.o -> prg so, how can i determine these three... (1 Reply)
Discussion started by: xyzt
1 Replies

7. UNIX for Dummies Questions & Answers

XOR two strings

hi, i am new to shell programming, can u please tell me how to perform XOr operation of two strings. i tried to do xor using ^symbol but this doesnt work. help me with this Thanks (12 Replies)
Discussion started by: anil_uvce
12 Replies

8. UNIX for Dummies Questions & Answers

Take 100MB worth files from 200,000 Files

Hi, I have a process which creates almost 200K files. Each file ranging from 1kb to 5kb. This is almost 2GB of data in all files. I have a requirement where the business needs only 100MB worth of files. Is there a way to get files around 100MB (doesn't have to be exactly 100MB) from all the... (2 Replies)
Discussion started by: grep_me
2 Replies

Featured Tech Videos