Author: markj Date: Tue Jan 6 02:13:48 2015 New Revision: 276731 URL: https://svnweb.freebsd.org/changeset/base/276731
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/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:08:45 2015 (r276730) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Tue Jan 6 02:13:48 2015 (r276731) @@ -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 || _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"