[lld][COFF] Provide unwinding information for Chunk injected by /delayloaded
authorserge-sans-paille <sguelton@mozilla.com>
Fri, 13 Jan 2023 13:25:54 +0000 (14:25 +0100)
committerserge-sans-paille <sguelton@mozilla.com>
Mon, 16 Jan 2023 17:39:21 +0000 (18:39 +0100)
commitc512eda38ebe4070482545b52050adf307d37d7d
treebb4bd86ab5ef65dfa36e4211226ce016921c1794
parent48e862d06d2fce4c3b70eeda748efa2682d62f57
[lld][COFF] Provide unwinding information for Chunk injected by /delayloaded

For each symbol in a /delayloaded library, lld injects a small piece of
code to handle the symbol lazy loading. This code doesn't have unwind
information, which may be troublesome.

Provide these information for AMD64.

Thanks to Yannis Juglaret <yjuglaret@mozilla.com> for contributing the
unwinding info and for his support while crafting this patch.

Fix #59639

Differential Revision: https://reviews.llvm.org/D141691
lld/COFF/DLL.cpp
lld/COFF/DLL.h
lld/COFF/Writer.cpp
lld/test/COFF/delayimports.test
lld/test/COFF/delayimporttables.yaml
lld/test/COFF/giats.s