svn commit: r257877 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Mark Johnston
markj at FreeBSD.org
Sat Nov 9 04:38:17 UTC 2013
Author: markj
Date: Sat Nov 9 04:38:16 2013
New Revision: 257877
URL: http://svnweb.freebsd.org/changeset/base/257877
Log:
Don't try to use the 32-bit drti.o unless the data model is explicitly set
to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't
determine which data model to use, which happens when -64 is omitted and
no object files are provided, e.g. with
# dtrace -G -n BEGIN
This would result in a linker error, but now works properly.
Also remove an unnecessary #ifdef.
MFC after: 2 weeks
Modified:
head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Nov 9 03:07:48 2013 (r257876)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Nov 9 04:38:16 2013 (r257877)
@@ -1864,7 +1864,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
* Arches which default to 64-bit need to explicitly use
* the 32-bit library path.
*/
- int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64);
+ int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32);
#else
/*
* Arches which are 32-bit only just use the normal
@@ -1879,9 +1879,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d
len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile,
drti) + 1;
-#if !defined(sun)
len *= 2;
-#endif
cmd = alloca(len);
(void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file,
More information about the svn-src-all
mailing list