summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2022-04-08 15:42:23 -0500
committerRichard Lowe <richlowe@richlowe.net>2022-08-24 16:45:15 -0500
commit27bb9688e4a8143e7fb6e5a968c192a7b594b32b (patch)
tree7e48281dfb08d73c64a375910f2a4d43e8c57c21 /usr/src/cmd
parent80b8dac6b3f2dc1f25951b319091df750a4e7d81 (diff)
downloadillumos-gate-27bb9688e4a8143e7fb6e5a968c192a7b594b32b.tar.gz
14911 ldd should be 64bit only
Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/sgs/ldd/Makefile4
-rw-r--r--usr/src/cmd/sgs/ldd/Makefile.com6
-rw-r--r--usr/src/cmd/sgs/ldd/amd64/Makefile10
-rw-r--r--usr/src/cmd/sgs/ldd/common/ldd.c10
-rw-r--r--usr/src/cmd/sgs/ldd/i386/Makefile33
-rw-r--r--usr/src/cmd/sgs/ldd/sparc/Makefile33
-rw-r--r--usr/src/cmd/sgs/ldd/sparcv9/Makefile10
7 files changed, 14 insertions, 92 deletions
diff --git a/usr/src/cmd/sgs/ldd/Makefile b/usr/src/cmd/sgs/ldd/Makefile
index 3fb5c9663e..51aa02ad48 100644
--- a/usr/src/cmd/sgs/ldd/Makefile
+++ b/usr/src/cmd/sgs/ldd/Makefile
@@ -20,9 +20,9 @@
# CDDL HEADER END
#
#
-#ident "%Z%%M% %I% %E% SMI"
-#
# Copyright (c) 1996 by Sun Microsystems, Inc.
# All rights reserved.
+BUILD32 = $(POUND_SIGN)
+
include $(SRC)/cmd/sgs/Makefile.sub
diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com
index ec6f5a04c7..2b6e966984 100644
--- a/usr/src/cmd/sgs/ldd/Makefile.com
+++ b/usr/src/cmd/sgs/ldd/Makefile.com
@@ -44,10 +44,8 @@ MAPOPTS= $(MAPFILE:%=-Wl,-M%)
CPPFLAGS += -I. -I../../include -I../../include/$(MACH) \
-I$(SRC)/uts/$(ARCH)/sys \
$(CPPFLAGS.master)
-LLDFLAGS = '-R$$ORIGIN/../../lib'
-LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)'
-LDFLAGS += $(VERSREF) $(MAPOPTS) $(LLDFLAGS)
-LDLIBS += $(CONVLIBDIR) -lconv -lelf
+LDFLAGS += $(VERSREF) $(MAPOPTS) '-R$$ORIGIN/../../lib/$(MACH64)'
+LDLIBS += $(CONVLIBDIR64) -lconv $(ELFLIBDIR64) -lelf
SMOFF += or_vs_and
diff --git a/usr/src/cmd/sgs/ldd/amd64/Makefile b/usr/src/cmd/sgs/ldd/amd64/Makefile
index 4950df4904..ea4abd8248 100644
--- a/usr/src/cmd/sgs/ldd/amd64/Makefile
+++ b/usr/src/cmd/sgs/ldd/amd64/Makefile
@@ -28,10 +28,10 @@ include ../Makefile.com
.KEEP_STATE:
-CONVLIBDIR = $(CONVLIBDIR64)
-LLDFLAGS = $(LLDFLAGS64)
-
-ROOTPROG = $(ROOTPROG64)
-
include ../Makefile.targ
include $(SRC)/Makefile.master.64
+
+install: $(ROOTPROG) $(ROOTPROG64)
+
+$(ROOTBIN64)/ldd:
+ $(RM) $@; $(SYMLINK) ../../bin/ldd $@
diff --git a/usr/src/cmd/sgs/ldd/common/ldd.c b/usr/src/cmd/sgs/ldd/common/ldd.c
index 8680d95ea0..069048ae18 100644
--- a/usr/src/cmd/sgs/ldd/common/ldd.c
+++ b/usr/src/cmd/sgs/ldd/common/ldd.c
@@ -163,16 +163,6 @@ main(int argc, char **argv, char **envp)
Aliste idx;
/*
- * If we're on a 64-bit kernel, try to exec a full 64-bit version of
- * the binary. If successful, conv_check_native() won't return.
- *
- * This is done to ensure that ldd can handle objects >2GB.
- * ldd uses libelf, which is not large file capable. The
- * 64-bit ldd can handle any sized object.
- */
- (void) conv_check_native(argv, envp);
-
- /*
* Establish locale.
*/
(void) setlocale(LC_MESSAGES, MSG_ORIG(MSG_STR_EMPTY));
diff --git a/usr/src/cmd/sgs/ldd/i386/Makefile b/usr/src/cmd/sgs/ldd/i386/Makefile
deleted file mode 100644
index ddafdb6d57..0000000000
--- a/usr/src/cmd/sgs/ldd/i386/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
-#
-
-include ../Makefile.com
-
-.KEEP_STATE:
-
-install: $(ROOTPROG)
-
-include ../Makefile.targ
diff --git a/usr/src/cmd/sgs/ldd/sparc/Makefile b/usr/src/cmd/sgs/ldd/sparc/Makefile
deleted file mode 100644
index ddafdb6d57..0000000000
--- a/usr/src/cmd/sgs/ldd/sparc/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
-#
-
-include ../Makefile.com
-
-.KEEP_STATE:
-
-install: $(ROOTPROG)
-
-include ../Makefile.targ
diff --git a/usr/src/cmd/sgs/ldd/sparcv9/Makefile b/usr/src/cmd/sgs/ldd/sparcv9/Makefile
index 4950df4904..ea4abd8248 100644
--- a/usr/src/cmd/sgs/ldd/sparcv9/Makefile
+++ b/usr/src/cmd/sgs/ldd/sparcv9/Makefile
@@ -28,10 +28,10 @@ include ../Makefile.com
.KEEP_STATE:
-CONVLIBDIR = $(CONVLIBDIR64)
-LLDFLAGS = $(LLDFLAGS64)
-
-ROOTPROG = $(ROOTPROG64)
-
include ../Makefile.targ
include $(SRC)/Makefile.master.64
+
+install: $(ROOTPROG) $(ROOTPROG64)
+
+$(ROOTBIN64)/ldd:
+ $(RM) $@; $(SYMLINK) ../../bin/ldd $@