Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: Changing symbols to "static" Keywords: coff ld Message-ID: <14294@smoke.brl.mil> Date: 1 Nov 90 00:30:29 GMT References: <781@nixbur.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 19 In article <781@nixbur.UUCP> jobrien@nixbur.UUCP (John O'Brien) writes: >Is there some way to change a symbol's class to "static" in a ".o" file? Technically, there probably is, but it wouldn't solve whatever problem you think it would. >but would it then be possible to change the class of "a", "b", "c" >and "d" to static so that they would not be exported to the linker? You're missing an important point: spot() REQUIRES that definitions be provided for a() and b(). Changing these to private rather than global symbols wouldn't magically define suitable functions! In some (non standard conforming) implementations, c and d might already be compiled into references to "common" storage, so they would get storage defined for them even if there were no explicit definition in the set of modules being linked. My recommendation is to design the kind of external interfaces you really want, rather than trying to override the design via the linker.