1) Add a special class to the links you want to modify. For example:
<a class="link-fav" href="www.mysite.com">Link A</a>
2) With JavaScript, select all elements with that class, extract the target url and insert a new image in the DOM with the favIcon url as source.
With jQuery would be something like (not tested):
$('.link-fav').each(function(link){
var url = link.attr('href');
var favIcon = 'http://www.google.com/s2/favicons?domain='+url;
var img = $('<img/>').attr('src', favIcon);
img.insertBefore(link);
});