gather links for variable hoisting