diff options
author | Mark Johnston <markj@FreeBSD.org> | 2013-11-09 04:38:16 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2013-11-09 04:38:16 +0000 |
commit | ee765c2d341844a1347fd4a2f165af3e6aea8977 (patch) | |
tree | 2a192e5661939e5001ed12192a9b81b2f8379ed4 /cddl/contrib/opensolaris | |
parent | 4c85fcfa371fd75b817dd828862c720bf9d71cb8 (diff) | |
download | src-ee765c2d341844a1347fd4a2f165af3e6aea8977.tar.gz src-ee765c2d341844a1347fd4a2f165af3e6aea8977.zip |
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
Notes
Notes:
svn path=/head/; revision=257877
Diffstat (limited to 'cddl/contrib/opensolaris')
-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 ee6847972895..5d72e9876e89 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -1864,7 +1864,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 @@ -1879,9 +1879,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, |