powerpc: Convert relocs_check to a shell script using grep