(none)

Nick Felisiak nick at spider.co.uk
Fri Nov 9 23:39:06 AEST 1990


Subject: Re: Changing symbols to "static"
References: <12935 at redrump.spider.co.uk>
Reply-To: nick at spider.co.uk (Nick Felisiak)
Organization: Spider Systems Limited, Edinburgh, UK.

In article <12935 at redrump.spider.co.uk> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>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?
>
>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 at spider.co.uk
Spider Systems Ltd			+44 31 554 9424



More information about the Comp.unix.questions mailing list