COFF: Support exception table.
authorRui Ueyama <ruiu@google.com>
Sun, 21 Jun 2015 04:00:54 +0000 (04:00 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 21 Jun 2015 04:00:54 +0000 (04:00 +0000)
commit4d769c3a573a5bf89d729cb81a3654f52edafd32
treecd2ae97307f90d103aada833db495fb0a8bc60af
parent4f89cbd89867a44ccd539c71f31e9185a702973d
COFF: Support exception table.

.pdata section contains a list of triplets of function start address,
function end address and its unwind information. Linkers have to
sort section contents by function start address and set the section
address to the file header (so that runtime is able to find it and
do binary search.)

This change seems to resolve all but one remaining test failures in
check{,-clang,-lld} when building the entire stuff with clang-cl and
lld-link.

llvm-svn: 240231
lld/COFF/Writer.cpp
lld/COFF/Writer.h
lld/test/COFF/unwind.test [new file with mode: 0644]