This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Allow embedded directives to be separated by null bytes
ClosedPublic

Authored by mstorsjo on Sep 13 2018, 12:10 AM.

Details

Summary

The PE spec says that they will be separated by spaces, but link.exe handles it just fine if they are separated by null bytes as well.

Since these directives are parsed and split by TokenizeWindowsCommandLine, this function needs to learn to treat null bytes as separators - this patch makes that unconditional, but at worst we might need to make it an optional feature, only used when parsing .drectve.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 13 2018, 12:10 AM
ruiu accepted this revision.Sep 13 2018, 6:58 AM

LGTM

This revision is now accepted and ready to land.Sep 13 2018, 6:58 AM
This revision was automatically updated to reflect the committed changes.