diff --git a/bin/check/Makefile.in b/bin/check/Makefile.in index c7f2f0f26d..9e8334968f 100644 --- a/bin/check/Makefile.in +++ b/bin/check/Makefile.in @@ -25,7 +25,6 @@ CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} BIND9LIBS = ../../lib/bind9/libbind9.@A@ NSLIBS = ../../lib/ns/libns.@A@ @@ -36,7 +35,6 @@ BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ NSDEPENDLIBS = ../../lib/ns/libns.@A@ LIBS = ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@ SUBDIRS = diff --git a/bin/confgen/Makefile.in b/bin/confgen/Makefile.in index c03183b145..2cd57c17ad 100644 --- a/bin/confgen/Makefile.in +++ b/bin/confgen/Makefile.in @@ -28,7 +28,6 @@ CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ BIND9LIBS = ../../lib/bind9/libbind9.@A@ @@ -43,8 +42,6 @@ RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${I LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@ - CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} SRCS= rndc-confgen.c ddns-confgen.c diff --git a/bin/delv/Makefile.in b/bin/delv/Makefile.in index 06743061b2..c0c1f4a219 100644 --- a/bin/delv/Makefile.in +++ b/bin/delv/Makefile.in @@ -25,7 +25,6 @@ CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} IRSLIBS = ../../lib/irs/libirs.@A@ @@ -37,7 +36,6 @@ IRSDEPLIBS = ../../lib/irs/libirs.@A@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@ SUBDIRS = diff --git a/bin/dig/Makefile.in b/bin/dig/Makefile.in index f5f604c8db..b6c573cd56 100644 --- a/bin/dig/Makefile.in +++ b/bin/dig/Makefile.in @@ -29,7 +29,6 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ BIND9LIBS = ../../lib/bind9/libbind9.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} IRSLIBS = ../../lib/irs/libirs.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ @@ -44,9 +43,6 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \ LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \ ${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@ -NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \ - ${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@ - SUBDIRS = TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in index 05fdb55df7..d26db1902f 100644 --- a/bin/dnssec/Makefile.in +++ b/bin/dnssec/Makefile.in @@ -24,7 +24,6 @@ CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} DNSDEPLIBS = ../../lib/dns/libdns.@A@ ISCDEPLIBS = ../../lib/isc/libisc.@A@ @@ -34,8 +33,6 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@ - # Alphabetically TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \ dnssec-importkey@EXEEXT@ dnssec-keyfromlabel@EXEEXT@ \ diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in index f66bc9a6e2..4e568e2999 100644 --- a/bin/named/Makefile.in +++ b/bin/named/Makefile.in @@ -61,7 +61,6 @@ DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} BIND9LIBS = ../../lib/bind9/libbind9.@A@ NSLIBS = ../../lib/ns/libns.@A@ @@ -80,11 +79,6 @@ LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \ ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \ @LIBS@ -NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \ - ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \ - ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \ - @LIBS@ - SUBDIRS = unix TARGETS = named@EXEEXT@ @@ -101,8 +95,6 @@ OBJS = builtin.@O@ config.@O@ control.@O@ \ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@ -SYMOBJS = symtbl.@O@ - GEOIP2LINKSRCS = geoip.c SRCS = builtin.c config.c control.c \ @@ -148,7 +140,6 @@ server.@O@: server.c -DVERSION=\"${VERSION}\" -c ${srcdir}/server.c named@EXEEXT@: ${OBJS} ${DEPLIBS} - export MAKE_SYMTABLE="yes"; \ export BASEOBJS="${OBJS} ${UOBJS}"; \ ${FINALBUILDCMD} @@ -184,6 +175,3 @@ uninstall:: ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named@EXEEXT@ @DLZ_DRIVER_RULES@ - -named-symtbl.@O@: named-symtbl.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c diff --git a/bin/named/main.c b/bin/named/main.c index 603e8a1b5e..d7150c47bd 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -200,7 +200,6 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type, int i, nframes; isc_result_t result; const char *logsuffix = ""; - const char *fname; /* * Handle assertion failures. @@ -224,27 +223,10 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type, isc_assertion_typetotext(type), cond, logsuffix); if (result == ISC_R_SUCCESS) { for (i = 0; i < nframes; i++) { - unsigned long offset; - - fname = NULL; - result = isc_backtrace_getsymbol( - tracebuf[i], &fname, &offset); - if (result == ISC_R_SUCCESS) { - isc_log_write(named_g_lctx, - NAMED_LOGCATEGORY_GENERAL, - NAMED_LOGMODULE_MAIN, - ISC_LOG_CRITICAL, - "#%d %p in %s()+0x%lx", i, - tracebuf[i], fname, - offset); - } else { - isc_log_write(named_g_lctx, - NAMED_LOGCATEGORY_GENERAL, - NAMED_LOGMODULE_MAIN, - ISC_LOG_CRITICAL, - "#%d %p in ??", i, - tracebuf[i]); - } + isc_log_write( + named_g_lctx, NAMED_LOGCATEGORY_GENERAL, + NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL, + "#%d %p in ??", i, tracebuf[i]); } } isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, @@ -974,36 +956,6 @@ destroy_managers(void) { isc_nm_destroy(&named_g_nm); } -static void -dump_symboltable(void) { - int i; - isc_result_t result; - const char *fname; - const void *addr; - - if (isc__backtrace_nsymbols == 0) { - return; - } - - if (!isc_log_wouldlog(named_g_lctx, ISC_LOG_DEBUG(99))) { - return; - } - - isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, - NAMED_LOGMODULE_MAIN, ISC_LOG_DEBUG(99), "Symbol table:"); - - for (i = 0, result = ISC_R_SUCCESS; result == ISC_R_SUCCESS; i++) { - addr = NULL; - fname = NULL; - result = isc_backtrace_getsymbolfromindex(i, &addr, &fname); - if (result == ISC_R_SUCCESS) { - isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, - NAMED_LOGMODULE_MAIN, ISC_LOG_DEBUG(99), - "[%d] %p %s", i, addr, fname); - } - } -} - static void setup(void) { isc_result_t result; @@ -1191,8 +1143,6 @@ setup(void) { NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "----------------------------------------------------"); - dump_symboltable(); - /* * Get the initial resource limits. */ diff --git a/bin/nsupdate/Makefile.in b/bin/nsupdate/Makefile.in index a4b99bddc7..a81ee91938 100644 --- a/bin/nsupdate/Makefile.in +++ b/bin/nsupdate/Makefile.in @@ -29,7 +29,6 @@ CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ BIND9LIBS = ../../lib/bind9/libbind9.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ IRSLIBS = ../../lib/irs/libirs.@A@ @@ -45,9 +44,6 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \ LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \ ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} \ - ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@ - SUBDIRS = TARGETS = nsupdate@EXEEXT@ diff --git a/bin/rndc/Makefile.in b/bin/rndc/Makefile.in index c5abfa6478..8eef2106d1 100644 --- a/bin/rndc/Makefile.in +++ b/bin/rndc/Makefile.in @@ -24,7 +24,6 @@ CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ BIND9LIBS = ../../lib/bind9/libbind9.@A@ @@ -35,7 +34,6 @@ DNSDEPLIBS = ../../lib/dns/libdns.@A@ BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@ LIBS = ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@ RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS} diff --git a/bin/tests/Makefile.in b/bin/tests/Makefile.in index 63659531cb..49a3d3aecb 100644 --- a/bin/tests/Makefile.in +++ b/bin/tests/Makefile.in @@ -22,12 +22,10 @@ BACKTRACECFLAGS = @BACKTRACECFLAGS@ DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ DNSDEPLIBS = ../../lib/dns/libdns.@A@ ISCDEPLIBS = ../../lib/isc/libisc.@A@ -ISCDEPNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ LIBS = @LIBS@ diff --git a/bin/tests/optional/.gitignore b/bin/tests/optional/.gitignore index 4c0b637f36..0d89a8600c 100644 --- a/bin/tests/optional/.gitignore +++ b/bin/tests/optional/.gitignore @@ -1,5 +1,3 @@ /backtrace_test.dSYM/ /backtrace_test0.dSYM/ -/backtrace_test_nosymtbl -/backtrace_test_nosymtbl.dSYM/ /nsecify diff --git a/bin/tests/optional/Makefile.in b/bin/tests/optional/Makefile.in index ab5536d1d1..593610633a 100644 --- a/bin/tests/optional/Makefile.in +++ b/bin/tests/optional/Makefile.in @@ -24,12 +24,10 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ ISCLIBS = ../../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@ DNSDEPLIBS = ../../../lib/dns/libdns.@A@ ISCDEPLIBS = ../../../lib/isc/libisc.@A@ -ISCDEPNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@ LIBS = @LIBS@ @@ -44,7 +42,6 @@ TARGETS = @XTARGETS@ XTARGETS = adb_test@EXEEXT@ \ byaddr_test@EXEEXT@ \ backtrace_test@EXEEXT@ \ - backtrace_test_nosymtbl@EXEEXT@ \ byname_test@EXEEXT@ \ db_test@EXEEXT@ \ gsstest@EXEEXT@ \ @@ -109,27 +106,10 @@ adb_test@EXEEXT@: adb_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ adb_test.@O@ \ ${DNSLIBS} ${ISCLIBS} ${LIBS} -backtrace_test_nosymtbl@EXEEXT@: ${srcdir}/backtrace_test.c ${ISCDEPLIBS} +backtrace_test@EXEEXT@: ${srcdir}/backtrace_test.c ${ISCDEPLIBS} ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} -o $@ \ ${srcdir}/backtrace_test.c ${ISCLIBS} ${LIBS} -backtrace_test@EXEEXT@: ${srcdir}/backtrace_test.c backtrace_test_nosymtbl@EXEEXT@ - #first step: create a first symbol table - rm -f symtbl.c - cp ${top_srcdir}/lib/isc/backtrace-emptytbl.c symtbl.c - #second step: build a binary with the first symbol table - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} \ - -o $@0 ${srcdir}/backtrace_test.c symtbl.c \ - ${ISCNOSYMLIBS} ${LIBS} - rm -f symtbl.c - #third step: create a second symbol table - cp ${top_srcdir}/lib/isc/backtrace-emptytbl.c symtbl.c - #fourth step: build the final binary - rm -f $@0 - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${BTTEST_CFLAGS} ${LDFLAGS} \ - -o $@ ${srcdir}/backtrace_test.c symtbl.c ${ISCNOSYMLIBS} ${LIBS} - rm -f symtbl.c - nsecify@EXEEXT@: nsecify.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsecify.@O@ \ ${DNSLIBS} ${ISCLIBS} ${LIBS} diff --git a/bin/tests/optional/backtrace_test.c b/bin/tests/optional/backtrace_test.c index 728c0ca44b..5527835eee 100644 --- a/bin/tests/optional/backtrace_test.c +++ b/bin/tests/optional/backtrace_test.c @@ -16,16 +16,11 @@ #include #include -const char *expected_symbols[] = { "func3", "func2", "func1", "main" }; - static int func3() { void *tracebuf[16]; - int i, nframes; - int error = 0; - const char *fname; + int nframes; isc_result_t result; - unsigned long offset; result = isc_backtrace_gettrace(tracebuf, 16, &nframes); if (result != ISC_R_SUCCESS) { @@ -35,39 +30,12 @@ func3() { } if (nframes < 4) { - error++; - } - - for (i = 0; i < 4 && i < nframes; i++) { - fname = NULL; - result = isc_backtrace_getsymbol(tracebuf[i], &fname, &offset); - if (result != ISC_R_SUCCESS) { - error++; - continue; - } - if (strcmp(fname, expected_symbols[i]) != 0) { - error++; - } - } - - if (error) { printf("Unexpected result:\n"); printf(" # of frames: %d (expected: at least 4)\n", nframes); - printf(" symbols:\n"); - for (i = 0; i < nframes; i++) { - fname = NULL; - result = isc_backtrace_getsymbol(tracebuf[i], &fname, - &offset); - if (result == ISC_R_SUCCESS) { - printf(" [%d] %s\n", i, fname); - } else { - printf(" [%d] %p getsymbol failed: %s\n", i, - tracebuf[i], isc_result_totext(result)); - } - } + return (1); } - return (error); + return (0); } static int diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in index 4ed360e4ea..adfda90b0d 100644 --- a/bin/tools/Makefile.in +++ b/bin/tools/Makefile.in @@ -26,7 +26,6 @@ CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ BIND9LIBS = ../../lib/bind9/libbind9.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} -ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS} ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ DNSDEPLIBS = ../../lib/dns/libdns.@A@ @@ -35,7 +34,6 @@ ISCDEPLIBS = ../../lib/isc/libisc.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ LIBS = ${ISCLIBS} @LIBS@ -NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@ SUBDIRS = diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in index 7876c511e2..abbaecb052 100644 --- a/lib/isc/Makefile.in +++ b/lib/isc/Makefile.in @@ -64,7 +64,6 @@ OBJS = pk11.@O@ pk11_result.@O@ \ string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \ tm.@O@ timer.@O@ version.@O@ \ ${UNIXOBJS} ${THREADOBJS} -SYMTBLOBJS = backtrace-emptytbl.@O@ # Alphabetically SRCS = pk11.c pk11_result.c \ @@ -102,19 +101,19 @@ version.@O@: version.c -DLIBAGE=${LIBAGE} \ -c ${srcdir}/version.c -libisc.@SA@: ${OBJS} ${SYMTBLOBJS} - ${AR} ${ARFLAGS} $@ ${OBJS} ${SYMTBLOBJS} +libisc.@SA@: ${OBJS} + ${AR} ${ARFLAGS} $@ ${OBJS} ${RANLIB} $@ libisc-nosymtbl.@SA@: ${OBJS} ${AR} ${ARFLAGS} $@ ${OBJS} ${RANLIB} $@ -libisc.la: ${OBJS} ${SYMTBLOBJS} +libisc.la: ${OBJS} ${LIBTOOL_MODE_LINK} \ ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \ -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \ - ${OBJS} ${SYMTBLOBJS} ${LIBS} + ${OBJS} ${LIBS} libisc-nosymtbl.la: ${OBJS} ${LIBTOOL_MODE_LINK} \ diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c index 21ca21b638..cd5cda3b5f 100644 --- a/lib/isc/assertions.c +++ b/lib/isc/assertions.c @@ -97,7 +97,6 @@ default_callback(const char *file, int line, isc_assertiontype_t type, void *tracebuf[BACKTRACE_MAXFRAME]; int i, nframes; const char *logsuffix = "."; - const char *fname; isc_result_t result; result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes); @@ -110,18 +109,7 @@ default_callback(const char *file, int line, isc_assertiontype_t type, if (result == ISC_R_SUCCESS) { for (i = 0; i < nframes; i++) { - unsigned long offset; - - fname = NULL; - result = isc_backtrace_getsymbol(tracebuf[i], &fname, - &offset); - if (result == ISC_R_SUCCESS) { - fprintf(stderr, "#%d %p in %s()+0x%lx\n", i, - tracebuf[i], fname, offset); - } else { - fprintf(stderr, "#%d %p in ??\n", i, - tracebuf[i]); - } + fprintf(stderr, "#%d %p in ??\n", i, tracebuf[i]); } } fflush(stderr); diff --git a/lib/isc/backtrace-emptytbl.c b/lib/isc/backtrace-emptytbl.c deleted file mode 100644 index 7193666ff2..0000000000 --- a/lib/isc/backtrace-emptytbl.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -/* - * This file defines an empty (default) symbol table used in backtrace.c - * If the application wants to have a complete symbol table, it should redefine - * isc__backtrace_symtable with the complete table in some way, and link the - * version of the library not including this definition - * (e.g. libisc-nosymbol.a). - */ - -#include - -LIBISC_EXTERNAL_DATA const int isc__backtrace_nsymbols = 0; -LIBISC_EXTERNAL_DATA const isc_backtrace_symmap_t isc__backtrace_symtable[] = { - { NULL, "" } -}; diff --git a/lib/isc/backtrace.c b/lib/isc/backtrace.c index d0a52ae364..aafff91b6a 100644 --- a/lib/isc/backtrace.c +++ b/lib/isc/backtrace.c @@ -221,80 +221,3 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) { return (ISC_R_NOTIMPLEMENTED); } #endif /* ifdef BACKTRACE_LIBC */ - -isc_result_t -isc_backtrace_getsymbolfromindex(int idx, const void **addrp, - const char **symbolp) { - REQUIRE(addrp != NULL && *addrp == NULL); - REQUIRE(symbolp != NULL && *symbolp == NULL); - - if (idx < 0 || idx >= isc__backtrace_nsymbols) { - return (ISC_R_RANGE); - } - - *addrp = isc__backtrace_symtable[idx].addr; - *symbolp = isc__backtrace_symtable[idx].symbol; - return (ISC_R_SUCCESS); -} - -static int -symtbl_compare(const void *addr, const void *entryarg) { - const isc_backtrace_symmap_t *entry = entryarg; - const isc_backtrace_symmap_t *end = - &isc__backtrace_symtable[isc__backtrace_nsymbols - 1]; - - if (isc__backtrace_nsymbols == 1 || entry == end) { - if (addr >= entry->addr) { - /* - * If addr is equal to or larger than that of the last - * entry of the table, we cannot be sure if this is - * within a valid range so we consider it valid. - */ - return (0); - } - return (-1); - } - - /* entry + 1 is a valid entry from now on. */ - if (addr < entry->addr) { - return (-1); - } else if (addr >= (entry + 1)->addr) { - return (1); - } - return (0); -} - -isc_result_t -isc_backtrace_getsymbol(const void *addr, const char **symbolp, - unsigned long *offsetp) { - isc_result_t result = ISC_R_SUCCESS; - isc_backtrace_symmap_t *found; - - /* - * Validate the arguments: intentionally avoid using REQUIRE(). - * See notes in backtrace.h. - */ - if (symbolp == NULL || *symbolp != NULL || offsetp == NULL) { - return (ISC_R_FAILURE); - } - - if (isc__backtrace_nsymbols < 1) { - return (ISC_R_NOTFOUND); - } - - /* - * Search the table for the entry that meets: - * entry.addr <= addr < next_entry.addr. - */ - found = bsearch(addr, isc__backtrace_symtable, isc__backtrace_nsymbols, - sizeof(isc__backtrace_symtable[0]), symtbl_compare); - if (found == NULL) { - result = ISC_R_NOTFOUND; - } else { - *symbolp = found->symbol; - *offsetp = (unsigned long)((const char *)addr - - (char *)found->addr); - } - - return (result); -} diff --git a/lib/isc/include/isc/backtrace.h b/lib/isc/include/isc/backtrace.h index c68c02a92b..a7a5ff0f7a 100644 --- a/lib/isc/include/isc/backtrace.h +++ b/lib/isc/include/isc/backtrace.h @@ -39,18 +39,6 @@ #include -/*** - *** Types - ***/ -struct isc_backtrace_symmap { - void * addr; - const char *symbol; -}; - -LIBISC_EXTERNAL_DATA extern const int isc__backtrace_nsymbols; -LIBISC_EXTERNAL_DATA extern const isc_backtrace_symmap_t - isc__backtrace_symtable[]; - /*** *** Functions ***/ @@ -77,49 +65,6 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes); *\li #ISC_R_NOTFOUND *\li #ISC_R_NOTIMPLEMENTED */ - -isc_result_t -isc_backtrace_getsymbolfromindex(int index, const void **addrp, - const char **symbolp); -/*%< - * Returns the content of the internal symbol table of the given index. - * On success, *addrsp and *symbolp point to the address and the symbol of - * the 'index'th entry of the table, respectively. If 'index' is not in the - * range of the symbol table, ISC_R_RANGE will be returned. - * - * Requires - * - *\li 'addrp' must be non NULL && '*addrp' == NULL. - * - *\li 'symbolp' must be non NULL && '*symbolp' == NULL. - * - * Returns: - * - *\li #ISC_R_SUCCESS - *\li #ISC_R_RANGE - */ - -isc_result_t -isc_backtrace_getsymbol(const void *addr, const char **symbolp, - unsigned long *offsetp); -/*%< - * Searches the internal symbol table for the symbol that most matches the - * given 'addr'. On success, '*symbolp' will point to the name of function - * to which the address 'addr' belong, and '*offsetp' will store the offset - * from the function's entry address to 'addr'. - * - * Requires (note that these are not ensured by assertion checks, see above): - * - *\li 'symbolp' must be non NULL && '*symbolp' == NULL. - * - *\li 'offsetp' must be non NULL. - * - * Returns: - * - *\li #ISC_R_SUCCESS - *\li #ISC_R_FAILURE - *\li #ISC_R_NOTFOUND - */ ISC_LANG_ENDDECLS #endif /* ISC_BACKTRACE_H */ diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index 9d2ad6c718..bcdc872867 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -31,13 +31,11 @@ /* Core Types. Alphabetized by defined type. */ -typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */ -typedef struct isc_appctx isc_appctx_t; /*%< Application context */ -typedef struct isc_backtrace_symmap isc_backtrace_symmap_t; /*%< Symbol Table - * Entry */ -typedef struct isc_buffer isc_buffer_t; /*%< Buffer */ -typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */ -typedef struct isc_constregion isc_constregion_t; /*%< Const region */ +typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */ +typedef struct isc_appctx isc_appctx_t; /*%< Application context */ +typedef struct isc_buffer isc_buffer_t; /*%< Buffer */ +typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */ +typedef struct isc_constregion isc_constregion_t; /*%< Const region */ typedef struct isc_consttextregion isc_consttextregion_t; /*%< Const Text Region */ typedef struct isc_counter isc_counter_t; /*%< Counter */ diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in index 2b590f8a02..cab49519a0 100644 --- a/lib/isc/win32/libisc.def.in +++ b/lib/isc/win32/libisc.def.in @@ -125,8 +125,6 @@ isc_appctx_destroy isc_assertion_failed isc_assertion_setcallback isc_assertion_typetotext -isc_backtrace_getsymbol -isc_backtrace_getsymbolfromindex isc_backtrace_gettrace isc_base32_decoderegion isc_base32_decodestring @@ -755,8 +753,6 @@ syslog EXPORTS -isc__backtrace_nsymbols DATA -isc__backtrace_symtable DATA isc_bind9 DATA isc_commandline_argument DATA isc_commandline_errprint DATA diff --git a/lib/isc/win32/libisc.vcxproj.filters.in b/lib/isc/win32/libisc.vcxproj.filters.in index 188f0dbdb4..7a4d86b34e 100644 --- a/lib/isc/win32/libisc.vcxproj.filters.in +++ b/lib/isc/win32/libisc.vcxproj.filters.in @@ -461,9 +461,6 @@ Library Source Files - - Library Source Files - Library Source Files diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in index c45883a5f3..b7079bbf6c 100644 --- a/lib/isc/win32/libisc.vcxproj.in +++ b/lib/isc/win32/libisc.vcxproj.in @@ -414,7 +414,6 @@ copy InstallFiles ..\Build\Release\ - diff --git a/util/copyrights b/util/copyrights index bff0ea4fc5..25d4c852ac 100644 --- a/util/copyrights +++ b/util/copyrights @@ -2123,7 +2123,6 @@ ./lib/isc/app.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020 ./lib/isc/assertions.c C 1997,1998,1999,2000,2001,2004,2005,2007,2008,2009,2015,2016,2018,2019,2020 ./lib/isc/astack.c C 2019,2020 -./lib/isc/backtrace-emptytbl.c C 2009,2016,2018,2019,2020 ./lib/isc/backtrace.c C 2009,2013,2014,2015,2016,2018,2019,2020 ./lib/isc/base32.c C 2008,2009,2013,2014,2015,2016,2018,2019,2020 ./lib/isc/base64.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020