This is the mail archive of the
mailing list for the binutils project.
Re: why_live ?
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Michael Meeks <michael dot meeks at collabora dot com>
- Cc: binutils at sourceware dot org, Tor Lillqvist <tml at collabora dot com>
- Date: Thu, 24 Apr 2014 21:52:14 -0400 (EDT)
- Subject: Re: why_live ?
- Authentication-results: sourceware.org; auth=none
- References: <1398366958 dot 16955 dot 185 dot camel at linux-5pcc dot site>
On Thu, 24 Apr 2014, Michael Meeks wrote:
> Hi guys,
> Sorry to be a pain - but I couldn't dig this out of the mail archive /
> web page. We've a code size problem (this is LibreOffice ;-) that we're
> solving with -ffunction-sections --gc-sections et. al. which works
> really nicely great.
> However, there are still a number of things stuck in there that it is
> hard to determine why they are needed; of course - it is possible to manually
> remove them, and see who the linker complains about wrt. their users :-) and
> repeat that process to get some view of why; however Apple's linker has a
> -why_live parameter that helps a lot here:
> I was wondering if gold / ld have some moral equivalent ? The output
> shows the chain of references that suck the symbol on; eg.
> Is there an equivalent for binutils ?
RTFM GNU linker option "-y".
As a collateral, may I suggest taking the time to provide a
patch to improve the documentation such that this option would
be an easier find.