Symbol refcounting for STT_GNU_IFUNC symbols
Stephen Clarke
stephen.clarke@st.com
Fri Jul 2 14:47:00 GMT 2010
In bfd/elf32-386.c, elf_i386_check_relocs(), for R_386_GOT32 and
R_386_GOTOFF relocations with a symbol with STT_GNU_IFUNC type, the
h->got.refcount is incremented:
case R_386_GOT32:
case R_386_GOTOFF:
h->got.refcount += 1;
I guess this is because the mechanism for IFUNC symbols requires a GOT
entry (even for a GOTOFF relocation which does not normally require a
GOT entry).
However, there is no corresponding decrement in the
elf_i386_gc_sweep_hook() if the relocation is removed.
Is this just a minor (safe) inaccuracy, or is there some reason why the
refcount cannot be decremented in elf_i386_gc_sweep_hook()?
Steve.
More information about the Binutils
mailing list