[PATCH] D18349: [ELF][MIPS] Reduce number of redundant entries in the local part of MIPS GOT
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 09:14:42 PDT 2016
atanasyan added a comment.
In http://reviews.llvm.org/D18349#380312, @rafael wrote:
> That is still more than needed, no?
Yes. If symbols point only to the thirst 64kb page of large output section we allocate "page" entries covers the section completely.
> A single symbol pointing to a 8k page would create 2 got entries but
> only needs one. Is that correct?
I do not consider local symbols individually at all. If a single symbol pointing to a 8k page we get one redundant entry. It is not good but acceptable. If we have more than one symbol pointing to the adjacent addresses, exact number of required GOT entries depends on the final values of these addresses. In the best case they all belong to the same final 64kb page and have the same high 16 bits. In the worst case we will need two page addresses. But to get optimal result we will have to calculate number of required GOT entries after all output section will be finalized and aligned.
More information about the llvm-commits