This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dlltool] Handle external and internal names with differing decoration
ClosedPublic

Authored by mstorsjo on Aug 30 2019, 4:20 AM.

Details

Summary

Also add a missed part of the test from SVN r369747.

I tried looking at GNU ld/dlltool's behaviour wrt decoration, with and without the --kill-at option, and it turned out that lld mostly matched GNU ld's behaviour already (including the surprising case where GNU ld's --kill-at also removes the decoration from the import lib symbol, contrary to what GNU dlltool does). So the main mismatch was in how llvm-dlltool handled these case, and I chose the easy way out; just ignore all variants of "ExtName = Name" and make it behave as if only "ExtName" was specified, which is the only aspect that matters when generating an import library.

@jacek I saw that the patch already landed in wine for stopping including the alias part in the generated def files, but with that reverted, would it work with llvm-dlltool with this patch?

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Aug 30 2019, 4:20 AM
jacek added a comment.Aug 30 2019, 5:21 AM

Yes, it works with your patch and Wine workaround reverted.

Yes, it works with your patch and Wine workaround reverted.

Great, thanks for testing!

ruiu accepted this revision.Sep 2 2019, 3:16 AM

LGTM

This revision is now accepted and ready to land.Sep 2 2019, 3:16 AM
This revision was automatically updated to reflect the committed changes.