deriveConstants: Verify sanity of nm
deriveConstants: Verify sanity of nm

Add a sanity check ensuring that nm emits valid hexadecimal output, as
required by POSIX. See #11744 for motivation.

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2113

GHC Trac Issues: #11744

(cherry picked from commit bf17fd0e5b5442a87f507b26e64a30c79732838a)

GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc