[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 23:22:11 PDT 2016
>> ruiu added inline comments.
>> Comment at: ELF/Driver.cpp:150-151
>> @@ +149,4 @@
>> + error("-shared and -pie may not be used together");
>> + if (Config->Static)
>> + error("-static and -pie may not be used together");
>> + }
>> Why is -pie incompatible with -static?
>It is not fundamentally so. A static program can be self relocating
>and openbsd has static pie binaries.
Hmm after that I answered a question to myself - what linker is used to produce that binaries.
I knew that gold does not support mix of -pie and -static. That was the reason I added this lines initially.
I just for some reason was sure that bfd also restricts it.
I checked it for bfd and found that options are working fine together. So now I think that was correct to remove
that check from final patch.
More information about the llvm-commits