gold doesn't have the old ld's -x parameter: -x --discard-all Delete all local symbols. gcc -Wl,-x is used e.g. in the makefiles for libcap.
Subject: Bug 10670 CVSROOT: /cvs/src Module name: src Changes by: ian@sourceware.org 2009-12-30 20:23:29 Modified files: gold : ChangeLog object.cc options.h Log message: PR 10670 * options.h (class General_options): Add -x/--discard-all. * object.cc (Sized_relobj::do_count_local_symbols): Handle --discard-all. If the local symbol needs a dynamic entry, check that before handling --discard-locals. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.409&r2=1.410 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/object.cc.diff?cvsroot=src&r1=1.111&r2=1.112 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/options.h.diff?cvsroot=src&r1=1.121&r2=1.122
I finally got back to this bug report. I added support for -x/--discard-all. Thanks for reporting it.