]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove support for internal symbol table
authorEvan Hunt <each@isc.org>
Wed, 11 Mar 2020 04:15:43 +0000 (21:15 -0700)
committerOndřej Surý <ondrej@isc.org>
Wed, 11 Mar 2020 10:13:52 +0000 (11:13 +0100)
Since we can no longer generate an internal symbol table, there
doesn't seem to be much reason to retain the code that reads it.

24 files changed:
bin/check/Makefile.in
bin/confgen/Makefile.in
bin/delv/Makefile.in
bin/dig/Makefile.in
bin/dnssec/Makefile.in
bin/named/Makefile.in
bin/named/main.c
bin/nsupdate/Makefile.in
bin/rndc/Makefile.in
bin/tests/Makefile.in
bin/tests/optional/.gitignore
bin/tests/optional/Makefile.in
bin/tests/optional/backtrace_test.c
bin/tools/Makefile.in
lib/isc/Makefile.in
lib/isc/assertions.c
lib/isc/backtrace-emptytbl.c [deleted file]
lib/isc/backtrace.c
lib/isc/include/isc/backtrace.h
lib/isc/include/isc/types.h
lib/isc/win32/libisc.def.in
lib/isc/win32/libisc.vcxproj.filters.in
lib/isc/win32/libisc.vcxproj.in
util/copyrights

index c7f2f0f26d84380b64e789f097d1dc28aaa4df1d..9e8334968f1b30aea2a5ff351d7ce41404905aee 100644 (file)
@@ -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 =
 
index c03183b1456f51247e5e5b788041dba1dd252ada..2cd57c17ad1930cc76aff494a1ba76db5ea27738 100644 (file)
@@ -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
index 06743061b28c0dd7a18c9513eed42eb0b78f8619..c0c1f4a2191ad9b9ee1e649bc21fa2204ceb5ba3 100644 (file)
@@ -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 =
 
index f5f604c8dbf39e00ec424b7da6278997963e9e13..b6c573cd567d951eb1ec7bef058b869d35fb336c 100644 (file)
@@ -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@
index 05fdb55df736acadb3bd76001433f0f15665d102..d26db1902f0db5db1f4b2f1a55efe1b664d1d825 100644 (file)
@@ -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@ \
index f66bc9a6e2ebf01a7dd02b2ab9384448cf0c3e2d..4e568e2999683c7368987684bc408d3d544e0922 100644 (file)
@@ -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
index 603e8a1b5e07bac816d3265003b38b5b324f86cd..d7150c47bdff45a3c014704d7d3c8df85689ed8f 100644 (file)
@@ -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.
         */
index a4b99bddc7ae9587c18baa7db80d002560ffccfd..a81ee919386269916c20198de04ff74ec6f1227b 100644 (file)
@@ -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@
index c5abfa64784189327f72d5bf058d3b9df2e85d69..8eef2106d19532c16d9a04c5808560130670f0e0 100644 (file)
@@ -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}
 
index 63659531cb9957cf3cc3850d75b7f5c33a29985f..49a3d3aecb022e01f047243d159b4acddbb42558 100644 (file)
@@ -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@
index 4c0b637f36fcd046d44535f25e3b16b37325cea0..0d89a8600c3aaaac5b956351b71693543f53e403 100644 (file)
@@ -1,5 +1,3 @@
 /backtrace_test.dSYM/
 /backtrace_test0.dSYM/
-/backtrace_test_nosymtbl
-/backtrace_test_nosymtbl.dSYM/
 /nsecify
index ab5536d1d16bae1f0681e3c5281beea1dc178dd2..593610633a182efb05dd850889f6f26450d1fe30 100644 (file)
@@ -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}
index 728c0ca44b677b51a16c0637209e319e3c1d0b06..5527835eee3cc4abedb0468bdaf5074cf1bd6bd7 100644 (file)
 #include <isc/print.h>
 #include <isc/result.h>
 
-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
index 4ed360e4ea535ba8df8bad4bc603f8681c088fcb..adfda90b0d44bbcc5055c2d4d42b0774572ece95 100644 (file)
@@ -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 =
 
index 7876c511e22acf7bfa335623c0c063aca962408f..abbaecb052e5b960cd88dad9e494cd034ab66647 100644 (file)
@@ -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} \
index 21ca21b638b06606d36f00633040cf85b5e072bc..cd5cda3b5f2da1b454d8aa0f39bfe5478d62f9d7 100644 (file)
@@ -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 (file)
index 7193666..0000000
+++ /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 <isc/backtrace.h>
-
-LIBISC_EXTERNAL_DATA const int isc__backtrace_nsymbols = 0;
-LIBISC_EXTERNAL_DATA const isc_backtrace_symmap_t isc__backtrace_symtable[] = {
-       { NULL, "" }
-};
index d0a52ae36494576304f27276d6e4b6491dbb6a95..aafff91b6a34d5d9f548d348062ab032ae987876 100644 (file)
@@ -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);
-}
index c68c02a92b050e21b1b53300ea80c2e1208eac1e..a7a5ff0f7a3972eaccfbe218add5644d00e6b557 100644 (file)
 
 #include <isc/types.h>
 
-/***
- *** 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 */
index 9d2ad6c718cea60bbfcffa974289d1b1b8d84b77..bcdc87286734cda4bc3b50a19952d2fce272e1b6 100644 (file)
 
 /* 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 */
index 2b590f8a025357e5664eecb2527e3b2c5e10256b..cab49519a0cd778f178fe4819ba6d9f3793d7b94 100644 (file)
@@ -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
index 188f0dbdb4dd107a3dba8a51d1c631c058bf8794..7a4d86b34e5bc155046ee6332e2d70e93a5fc46d 100644 (file)
     <ClCompile Include="..\backtrace.c">
       <Filter>Library Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\backtrace-emptytbl.c">
-      <Filter>Library Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\base32.c">
       <Filter>Library Source Files</Filter>
     </ClCompile>
index c45883a5f35b752f184c2a36d944f31a3c14a803..b7079bbf6c96ca0220877c0f4f083705b895664e 100644 (file)
@@ -414,7 +414,6 @@ copy InstallFiles ..\Build\Release\
     <ClCompile Include="..\app.c" />
     <ClCompile Include="..\assertions.c" />
     <ClCompile Include="..\astack.c" />
-    <ClCompile Include="..\backtrace-emptytbl.c" />
     <ClCompile Include="..\backtrace.c" />
     <ClCompile Include="..\base32.c" />
     <ClCompile Include="..\base64.c" />
index bff0ea4fc5fbfad9915bb595380101ccccfa4527..25d4c852ac4ffb89d4d835c7c5e53ce5adfa539b 100644 (file)
 ./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