上图是x86 binutils 的流程图。
函数 | 说明 |
_bfd_x86_elf_link_hash_table_create | Init local STT_GNU_IFUNC symbol hash. |
elf_x86_64_check_relocs | Add support for handling STT_GNU_IFUNC symbols |
_bfd_elf_x86_get_local_sym_hash | Find and/or create a hash entry for local symbol |
_bfd_x86_elf_adjust_dynamic_symbol | STT_GNU_IFUNC symbol must go through PLT.All local STT_GNU_IFUNC references must be treate as local calls via local PLT. |
_bfd_x86_elf_size_dynamic_sections | Allocate .plt and .got entries, and space for local symbols |
elf_x86_allocate_dynrelocs | Handle STT_GNU_IFUNC symbols |
_bfd_x86_elf_local_htab_hash | Compute a hash of a local hash entry. We use elf_link_hash_entry for local symbol so that we can handle local STT_GNU_IFUNC symbols as global symbol. We reuse indx and dynstr _index for local symbol hash since they aren't used by global symbols in this backend. |
_bfd_x86_elf_local_htab_eq | Compare local hash entries |
_bfd_x86_elf_finish_dynamic_sections | Finish up the x86 dynamic sections. |
elf_x86_link_hash_table_free | Free local STT_GNU_IFUNC symbol hash. |
elf_x86_64_output_arch_local_syms | Fill PLT/GOT entries and allocate dynamic relocations for loal STT_GNU_IFUNC symbols.It has to be done before elf_link_sort_relocs is called so that dynamic relocations are properly sorted. |
elf_x86_64_finish_local_dynamic_symbol | Finish up local dynamic symbol handling. |
elf_x86_64_finish_dynamic_symbol | Finish up dynamic symbol handling. |