This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: [PATCH] New attempt at fixing MIPS --gc-sections et al.


Alan Modra wrote:
On Tue, Aug 16, 2005 at 03:55:31PM -0700, David Daney wrote:

A new field (do_not_emit) is added to the elf_link_hash_entry structure. When it is set, the corresponding symbol will not be emitted into the linker output.


No, please don't add unnecessary fields.  The right fix is to force the
symbols local.


I am assuming that the reason you say not to add more fields is to try to minimize runtime memory usage for ld.


Is that a correct assumption?

The problem I am having with marking symbols from GCed sections as forced_local is that the symbols still show up in the dynamic symbol table. As expected they are marked as local, but they are still there taking up space.

The problem I have with this approach is that the whole reason that I am using --gc-sections is to reduce memory usage in the executables I am producing. All of these bogus local symbols are taking up valuable memory and probably slowing down the runtime linker as well. In some cases it is not a small amount of memory either. For example I have one executable that is 7.5MB where there are 27KB worth of these bogus space wasters.

You probably can tell that I would rather use more resources during the build to achieve better runtime performance. I suppose for some the opposite may be true, but I suspect that is a rarely held view.

OK. Given all of that, is there some fundamental problem with my patch that I just don't *get*?

Or is it more just a general reluctance to add more fields to elf_link_hash_entry?

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]