using 'ld -r' and limit the exported symbols

Stefan (metze) Metzmacher metze at
Wed Jun 23 22:18:58 GMT 2004

Bert Driehuis schrieb:

> On Wed, 23 Jun 2004, Stefan (metze) Metzmacher wrote:
>>I just found out about the 'ld -r' option which is used for prelinking.
>>this is used by th elinux kernel for creating only one .o file for a
>>I think it would be very usefull to use it in samba4 too, if the linker
>>supports it.
> Just out of curiosity -- why?
> Unless I'm seriously mistaken, it doesn't buy any performance, it will
> complicate the build process, and it probably will make debugging one
> notch harder. The only gain I see is reduced diskspace, which is why
> embedded systems use tricks like this.

I don't want to reduce the binary size,
what I want to do is having private functions inside a subsystem, which 
should not be accessable by other parts, in the same way we often use
'static' function which are private only to one source file.

the debug symbols should not be changed, so a debugger will work the 
same way as before...


Stefan Metzmacher <metze at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: OpenPGP digital signature
Url :

More information about the samba-technical mailing list