diff options
author | Richard Lowe <richlowe@richlowe.net> | 2022-04-07 16:29:36 -0500 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2022-07-13 18:36:53 -0500 |
commit | d37b9759f3782bad29cf7508d292559b4a8cf1f8 (patch) | |
tree | a4538dd292c6c140d00dbeb46048e30929d863f8 | |
parent | 902bba376031b794865234f1621102c7f4bf9d2b (diff) | |
download | illumos-joyent-d37b9759f3782bad29cf7508d292559b4a8cf1f8.tar.gz |
14792 elfdump(1) should be 64bit only
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/cmd/sgs/elfdump/Makefile | 4 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/Makefile.com | 9 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/amd64/Makefile | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/common/main.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/i386/Makefile | 33 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/sparc/Makefile | 33 | ||||
-rw-r--r-- | usr/src/cmd/sgs/elfdump/sparcv9/Makefile | 12 | ||||
-rw-r--r-- | usr/src/pkg/manifests/developer-object-file.p5m | 2 |
8 files changed, 17 insertions, 97 deletions
diff --git a/usr/src/cmd/sgs/elfdump/Makefile b/usr/src/cmd/sgs/elfdump/Makefile index 2f70df00c7..35c78efe07 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile +++ b/usr/src/cmd/sgs/elfdump/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# + +BUILD32 = $(POUND_SIGN) include $(SRC)/cmd/sgs/Makefile.sub diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com index c5190adcd4..1caec6d1bf 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.com +++ b/usr/src/cmd/sgs/elfdump/Makefile.com @@ -51,11 +51,10 @@ MAPOPT= $(MAPFILE:%=-Wl,-M%) CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ -I$(SRC)/lib/libc/inc -I$(SRC)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) -I$(ELFCAP) -LLDFLAGS = '-R$$ORIGIN/../../lib' -LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(MAPOPT) $(LLDFLAGS) -LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) -llddbg \ - $(CONVLIBDIR) -lconv + +LDFLAGS += $(VERSREF) $(MAPOPT) '-R$$ORIGIN/../../lib/$(MACH64)' +LDLIBS += $(ELFLIBDIR64) -lelf $(LDDBGLIBDIR64) -llddbg \ + $(CONVLIBDIR64) -lconv NATIVE_LDFLAGS = $(LDASSERTS) $(BDIRECT) diff --git a/usr/src/cmd/sgs/elfdump/amd64/Makefile b/usr/src/cmd/sgs/elfdump/amd64/Makefile index f410303040..eac6a377dd 100644 --- a/usr/src/cmd/sgs/elfdump/amd64/Makefile +++ b/usr/src/cmd/sgs/elfdump/amd64/Makefile @@ -31,15 +31,12 @@ include ../Makefile.com .KEEP_STATE: ARCH = amd64 -LLDFLAGS = $(LLDFLAGS64) -ELFLIBDIR = $(ELFLIBDIR64) -LDDBGLIBDIR = $(LDDBGLIBDIR64) -CONVLIBDIR = $(CONVLIBDIR64) - -ROOTPROG = $(ROOTPROG64) -ROOTCCSBINLINK = $(ROOTCCSBINLINK64) include ../Makefile.targ include $(SRC)/Makefile.master.64 -install: $(ROOTPROG64) +install: $(ROOTPROG) $(ROOTPROG64) \ + $(ROOTCCSBINLINK) $(ROOTCCSBINLINK64) + +$(ROOTBIN64)/elfdump: + $(RM) $@; $(SYMLINK) ../../bin/elfdump $@ diff --git a/usr/src/cmd/sgs/elfdump/common/main.c b/usr/src/cmd/sgs/elfdump/common/main.c index ed95ad5892..7acecdaf96 100644 --- a/usr/src/cmd/sgs/elfdump/common/main.c +++ b/usr/src/cmd/sgs/elfdump/common/main.c @@ -174,7 +174,7 @@ detail_usage() */ void dump_hex_bytes(const void *data, size_t n, int indent, - int bytes_per_col, int col_per_row) + int bytes_per_col, int col_per_row) { const uchar_t *ldata = data; int bytes_per_row = bytes_per_col * col_per_row; @@ -735,12 +735,6 @@ main(int argc, char **argv, char **envp) uchar_t osabi = ELFOSABI_NONE; /* - * 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. - */ - (void) conv_check_native(argv, envp); - - /* * Establish locale. */ (void) setlocale(LC_MESSAGES, MSG_ORIG(MSG_STR_EMPTY)); diff --git a/usr/src/cmd/sgs/elfdump/i386/Makefile b/usr/src/cmd/sgs/elfdump/i386/Makefile deleted file mode 100644 index d3cb302ac1..0000000000 --- a/usr/src/cmd/sgs/elfdump/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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../Makefile.com - -.KEEP_STATE: - -ARCH = i386 - -include ../Makefile.targ diff --git a/usr/src/cmd/sgs/elfdump/sparc/Makefile b/usr/src/cmd/sgs/elfdump/sparc/Makefile deleted file mode 100644 index a2c6327b0b..0000000000 --- a/usr/src/cmd/sgs/elfdump/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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include ../Makefile.com - -.KEEP_STATE: - -ARCH = sparc - -include ../Makefile.targ diff --git a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile index f24ce47957..2db168be93 100644 --- a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile @@ -31,16 +31,12 @@ include ../Makefile.com .KEEP_STATE: ARCH = sparcv9 -LLDFLAGS = $(LLDFLAGS64) -ELFLIBDIR = $(ELFLIBDIR64) -LDDBGLIBDIR = $(LDDBGLIBDIR64) -CONVLIBDIR = $(CONVLIBDIR64) - -ROOTPROG = $(ROOTPROG64) -ROOTCCSBINLINK = $(ROOTCCSBINLINK64) include ../Makefile.targ include $(SRC)/Makefile.master.64 -install: $(ROOTPROG64) +install: $(ROOTPROG) $(ROOTPROG64) \ + $(ROOTCCSBINLINK) $(ROOTCCSBINLINK64) +$(ROOTBIN64)/elfdump: + $(RM) $@; $(SYMLINK) ../../bin/elfdump $@ diff --git a/usr/src/pkg/manifests/developer-object-file.p5m b/usr/src/pkg/manifests/developer-object-file.p5m index e80006c2bd..763401d1c3 100644 --- a/usr/src/pkg/manifests/developer-object-file.p5m +++ b/usr/src/pkg/manifests/developer-object-file.p5m @@ -36,7 +36,7 @@ dir path=usr/bin dir path=usr/bin/$(ARCH64) file path=usr/bin/$(ARCH64)/ar mode=0555 file path=usr/bin/$(ARCH64)/dump mode=0555 -file path=usr/bin/$(ARCH64)/elfdump mode=0555 +link path=usr/bin/$(ARCH64)/elfdump target=../../bin/elfdump file path=usr/bin/$(ARCH64)/elfedit mode=0555 file path=usr/bin/$(ARCH64)/mcs mode=0555 file path=usr/bin/$(ARCH64)/nm mode=0555 |