Page MenuHomePhabricator

[COFF] Ignore semicolons in module definition identifiers
ClosedPublic

Authored by dmajor on Nov 13 2017, 10:40 AM.

Details

Summary

The NSS project's .def files make heavy use of semicolons in a frightening attempt at portability: https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/capi/nsscapi.def

lld-link was treating the semicolon as part of the export name, resulting in unresolved symbols. This patch includes ';' in the list of characters to split on.

Diff Detail

Repository
rL LLVM

Event Timeline

dmajor created this revision.Nov 13 2017, 10:40 AM
ruiu edited edge metadata.Nov 13 2017, 5:37 PM

The NSS project's .def files make heavy use of semicolons in a frightening attempt at portability: https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/capi/nsscapi.def

Ooh, that's an amazing piece of super hacky code. It's even funny. :) It feels like it would probably be much easier to prepare separate file for each platform.

Anyway, I believe this patch is fine, but can you add a testcase?

dmajor updated this revision to Diff 123607.Nov 20 2017, 9:20 AM

Added a test. If this looks OK, do you mind landing it for me?

@ruiu Does this patch look ok?

This revision was automatically updated to reflect the committed changes.