Re-apply r274569. It was reverted in r276848 since that appeared to fix
authormarkj <markj@FreeBSD.org>
Fri, 28 Aug 2015 00:38:18 +0000 (00:38 +0000)
committermarkj <markj@FreeBSD.org>
Fri, 28 Aug 2015 00:38:18 +0000 (00:38 +0000)
commit251669654ae50bb6b39f71a6524c152123e2bcc8
treeebd9a16f739b05722bf3e06e09307bbadc0e4d4e
parentc72177e471c9cc05ee69bc29d21438009fd3b847
Re-apply r274569. It was reverted in r276848 since that appeared to fix
some ctfmerge crashes that started to occur on i386 weeks after r274569 was
committed. Some later investigation indicated that the crashes were caused
by malformed CTF info that led to a stack overflow. The issue with CTF
info in i386 kernels seems to have been resolved by r261246, which updated
libdwarf and libelf.

r274569 fixes a bug which caused duplicate types to appear in the kernel's
CTF info. This duplication generally does not cause problems when using
DTrace, but makes it easier to hit the limit of 2^15 - 1 distinct type
definitions in a CTF container.

MFC after: 2 weeks
cddl/contrib/opensolaris/tools/ctf/cvt/merge.c