Page MenuHomePhabricator

Don't use -pie in relocatable link.
ClosedPublic

Authored by eugenis on Mar 7 2018, 3:04 PM.

Details

Summary

Android, in particular, got PIE enabled by default in r316606. It resulted in
relocatable links passing both -r and -pie to the linker, which is not allowed.

Event Timeline

eugenis created this revision.Mar 7 2018, 3:04 PM
srhines accepted this revision.Mar 7 2018, 3:06 PM

Thanks for fixing this quickly. :)

This revision is now accepted and ready to land.Mar 7 2018, 3:06 PM
mgrang added a subscriber: mgrang.Mar 7 2018, 3:07 PM
mgrang added inline comments.
clang/lib/Driver/ToolChains/Gnu.cpp
311 ↗(On Diff #137493)

We also need to check for -Wl,-r and -Xlinker -r options.

eugenis added inline comments.Mar 7 2018, 3:41 PM
clang/lib/Driver/ToolChains/Gnu.cpp
311 ↗(On Diff #137493)

I don't think it is driver's job to parse -Wl or -Xlinker arguments.
There is always -no-pie.

This revision was automatically updated to reflect the committed changes.