Home | History | Annotate | Line # | Download | only in jemalloc
jemalloc_rename.sh revision 1.1
      1  1.1  christos #!/bin/sh
      2  1.1  christos 
      3  1.1  christos public_symbols_txt=$1
      4  1.1  christos 
      5  1.1  christos cat <<EOF
      6  1.1  christos /*
      7  1.1  christos  * Name mangling for public symbols is controlled by --with-mangling and
      8  1.1  christos  * --with-jemalloc-prefix.  With default settings the je_ prefix is stripped by
      9  1.1  christos  * these macro definitions.
     10  1.1  christos  */
     11  1.1  christos #ifndef JEMALLOC_NO_RENAME
     12  1.1  christos EOF
     13  1.1  christos 
     14  1.1  christos for nm in `cat ${public_symbols_txt}` ; do
     15  1.1  christos   n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
     16  1.1  christos   m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
     17  1.1  christos   echo "#  define je_${n} ${m}"
     18  1.1  christos done
     19  1.1  christos 
     20  1.1  christos cat <<EOF
     21  1.1  christos #endif
     22  1.1  christos EOF
     23