Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!haven!adm!news From: nick@spider.co.uk (Nick Felisiak) Newsgroups: comp.unix.questions Subject: (none) Message-ID: <24964@adm.BRL.MIL> Date: 9 Nov 90 12:39:06 GMT Sender: news@adm.BRL.MIL Lines: 31 Subject: Re: Changing symbols to "static" References: <12935@redrump.spider.co.uk> Reply-To: nick@spider.co.uk (Nick Felisiak) Organization: Spider Systems Limited, Edinburgh, UK. In article <12935@redrump.spider.co.uk> gwyn@smoke.brl.mil (Doug Gwyn) writes: >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. > > [...] > > >My recommendation is to design the kind of external interfaces you >really want, rather than trying to override the design via the linker. > There's a case where this sort of thing is useful and the current tools are inadequate, namely fixing the output of 'ld -r'. A very good instance of this is streams drivers. Ideally, the only thing visible by name is the streamtab structure which defines the entry points to the driver. In practice, if a driver is constructed from more than one source file, a potentially large number of names remain visible simply because there is no type of name which disappears after an 'ld -r' used to produce the single driver object file. I've had real cases when two network drivers 'collided' over such an internal name, and I built a simple program to hide given names in a COFF file. Nick Felisiak nick@spider.co.uk Spider Systems Ltd +44 31 554 9424