Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
CMakeLists.txt | D | 03-May-2024 | 1.7 KiB | 46 | 38 | |
Makefile | D | 03-May-2024 | 1 KiB | 32 | 11 | |
README.txt | D | 03-May-2024 | 1 KiB | 22 | 17 | |
gold-plugin.cpp | D | 03-May-2024 | 14 KiB | 453 | 352 | |
gold.exports | D | 03-May-2024 | 7 | 2 | 1 |
README.txt
1 This directory contains a plugin that is designed to work with binutils 2 gold linker. At present time, this is not the default linker in 3 binutils, and the default build of gold does not support plugins. 4 5 Obtaining binutils: 6 7 cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login 8 {enter "anoncvs" as the password} 9 cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils 10 11 This will create a src/ directory. Make a build/ directory and from 12 there configure binutils with "../src/configure --enable-gold --enable-plugins". 13 Then build binutils with "make all-gold". 14 15 To build the LLVMgold plugin, configure LLVM with the option 16 --with-binutils-include=/path/to/binutils/src/include/ --enable-pic. To use the 17 plugin, run "ld-new --plugin /path/to/LLVMgold.so". 18 Without PIC libLTO and LLVMgold are not being built (because they would fail 19 link on x86-64 with a relocation error: PIC and non-PIC can't be combined). 20 As an alternative to passing --enable-pic, you can use 'make ENABLE_PIC=1' in 21 your entire LLVM build. 22