Changing symbols to "static"

Richard Tobin richard at aiai.ed.ac.uk
Sat Nov 3 02:20:31 AEST 1990


In article <781 at nixbur.UUCP> jobrien at nixbur.UUCP (John O'Brien) writes:
>Is there some way to change a symbol's class to "static" in a ".o" file?

Almost certainly.  Examine the format of symbol table entries, and see what
you can do.  There will be include files describing it - a.out.h perhaps,
and a man page for a.out.  Then write a program which reads in the .o
file, and writes it out with a modified symbol table.

A simple hack which may be enough is just to edit the .o file (using an
editor like gnu emacs which doesn't have line length restrictions).
Find the symbol name and change it to something obscure, being careful
not to change its length.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.unix.internals mailing list