bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/22533] ld: error while loading shared libraries: unexpected relo


From: amodra at gmail dot com
Subject: [Bug ld/22533] ld: error while loading shared libraries: unexpected reloc type 0x12
Date: Thu, 30 Nov 2017 14:29:38 +0000

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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
Relocation section '.rela.dyn' at offset 0x1230 contains 9 entries:
 Offset     Info    Type                Sym. Value  Symbol's Name + Addend
000b4ad4  00007212 R_PARISC_DPREL21L      0011a440   address@hidden + 0
000b4ad8  00007216 R_PARISC_DPREL14R      0011a440   address@hidden + 0
0011a440  00007380 R_PARISC_COPY          0011a440   address@hidden + 0

I think the fix will be that this block needs to throw away dyn_relocs if def
is in dynbss (or dynrelro) rather than uselessly copying non_got_ref.

  /* If this is a weak symbol, and there is a real definition, the
     processor independent code will have arranged for us to see the
     real definition first, and we can just use the same value.  */
  if (eh->is_weakalias)
    {
      struct elf_link_hash_entry *def = weakdef (eh);
      BFD_ASSERT (def->root.type == bfd_link_hash_defined);
      eh->root.u.def.section = def->root.u.def.section;
      eh->root.u.def.value = def->root.u.def.value;
      if (ELIMINATE_COPY_RELOCS)
        eh->non_got_ref = def->non_got_ref;
      return TRUE;
    }

-- 
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]