• Home
Name
Date
Size
#Lines
LOC

..--

CMakeLists.txtD03-May-20241.7 KiB4638

MakefileD03-May-20241 KiB3211

README.txtD03-May-20241 KiB2217

gold-plugin.cppD03-May-202414 KiB453352

gold.exportsD03-May-20247 21

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