The issue is interesting, since the Bezos patent is specific about the barge and the rocket handshaking and talking directly to each other. But SpaceX is contesting the patent (obviously, since they are actually doing it).
Almost certainly the initial location is sent by Mission Control, refined the whole time. The ASDS is set to maintain a location, the rocket is aiming for that location.
What would be interesting to know is if the barge tries talking to the booster. It appears that in fact the rocket does the targetting on its own, without Mission Control's help.
During the Iridium-2 launch from Vandenberg Jun 2017, John Insprucker mentioned on the Iridium launch webcast that the ASDS does not send any signals to the returning stage; it only receives telemetry from the stage.
This makes sense as you want a single system for RTLS and ASDS landings where possible.