ld.frankenstein

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 10:53:22 PDT 2016


It is pretty annoying to check if a given linker script behaviour is
intentional or not. I think there are two main factors contributing to
it

* It is not very well documented.
* Linker scripts are responsible for a lot of the layout.

The second part makes it difficult to reduce a case where bfd and gold
work but lld does not. Running delta on a linker script will normally
produce a case where it is just incidental that bfd and/or gold
produce a working output.

Given that, I think at least for now we need to depend a bit on
integration testing. The last fixes I did on linker script handling
were so that I could create a "frankenstein ld": lld, but with bfd's
linker script.

With r281989 it is now able to link all of llvm/lld/clang on x86_64
and all tests pass :-)

To use it, edit the attached script to point to the linker script you
want and put it the same directory as ld.lld. Then run clang with
-fuse-ld=frankenstein.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld.frankenstein
Type: application/octet-stream
Size: 85 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/69d7bcbd/attachment.obj>


More information about the llvm-commits mailing list