summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-07-06 11:47:10 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-07-06 11:47:10 +0000
commit5a48332bdd33ee30e11da23e1e8b2c020bde0d61 (patch)
treedb489b42f6c99a8610d178331b002f3b5bb772de /usr/src/lib
parentd5d018dd406ed42eb59c272bbd8f49fe791f4256 (diff)
parentcf7690ebb38fa81bd6f3904ba5ad4649c0ea3c0b (diff)
downloadillumos-joyent-5a48332bdd33ee30e11da23e1e8b2c020bde0d61.tar.gz
[illumos-gate merge]
commit cf7690ebb38fa81bd6f3904ba5ad4649c0ea3c0b 12897 bhyve mevent can mistakenly handle events twice commit 60bd1e6666ad0da8ddf73bbaaca7709c40c560ab 12886 ccid: add sparc build commit 875000d3c627d9be03a7f83a026d1ea45d9680d6 12884 stabs: gcc false positive clobbered warning commit f896265fea0bec895c572a888206977854310034 12883 stabs: variable 'orig' set but not used commit 56f23fa092900d6145428feaadd69e5157186680 12898 ctf enum size detection should use DW_AT_byte_size commit 6ecc470585ed07369dd51b0ed85f5cf848e5b5c2 12867 Mis-programmed pcie bridge leaves 64-bit device unusable 12873 pci_autoconf: Makefile and compiler warning cleanup
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/cfgadm_plugins/ccid/Makefile2
-rw-r--r--usr/src/lib/cfgadm_plugins/ccid/sparc/Makefile20
-rw-r--r--usr/src/lib/cfgadm_plugins/ccid/sparcv9/Makefile21
-rw-r--r--usr/src/lib/libctf/common/ctf_dwarf.c40
4 files changed, 52 insertions, 31 deletions
diff --git a/usr/src/lib/cfgadm_plugins/ccid/Makefile b/usr/src/lib/cfgadm_plugins/ccid/Makefile
index 7d4af31c7d..232f1ec3b5 100644
--- a/usr/src/lib/cfgadm_plugins/ccid/Makefile
+++ b/usr/src/lib/cfgadm_plugins/ccid/Makefile
@@ -27,7 +27,7 @@
include ../../Makefile.lib
-$(INTEL_BLD)SUBDIRS = $(MACH) $(BUILD64) $(MACH64)
+SUBDIRS = $(MACH) $(BUILD64) $(MACH64)
all := TARGET= all
clean := TARGET= clean
diff --git a/usr/src/lib/cfgadm_plugins/ccid/sparc/Makefile b/usr/src/lib/cfgadm_plugins/ccid/sparc/Makefile
new file mode 100644
index 0000000000..66d7a51776
--- /dev/null
+++ b/usr/src/lib/cfgadm_plugins/ccid/sparc/Makefile
@@ -0,0 +1,20 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019, Joyent, Inc.
+#
+
+include ../Makefile.com
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/cfgadm_plugins/ccid/sparcv9/Makefile b/usr/src/lib/cfgadm_plugins/ccid/sparcv9/Makefile
new file mode 100644
index 0000000000..f2eb3c97a2
--- /dev/null
+++ b/usr/src/lib/cfgadm_plugins/ccid/sparcv9/Makefile
@@ -0,0 +1,21 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019, Joyent, Inc.
+#
+
+include ../Makefile.com
+include ../../../Makefile.lib.64
+
+.KEEP_STATE:
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/libctf/common/ctf_dwarf.c b/usr/src/lib/libctf/common/ctf_dwarf.c
index 3079831715..cbe1661003 100644
--- a/usr/src/lib/libctf/common/ctf_dwarf.c
+++ b/usr/src/lib/libctf/common/ctf_dwarf.c
@@ -1751,40 +1751,12 @@ ctf_dwarf_create_reference(ctf_cu_t *cup, Dwarf_Die die, ctf_id_t *idp,
return (ctf_dwmap_add(cup, *idp, die, B_FALSE));
}
-/*
- * Get the size of the type of a particular die. Note that this is a simple
- * version that doesn't attempt to traverse further than expecting a single
- * sized type reference (so no qualifiers etc.). Nor does it attempt to do as
- * much as ctf_type_size() - which we cannot use here as that doesn't look up
- * dynamic types, and we don't yet want to do a ctf_update().
- */
-static int
-ctf_dwarf_get_type_size(ctf_cu_t *cup, Dwarf_Die die, size_t *sizep)
-{
- const ctf_type_t *t;
- Dwarf_Die tdie;
- ctf_id_t tid;
- int ret;
-
- if ((ret = ctf_dwarf_refdie(cup, die, DW_AT_type, &tdie)) != 0)
- return (ret);
-
- if ((ret = ctf_dwarf_convert_type(cup, tdie, &tid,
- CTF_ADD_NONROOT)) != 0)
- return (ret);
-
- if ((t = ctf_dyn_lookup_by_id(cup->cu_ctfp, tid)) == NULL)
- return (ENOENT);
-
- *sizep = ctf_get_ctt_size(cup->cu_ctfp, t, NULL, NULL);
- return (0);
-}
-
static int
ctf_dwarf_create_enum(ctf_cu_t *cup, Dwarf_Die die, ctf_id_t *idp, int isroot)
{
size_t size = 0;
Dwarf_Die child;
+ Dwarf_Unsigned dw;
ctf_id_t id;
char *name;
int ret;
@@ -1795,7 +1767,15 @@ ctf_dwarf_create_enum(ctf_cu_t *cup, Dwarf_Die die, ctf_id_t *idp, int isroot)
if (ret == ENOENT)
name = NULL;
- (void) ctf_dwarf_get_type_size(cup, die, &size);
+ /*
+ * Enumerations may have a size associated with them, particularly if
+ * they're packed. Note, a Dwarf_Unsigned is larger than a size_t on an
+ * ILP32 system.
+ */
+ if (ctf_dwarf_unsigned(cup, die, DW_AT_byte_size, &dw) == 0 &&
+ dw < SIZE_MAX) {
+ size = (size_t)dw;
+ }
id = ctf_add_enum(cup->cu_ctfp, isroot, name, size);
ctf_dprintf("added enum %s (%d)\n", name, id);