This patch builds TOC and adds common relocations for ppc64.
To build TOC, sections belong to TOC are merged into one section, serves as GOT and small data accessing.
Relocations commonly seen in local function call, external function call and global variable reference are added.
References
Just to make sure I follow:
ELFLinkGraphBuilder_ppc64 converts R_PPC64_ADDR64 to RequestToBeGOTEntry when it's a relocation _from_ a preexisting GOT entry in the object file?
Rather than using a special edge kind, could we walk the .toc section in the buildTables_ELF_ppc64 function to pre-register the entries before calling visitExistingEdges? Would that allow us to drop the RequestToBeGOTEntry edge kind and use Pointer64 unconditionally for R_PPC64_ADDR64?
I'm imagining something like: