[lld] Don't create hints-section if Hint/Name Table is empty
authorRui Ueyama <ruiu@google.com>
Wed, 9 Oct 2019 06:48:24 +0000 (06:48 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 9 Oct 2019 06:48:24 +0000 (06:48 +0000)
commitc3c5e0fbbf7689aa841e9ad218ee06084554e7e6
tree2f1acf96ec20d0ea00d5c6b97af4d22bf11f3a1f
parent4ac388f7caccc94065712878667829cebd7b8083
[lld] Don't create hints-section if Hint/Name Table is empty

Fixes assert in addLinkerModuleCoffGroup() when using by-ordinal imports
only.

Patch by Stefan Schmidt.

Differential revision: https://reviews.llvm.org/D68352

llvm-svn: 374140
lld/COFF/Writer.cpp
lld/test/COFF/Inputs/ordinal-only-implib.def [new file with mode: 0644]
lld/test/COFF/imports-ordinal-only.s [new file with mode: 0644]