This is an archive of the discontinued LLVM Phabricator instance.

Provide support for Binutils' --no-dynamic-linker option.
ClosedPublic

Authored by ed on Apr 2 2016, 5:17 AM.

Details

Summary

GNU ld seems to write a PT_INTERP header into executables containing a
default (read: bogus) value if --dynamic-linker flag is not provided.
LLD is different in the sense that it omits it unless --dynamic-linker
is provided, which seems fair.

Binutils 2.26 added a new flag, --no-dynamic-linker, that can be used to
generate binaries without PT_INTERP. Let's go ahead and also add this
flag to LLD, so that we can invoke the linker in a portable way.

Diff Detail

Repository
rL LLVM

Event Timeline

ed updated this revision to Diff 52460.Apr 2 2016, 5:17 AM
ed retitled this revision from to Provide support for Binutils' --no-dynamic-linker option..
ed updated this object.
ed added reviewers: ruiu, grimar.
ruiu accepted this revision.Apr 2 2016, 7:28 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 2 2016, 7:28 AM
This revision was automatically updated to reflect the committed changes.