This is the mail archive of the binutils@sources.redhat.com 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: RFH: libgcc_s.so being unnecessarily linked for mipsel-linuxcrosscompiler...


Alan Modra wrote:
On Thu, Jul 28, 2005 at 08:36:11PM -0700, David Daney wrote:

I can detect this special case in _bfd_mips_elf_add_symbol_hook() and cause it to be ignored, thus solving the problem.

Does this seem like a reasonable course of action?


Yes.  That does cost a strcmp on every symbol in every input file
though.  It's somewhat better to do strcmp once on every global symbol
in adjust_dynamic_symbol.  See elf32-ppc.c handling of _SDA_BASE_.
Even better would be a hash lookup in something run before
adjust_dynamic_symbol, say, always_size_sections.  I didn't think of
that when I added the ppc code.


Fixing things in _bfd_mips_elf_adjust_dynamic_symbol does not seem possible. I seems that this is called only for unresolved symbols in the input files. _gp_disp *is* unresolved in the input files and should be handled normally at this point as it will be resolved in mips_elf_calculate_relocation.


The problem is with input files that define the symbol. As far as I can tell this case must be handled when symbols are loaded from the input files as I am doing in the add_symbol_hook.

David Daney.


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