svn commit: r276265 - stable/10/cddl/contrib/opensolaris/lib/libdtrace/common

Mark Johnston markj at FreeBSD.org
Fri Dec 26 22:50:36 UTC 2014


Author: markj
Date: Fri Dec 26 22:50:34 2014
New Revision: 276265
URL: https://svnweb.freebsd.org/changeset/base/276265

Log:
  MFC r275011:
  The module load address always needs to be included when setting the dm_*_va
  fields of dt_module_t. Previously, this was only done on architectures where
  kernel modules have type ET_REL; this change fixes that. As a result, symbol
  name resolution in the stack() action now works properly for kernel modules
  on i386.

Modified:
  stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
==============================================================================
--- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c	Fri Dec 26 22:49:27 2014	(r276264)
+++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c	Fri Dec 26 22:50:34 2014	(r276265)
@@ -1211,13 +1211,13 @@ dt_module_update(dtrace_hdl_t *dtp, stru
 #if defined(__FreeBSD__)
 		if (sh.sh_size == 0)
 			continue;
-		if (is_elf_obj && (sh.sh_type == SHT_PROGBITS ||
-		    sh.sh_type == SHT_NOBITS)) {
+		if (sh.sh_type == SHT_PROGBITS || sh.sh_type == SHT_NOBITS) {
 			alignmask = sh.sh_addralign - 1;
 			mapbase += alignmask;
 			mapbase &= ~alignmask;
 			sh.sh_addr = mapbase;
-			dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr;
+			if (is_elf_obj)
+				dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr;
 			mapbase += sh.sh_size;
 		}
 #endif


More information about the svn-src-stable mailing list