[PATCH] D26133: [ELF] Allow relative relocations to absolute symbols in PIC

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 06:32:46 PST 2016


Petr Hosek via Phabricator <reviews at reviews.llvm.org> writes:

> phosek added a comment.
>
> We run into this issue again in our codebase when linking the C library (based on musl) with lld. I've reduced that case into a new test case which I've added to the patch. While the solution that Ian suggested may be the "right thing", it's clearly not what BFD ld nor gold implement and it's unlikely that their implementation is going to change. Since there is code out there relying on this behavior, it'd be useful for lld to support it.

As written this is just duplicating a bug and we should not do it.

It is entirely possible we just have another case where lld gets
confused about a symbol being absolute or not. Can you provide the full
original code in musl that fails with lld?

Cheers,
Rafael


More information about the llvm-commits mailing list