Patch adds a filename to that error message.
I am facing this now when debugging one of FreeBSD port:
error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr
Body->File field is empty for next place:
if (AbsVal && RelE) {
if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak())
return true;
error("relocation " + getRelName(Type) +
" cannot refer to absolute symbol " + Body.getName());
return true;
}It took some time to find the file and since global direction is to make linker more user friendly,
I suggest to add filename for that message.
Why do you need to pass 'this' pointer if you can use Sec->getFile()