mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
3271. [port] darwin: mksymtbl is not always stable, loop several
times before giving up. mksymtbl was using non
portable perl to covert 64 bit hex strings. [RT #27653]
This commit is contained in:
parent
2855e27723
commit
c2e614115b
3 changed files with 37 additions and 5 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
3271. [port] darwin: mksymtbl is not always stable, loop several
|
||||
times before giving up. mksymtbl was using non
|
||||
portable perl to covert 64 bit hex strings. [RT #27653]
|
||||
|
||||
3271. [func] New "rndc zonestatus" command prints information
|
||||
about the specified zone. [RT #21671]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: rules.in,v 1.72 2011/12/20 05:24:18 marka Exp $
|
||||
# $Id: rules.in,v 1.73 2012/01/31 04:08:07 marka Exp $
|
||||
|
||||
###
|
||||
### Common Makefile rules for BIND 9.
|
||||
|
|
@ -214,7 +214,21 @@ FINALBUILDCMD = if [ X"${MKSYMTBL_PROGRAM}" = X -o X"$${MAKE_SYMTABLE:-${ALWAYS_
|
|||
-o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ $${LIBS0} ${NOSYMLIBS}; \
|
||||
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
|
||||
-o $@-symtbl2.c $@tmp2; \
|
||||
diff $@-symtbl.c $@-symtbl2.c || exit 1;\
|
||||
count=0; \
|
||||
until diff $@-symtbl.c $@-symtbl2.c > /dev/null ; \
|
||||
do \
|
||||
count=`expr $$count + 1` ; \
|
||||
test $$count = 42 && exit 1 ; \
|
||||
rm -f $@-symtbl.c $@-symtbl.@O@; \
|
||||
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
|
||||
-o $@-symtbl.c $@tmp2 || exit 1; \
|
||||
$(MAKE) $@-symtbl.@O@ || exit 1; \
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \
|
||||
${LDFLAGS} -o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ \
|
||||
$${LIBS0} ${NOSYMLIBS}; \
|
||||
${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \
|
||||
-o $@-symtbl2.c $@tmp2; \
|
||||
done ; \
|
||||
mv $@tmp2 $@; \
|
||||
rm -f $@tmp0 $@tmp1 $@tmp2 $@-symtbl2.c; \
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: mksymtbl.pl,v 1.4 2009/10/05 22:39:09 jinmei Exp $
|
||||
# $Id: mksymtbl.pl,v 1.5 2012/01/31 04:08:07 marka Exp $
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
$^W = 1;
|
||||
|
||||
my $rev = '$Id: mksymtbl.pl,v 1.4 2009/10/05 22:39:09 jinmei Exp $';
|
||||
my $rev = '$Id: mksymtbl.pl,v 1.5 2012/01/31 04:08:07 marka Exp $';
|
||||
$rev =~ s/\$//g;
|
||||
$rev =~ s/,v//g;
|
||||
$rev =~ s/Id: //;
|
||||
|
|
@ -95,11 +95,25 @@ while (<SYMBOLS>) {
|
|||
}
|
||||
}
|
||||
|
||||
sub lhex {
|
||||
my $la = substr($a, -8);
|
||||
my $lb = substr($b, -8);
|
||||
my $ha = substr($a, 0, length($a) - length($la));
|
||||
my $hb = substr($b, 0, length($b) - length($lb));
|
||||
$ha = "0" if ($ha eq "");
|
||||
$ha = "0" if ($hb eq "");
|
||||
if (hex($ha) != hex($hb)) {
|
||||
$la = $ha;
|
||||
$lb = $hb;
|
||||
}
|
||||
hex($la) <=> hex($lb)
|
||||
}
|
||||
|
||||
print TBLFILE "/*\n * Generated by $rev \n */\n";
|
||||
print TBLFILE "#include <isc/backtrace.h>\n";
|
||||
print TBLFILE "const int isc__backtrace_nsymbols = $nsyms;\n";
|
||||
print TBLFILE "const isc_backtrace_symmap_t isc__backtrace_symtable[] = {\n";
|
||||
foreach (sort {hex($a) <=> hex($b)} keys(%symmap)) {
|
||||
foreach (sort lhex keys(%symmap)) {
|
||||
my ($addr, $symbol) = ($_, $symmap{$_});
|
||||
if ($need_uscorefix && $symbol =~ /^_(.*)/) {
|
||||
$symbol = $1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue