summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2014-12-26 18:53:29 +0000
committerMark Johnston <markj@FreeBSD.org>2014-12-26 18:53:29 +0000
commit003e64df933815479ea78ede810180d6b04ffafe (patch)
tree011abbe7940d2c9605ef3e08681081cd1e1b9d0a
parentf2e44b6029eb1db87bccdb7db68242556c2bcffd (diff)
Notes
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/drti.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c b/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
index d7b34907e4b6..6f3c9c7d3de9 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
@@ -127,6 +127,7 @@ dtrace_dof_init(void)
int efd;
char *s;
size_t shstridx;
+ uint64_t aligned_filesz;
#endif
if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL)
@@ -183,7 +184,9 @@ dtrace_dof_init(void)
}
while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) {
- 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 ||