summaryrefslogtreecommitdiff
path: root/usr/src/cmd/dis
diff options
context:
space:
mode:
authordmick <none@none>2007-03-23 19:23:04 -0700
committerdmick <none@none>2007-03-23 19:23:04 -0700
commite007031558dddc1a7f3593d9457d99bde738653e (patch)
tree352e144c7e4fcb1b53468827dcfd950977cc0027 /usr/src/cmd/dis
parentaf48bdb315becc10c7a7725af8416f9112363057 (diff)
downloadillumos-joyent-e007031558dddc1a7f3593d9457d99bde738653e.tar.gz
6448268 dis: 6427698 introduced a bunch of meaningless spew when disassembling .o files
Diffstat (limited to 'usr/src/cmd/dis')
-rw-r--r--usr/src/cmd/dis/dis_main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/cmd/dis/dis_main.c b/usr/src/cmd/dis/dis_main.c
index b7f12a1b70..b62047d8dd 100644
--- a/usr/src/cmd/dis/dis_main.c
+++ b/usr/src/cmd/dis/dis_main.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -514,6 +514,15 @@ dis_file(const char *filename)
ehdr.e_machine);
}
+ /*
+ * If ET_REL (.o), printing immediate symbols is likely to
+ * result in garbage, as symbol lookups on unrelocated
+ * immediates find false and useless matches.
+ */
+
+ if (ehdr.e_type == ET_REL)
+ g_flags |= DIS_NOIMMSYM;
+
if (!g_quiet && dis_tgt_member(current) != NULL)
(void) printf("\narchive member %s\n",
dis_tgt_member(current));