This is the mail archive of the binutils@sourceware.cygnus.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]

Re: GNU linker and Function stubs on mips.


Hi Ian,
    Here is an addition to the the change I sen't y'day. For the issue in concern the
corresponding GOT entry should also contain  zero. Only the global offset table mapped
part of .dynsym contained zero after y'days changes. In addition to this, the
corresponding GOT entry should also be zero. I have addressed this here.


*************** _bfd_mips_elf_adjust_dynamic_symbol (inf
*** 7612,7618 ****

    /* For a function, create a stub, if needed. */
    if (h->type == STT_FUNC
!       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
      {
        if (! elf_hash_table (info)->dynamic_sections_created)
        return true;
--- 7708,7714 ----

    /* For a function, create a stub, if needed. */
    if (h->type == STT_FUNC
!       && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
      {
        if (! elf_hash_table (info)->dynamic_sections_created)
        return true;
*************** _bfd_mips_elf_adjust_dynamic_symbol (inf
*** 7642,7647 ****
--- 7738,7751 ----
          return true;
        }
      }
+   else if (h->type == STT_FUNC
+            && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
+     {
+       /* This will set the entry for this symbol in the GOT to 0, and
+          the dynamic linker will take care of this */
+       h->root.u.def.value = 0;
+       return true;
+     }


Please provide your views on this change.

Thanks !!

Koundinya





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