[gold patch] do not allocate common symbols within the discarded output sections
Cary Coutant
ccoutant@google.com
Mon Oct 10 21:07:00 GMT 2011
>> * 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
More information about the Binutils
mailing list