[PATCH] D19996: New clang option -mpiecopyrelocs to indicate support for linker copy relocations when linking as PIE

Sean Silva via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 01:27:41 PDT 2016


If this is something that GCC doesn't have, it would be nice if we put
something in our own docs about it (something like docs/UsersManual.rst).

On Thu, May 5, 2016 at 2:34 PM, Sriraman Tallam via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> On Thu, May 5, 2016 at 2:31 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
> > Is there a gcc option or they just assume they are targeting the
> > linker that was around when gcc was built?
>
> It is done at configure time, the linker is checked for copy
> relocations support.  I recently saw a request to replace this with a
> flag like -mpiecopyrelocs.  I chatted off-line with Reid about this
> and a flag was suggested.
>
> >
> >
> >> +  if (Args.hasFlag(options::OPT_mpiecopyrelocs,
> options::OPT_mno_piecopyrelocs,
> >> +                   false)) {
> >> +    CmdArgs.push_back("-piecopyrelocs");
> >> +  }
> >
> > you don't need the {}
> >
> >> +def piecopyrelocs : Flag<["-"], "piecopyrelocs">,
> >> +  HelpText<"Linker copy relocations support when linking as PIE">;
> >
> > I think you are missing a verb: Linker copy relocations *are* supported.
> >
> > But how about just "Position independent executables can have copy
> relocations"?
> >
> > Cheers,
> > Rafael
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160510/9191557b/attachment.html>


More information about the cfe-commits mailing list