Version 0.3.27

* Removed dependency on libdl (it is no longer needed)
* Wrote generic dictionary, used in demangle.c and breakpoints.c
* Added debug.c for better debugging output
diff --git a/elf.c b/elf.c
index b3f7a12..d1fb6ca 100644
--- a/elf.c
+++ b/elf.c
@@ -21,8 +21,7 @@
 
 #include "ltrace.h"
 #include "elf.h"
-#include "options.h"
-#include "output.h"
+#include "debug.h"
 
 static void do_init_elf(struct ltelf *lte, const char *filename);
 static void do_close_elf(struct ltelf *lte);
@@ -42,9 +41,7 @@
 do_init_elf(struct ltelf *lte, const char *filename) {
 	struct stat sbuf;
 
-	if (opt_d > 0) {
-		output_line(0, "Reading ELF from %s...", filename);
-	}
+	debug(1, "Reading ELF from %s...", filename);
 
 	lte->fd = open(filename, O_RDONLY);
 	if (lte->fd == -1) {
@@ -137,11 +134,9 @@
 		}
 	}
 
-	if (opt_d > 1) {
-		output_line(0, "symtab: 0x%08x", (unsigned)lte->symtab);
-		output_line(0, "symtab_len: %lu", lte->symtab_len);
-		output_line(0, "strtab: 0x%08x", (unsigned)lte->strtab);
-	}
+	debug(2, "symtab: 0x%08x", (unsigned)lte->symtab);
+	debug(2, "symtab_len: %lu", lte->symtab_len);
+	debug(2, "strtab: 0x%08x", (unsigned)lte->strtab);
 }
 
 static void
@@ -165,14 +160,9 @@
 	library_symbols->name = &lte->strtab[lte->symtab[i].st_name];
 	library_symbols->next = tmp;
 
-	if (opt_d > 1) {
-		output_line(
-			0,
-			"addr: 0x%08x, symbol: \"%s\"",
+	debug(2, "addr: 0x%08x, symbol: \"%s\"",
 			(unsigned)lte->symtab[i].st_value,
-			&lte->strtab[lte->symtab[i].st_name]
-		);
-	}
+			&lte->strtab[lte->symtab[i].st_name]);
 }
 
 /*