GNU linker and Function stubs on mips.
Koundinya K
knk@dde.dk
Thu Mar 2 09:30:00 GMT 2000
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
More information about the Binutils
mailing list