[POWERPC] Optimize counting distinct entries in the relocation sections