[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 16:05:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26080
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |10144
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Maciej W. Rozycki from comment #1)
> Thanks for cc-ing me on this PR. Please refer PR ld/10144 for the origin
> of this test case.
>
> 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.
> Please note that the MIPS target supports two distinct ELF executable
> formats, the traditional SVR4 one and the PLT one. There are
> peculiarities resulting, and any verification of the outcome of this PR
> against PR ld/10144 will have to cover both.
My fix doesn't change mips behavior. _bfd_mips_elf_check_relocs has
/* True if there is a relocation against this symbol that must be
resolved by the static linker (in other words, if the relocation
cannot possibly be made dynamic). */
unsigned int has_static_relocs : 1;
case R_MIPS_26:
case R_MIPS_PC16:
case R_MIPS_PC21_S2:
case R_MIPS_PC26_S2:
case R_MIPS16_26:
case R_MIPS16_PC16_S1:
case R_MICROMIPS_26_S1:
case R_MICROMIPS_PC7_S1:
case R_MICROMIPS_PC10_S1:
case R_MICROMIPS_PC16_S1:
case R_MICROMIPS_PC23_S2:
call_reloc_p = TRUE;
break;
}
if (h)
{
if (constrain_symbol_p)
{
if (!can_make_dynamic_p)
((struct mips_elf_link_hash_entry *) h)->has_static_relocs = 1;
mips backend doesn't check dynamic relocations with debug sections at all.
Referenced Bugs:
https://sourceware.org/bugzilla/show_bug.cgi?id=10144
[Bug 10144] mips/ld: non-dynamic relocations refer to dynamic symbol
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/26080] New: Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", address@hidden, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test",
hjl.tools at gmail dot com <=
- [Bug ld/26080] Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", address@hidden, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/03
- [Bug ld/26080] Incorrect "Common symbol override test", cvs-commit at gcc dot gnu.org, 2020/06/04
- [Bug ld/26080] Incorrect "Common symbol override test", hjl.tools at gmail dot com, 2020/06/04