Bug 10670 - gold doesn't implement ld -x
Summary: gold doesn't implement ld -x
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-20 09:10 UTC by Bernhard Rosenkraenzer
Modified: 2009-12-30 20:25 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkraenzer 2009-09-20 09:10:10 UTC
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.
Comment 1 Sourceware Commits 2009-12-30 20:23:43 UTC
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

Comment 2 Ian Lance Taylor 2009-12-30 20:25:08 UTC
I finally got back to this bug report.  I added support for -x/--discard-all.  
Thanks for reporting it.