Date: Tue, 6 Jan 2015 02:13:50 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276732 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201501060213.t062DoGb091105@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Jan 6 02:13:49 2015 New Revision: 276732 URL: https://svnweb.freebsd.org/changeset/base/276732 Log: MFC r276250: DOF tables are aligned according to the DOF section's alignment constraint, so take this into account when iterating over DOF tables. PR: 195555 Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:13:48 2015 (r276731) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:13:49 2015 (r276732) @@ -163,6 +163,7 @@ dtrace_dof_init(void) size_t shstridx, symtabidx = 0, dynsymidx = 0; unsigned char *buf; int fixedprobes; + uint64_t aligned_filesz; #endif if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL) @@ -226,7 +227,9 @@ dtrace_dof_init(void) while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) { fixedprobes = 0; - dof_next = (void *) ((char *) dof + dof->dofh_filesz); + aligned_filesz = (shdr.sh_addralign == 0 ? dof->dofh_filesz : + roundup2(dof->dofh_filesz, shdr.sh_addralign)); + dof_next = (void *) ((char *) dof + aligned_filesz); #endif if (dof->dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501060213.t062DoGb091105>