]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The use of ld(1) to strip compiler local and non-global
authorru <ru@FreeBSD.org>
Mon, 30 Jun 2003 19:03:56 +0000 (19:03 +0000)
committerru <ru@FreeBSD.org>
Mon, 30 Jun 2003 19:03:56 +0000 (19:03 +0000)
commite36739ab6c6d884a3a975a94ea30d78b2c9f60f7
tree3a9fe30ed444e6f8219696e829dd6372dba3b039
parent3bd8aa4473febc11b1c678dd3f91eb0970188982
The use of ld(1) to strip compiler local and non-global
symbols from object files has bitrotted over the last
thirteen years, and it now does more harm than good.

An attempt to work around the problems caused by using
ld(1) for stripping was to pass LDFLAGS to the ld(1)
command, but this was not right either as ${LDFLAGS}
should, by design, be used with cc(1) and not ld(1).

One of the proposed solutions was to use the objcopy(1)
utility to do the strip work, and the other would be to
use strip(1), but Bruce Evans suggested not stripping
any symbols at all.  This works by leaving the grunt
work to the final strip(1) command (when installing the
binary).

Submitted by: bde
share/mk/bsd.lib.mk