This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [MinGW] Enable dynamicbase by default
ClosedPublic

Authored by mstorsjo on Aug 26 2020, 12:54 PM.

Details

Summary

This matches lld-link's own default.

Add a new command line option --no-dynamicbase for disabling it. (Unfortunately, GNU ld doesn't yet have a matching --no-dynamicbase option, as that's the default there.)

Diff Detail

Event Timeline

mstorsjo created this revision.Aug 26 2020, 12:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2020, 12:54 PM
Herald added a subscriber: dang. · View Herald Transcript
mstorsjo requested review of this revision.Aug 26 2020, 12:54 PM
amccarth accepted this revision.Aug 26 2020, 2:34 PM

LGTM.

This revision is now accepted and ready to land.Aug 26 2020, 2:34 PM
mati865 accepted this revision.Aug 26 2020, 2:57 PM

This really should have been the default for years but it didn't work properly with ld.bfd: https://github.com/msys2/MINGW-packages/issues/6674
Since it already work good with COFF backend when targeting MSVC I'm strongly in favour of enabling it for MinGW as well.

This revision was automatically updated to reflect the committed changes.