[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 18:49:52 PDT 2016


On Wed, Mar 16, 2016 at 6:28 PM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Wed, Mar 16, 2016 at 02:28:01PM +0000, Rui Ueyama via llvm-commits
> wrote:
> > ruiu added inline comments.
> >
> > ================
> > Comment at: ELF/Driver.cpp:148-149
> > @@ +147,4 @@
> > +  if (Config->Pie) {
> > +    if (Config->Shared)
> > +      error("-shared and -pie may not be used together");
> > +    if (Config->Static)
> > ----------------
> > I think this is also something that we are checking for errors too
> > eagerly. -shared implies -pie, so they are not incompatible. It is
> > better to ignore this combination.
>
> As long as you are strictly using the clang/gcc driver, only one of
> {-shared, pie} will happen. But people like to hand all kinds of random
> junk via -Wl to detecting illogical combinations makes sense, especially
> when it is almost free. As written by George, -shared does not imply
> -pie.
>

Also, unless we guarantee certain behavior for `-shared -pie`, IMO the best
thing is to have a fatal error so that users don't depend on whatever we
happen to do with that set of options if we aren't intentionally doing
something specific.

-- Sean Silva


>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160316/c5571ca6/attachment.html>


More information about the llvm-commits mailing list