[COFF] Fix crashes when writing a PDB after adding thunks.
authorMartin Storsjo <martin@martin.st>
Fri, 1 Feb 2019 22:08:03 +0000 (22:08 +0000)
committerMartin Storsjo <martin@martin.st>
Fri, 1 Feb 2019 22:08:03 +0000 (22:08 +0000)
commitb2b0cab0c3de25fece534e67ad0d79af4009c4d1
tree75fbe37d91db51ed2638e479d96ad8d3c66ac5df
parent1147f71fed863639e3695a8be6979c39397d88b6
[COFF] Fix crashes when writing a PDB after adding thunks.

When writing a PDB, the OutputSection of all chunks need to be set.
The thunks are added directly to OutputSection after the normal
machinery that sets it for all other chunks.

This fixes part of PR40467.

Differential Revision: https://reviews.llvm.org/D57574

llvm-svn: 352928
lld/COFF/Writer.cpp
lld/test/COFF/arm-thumb-thunks-pdb.s [new file with mode: 0644]