bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26080] Incorrect "Common symbol override test"


From: hjl.tools at gmail dot com
Subject: [Bug ld/26080] Incorrect "Common symbol override test"
Date: Wed, 03 Jun 2020 18:24:43 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26080

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Maciej W. Rozycki from comment #5)
> (In reply to H.J. Lu from comment #2)
> > > Your statement makes sense to me, however silently discarding relocations
> > > against an existing symbol from a debug section makes me nervous as to
> > > the impact on debugging.  Would you be able to provide a backing
> > > quotation from the relevant standard (DWARF, likely)?
> > 
> > This is very typical for symbol addresses in debug info in shared library.
> > Debuggers can find symbol addresses at run-time by other meanings.
> Right, it makes no sense to produce a dynamic relocation for a reference
> from a !SEC_ALLOC section, as it won't be relocated at run time anyway.
> 
> Can the bfd/elfxx-mips.c part of commit 21d790b94321 ("MIPS/BFD: Don't
> make debug section relocs dynamic"),
> <https://sourceware.org/ml/binutils/2010-09/msg00216.html>, be reverted
> as a part of your change?  I suspect it might become dead code now.

That piece of code has been removed by

commit c5d6fa4495dd20cc44698346f102fd7702fd601d
Author: Richard Sandiford <rdsandiford@googlemail.com>
Date:   Sun Oct 13 10:03:22 2013 +0000

    bfd/
            * elfxx-mips.c (mips_use_local_got_p): New function.
            (mips_elf_count_got_symbols, mips_elf_calculate_relocation): Use
it.
            (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
            GOT and absolute references.

It has been changed to

      /* Set CONSTRAIN_SYMBOL_P if we need to take the relocation
         into account when deciding how to define the symbol.
         Relocations in nonallocatable sections such as .pdr and
         .debug* should have no effect.  */
      constrain_symbol_p = ((sec->flags & SEC_ALLOC) != 0);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]