aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools
diff options
context:
space:
mode:
authorKai Wang <kaiw@FreeBSD.org>2014-01-25 11:27:09 +0000
committerKai Wang <kaiw@FreeBSD.org>2014-01-25 11:27:09 +0000
commita52b8956ffc8cb96063be89b1eb4a5a044cb03bf (patch)
tree0dfd0aae86c0a25d547c30efbfff95ea5b9445af /cddl/contrib/opensolaris/tools
parent529a53abe2287eae08a3af62749273df775254e9 (diff)
downloadsrc-a52b8956ffc8cb96063be89b1eb4a5a044cb03bf.tar.gz
src-a52b8956ffc8cb96063be89b1eb4a5a044cb03bf.zip
Simplify DWARF version check.
Submitted by: emaste
Notes
Notes: svn path=/projects/elftoolchain/; revision=261154
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index f929cde69b27..bff4c545063f 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -96,11 +96,6 @@
#include "list.h"
#include "traverse.h"
-/* The versions of DWARF which we support. */
-#define DWARF_VERSION 2
-#define DWARF_VERSION3 3
-#define DWARF_VERSION4 4
-
/*
* We need to define a couple of our own intrinsics, to smooth out some of the
* differences between the GCC and DevPro DWARF emitters. See the referenced
@@ -1983,10 +1978,9 @@ dw_read(tdata_t *td, Elf *elf, char *filename __unused)
terminate("file contains too many types\n");
debug(1, "DWARF version: %d\n", vers);
- if (vers != DWARF_VERSION && vers != DWARF_VERSION3 &&
- vers != DWARF_VERSION4) {
+ if (vers < 2 || vers > 4) {
terminate("file contains incompatible version %d DWARF code "
- "(version 2, 3, or 4 required)\n", vers);
+ "(version 2, 3 or 4 required)\n", vers);
}
if (die_string(&dw, cu, DW_AT_producer, &prod, 0)) {