[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 11:18:26 PDT 2016
On Wed, Mar 16, 2016 at 9:55 AM, George Rimar <grimar at accesssoftek.com>
> grimar 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");
> + }
> ruiu wrote:
> > ruiu wrote:
> > > Please remove this code unless you have a valid reason to do so.
> > Adding code which you cannot justify is a bad idea. "Leaving it as is"
> means not adding that code because that code didn't exist before. Add this
> piece of code when you find you actually need it.
> I removed it just because you insisted. But I can justify that. You`ll
> never get this using gcc and that is enough IMO to not support that atm.
> You often say something like "lets not support that until we need". So why
> we enable support here for something that even gold does not do ?
I respect compatibility as long as it matters and makes sense. In this
case, we don't have a good explanation on why this combination of option is
banned by gold/bfd. Adding that error check would increase the complexity
of the linker, and it copies the artificial limitation that we can't
explain. I don't want to say when someone asked me why this is banned
"because gold did this, so I don't know."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits