I want to use gold as my system linker instead of ld as ld doesn't support -fPIC and -shared. I followed this particular url to do so, gold-plugin As per the documentation, I ran gcc -v filename.c to find out what link command gcc would run. Then it tells me to check for line that runs collect2 and replace it with -plugin /path/to/LLVMgold.so. But gcc and collect2 are binary files. I studied a bit..and understood gcc calls collect2 ,in turn collect2 calls system linker ld by searching for ld-linux.so.2. I have rpm packeage of gcc4.4.4 installed on my fedora...how can I change my configuration.
How can I make gcc call ld-new/gold instead of collect2?