diff options
author | markj <markj@FreeBSD.org> | 2014-08-14 16:45:01 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-08-14 16:45:01 +0000 |
commit | 599cdb2d596f1aec1ed6a3f5898de4d83386711f (patch) | |
tree | dc2ea887c0d020f5312244b432791777bf9f7ec9 /cddl/contrib/opensolaris/lib/libdtrace | |
parent | 5c82afaaa3816969f8f3ab068dd1511dc54a1098 (diff) | |
download | FreeBSD-src-599cdb2d596f1aec1ed6a3f5898de4d83386711f.zip FreeBSD-src-599cdb2d596f1aec1ed6a3f5898de4d83386711f.tar.gz |
MFC r257877:
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.
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c index 07e20b7..dd8a2de 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -1871,7 +1871,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags, * 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 @@ -1886,9 +1886,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags, 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, |