freebsd-dev/cddl
Oleksandr Tymoshenko a6425ab52d Maintain target's byte order for multi-byte fields in CTF structures.
CTF format is not cross-platform by design, e.g. it is not guaranteed
that data generated by ctfconvert/ctfmerge on one architecture will
be successfuly read on another. CTF structures are saved/restored
using naive approach. Roughly it looks like:
	write(fd, &ctf_struct, sizeof(ctf_struct))
	read(fd, &ctf_struct, sizeof(ctf_struct))

By sheer luck memory layout of all type-related CTF structures is the same
on amd64/i386/mips32/mips64. It's different on ARM though. sparc, ia64,
powerpc, and powerpc64 were not tested. So in order to get file compatible
with dtrace on ARM it should be compiled on ARM. Alternative solution would
be to have "signatures" for every platform and ctfmerge should convert host's
reperesentation of CTF structure to target's one using "signature" as template.

This patch checks byte order of ELF files used for generating CTF record
and makes sure that byte order of data written to resulting files is the same
as target's byte order.
2012-03-24 01:47:33 +00:00
..
compat/opensolaris Remove C constructs that are incompatible with C++ from various 2011-06-10 20:10:30 +00:00
contrib Maintain target's byte order for multi-byte fields in CTF structures. 2012-03-24 01:47:33 +00:00
lib Merge new ZFS features from illumos: 2011-11-28 21:40:00 +00:00
sbin For now, remove MANFILTER from ZFS manpages (bad effect on html output). 2011-11-21 14:50:17 +00:00
usr.bin For now, remove MANFILTER from ZFS manpages (bad effect on html output). 2011-11-21 14:50:17 +00:00
usr.sbin For now, remove MANFILTER from ZFS manpages (bad effect on html output). 2011-11-21 14:50:17 +00:00
Makefile Apply a set of style.Makefile(5) changes to src/cddl/ makefiles. 2007-04-16 21:20:26 +00:00
Makefile.inc Do not lint code beyond necessity (with apologies to Wiliam of Ockham). 2010-11-18 16:32:52 +00:00