Use correct attrs.

My previous commit was wrong. This is right and tested. Instead of using the attrs of compile, we need the attrs of link.