Ported reflinks.py to core

Bug: 56900
Change-Id: I7355849f997c8615fac2e77df6d9cbfc9c5d1e19