This is an archive of the discontinued LLVM Phabricator instance.

Make --export-dynamic work on non-PIC/PIE targets.
ClosedPublic

Authored by ed on Feb 15 2017, 2:24 AM.

Details

Summary

For CloudABI I'm only interested in generating non-PIC/PIE executables
on armv6 and i686, as PIE introduces larger overhead than on aarch64 and
x86_64. Still, I want to be able to instruct the linker to generate a
dynamic symbol table if requested. One example use for this is that
dynamic symbol tables can be used by programs to print nicely formatted
stacktraces, including symbol names.

Right now there seems to be some logic in LLD that it only wants to emit
dynamic symbol tables when either linking against libraries or when
building PIC. Let's extend this to also take --export-dynamic into
account.

Diff Detail

Repository
rL LLVM

Event Timeline

ed created this revision.Feb 15 2017, 2:24 AM
ruiu accepted this revision.Feb 15 2017, 12:43 PM

LGTM

This revision is now accepted and ready to land.Feb 15 2017, 12:43 PM
This revision was automatically updated to reflect the committed changes.