This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch] do not allocate common symbols within the discarded output sections
- From: Cary Coutant <ccoutant at google dot com>
- To: vkutuzov at accesssoftek dot com
- Cc: Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 10 Oct 2011 14:07:13 -0700
- Subject: Re: [gold patch] do not allocate common symbols within the discarded output sections
- References: <1317162538.2832.51.camel@dp690-dev5v9.accesssoftek.com> <1318277223.4742.34.camel@dp690-dev5v9.accesssoftek.com>
>> ? ? ? * common.cc (Symbol_table::do_allocate_commons_list): prevent
>> ? ? ? allocation of the common symbols within the discarded output
>> ? ? ? sections.
With your patch, it looks like common symbols would remain common
symbols in the output file. I'd be concerned with the downstream
effects of that. I guess the effect is no different from adding
--no-define-common to the link options, but I've never seen a working
example of that. (I take that back -- I have tried using as part of a
really ugly dynamic linker way back before shared libraries.)
What use is there for discarding these sections, and why wouldn't it
make more sense to just issue an error if we need to allocate a common
symbol in a discarded section? (The user could always set
--no-define-common to avoid the error.)
-cary