xref: /aosp_15_r20/external/jemalloc_new/include/jemalloc/jemalloc_rename.sh (revision 1208bc7e437ced7eb82efac44ba17e3beba411da)
1*1208bc7eSAndroid Build Coastguard Worker#!/bin/sh
2*1208bc7eSAndroid Build Coastguard Worker
3*1208bc7eSAndroid Build Coastguard Workerpublic_symbols_txt=$1
4*1208bc7eSAndroid Build Coastguard Worker
5*1208bc7eSAndroid Build Coastguard Workercat <<EOF
6*1208bc7eSAndroid Build Coastguard Worker/*
7*1208bc7eSAndroid Build Coastguard Worker * Name mangling for public symbols is controlled by --with-mangling and
8*1208bc7eSAndroid Build Coastguard Worker * --with-jemalloc-prefix.  With default settings the je_ prefix is stripped by
9*1208bc7eSAndroid Build Coastguard Worker * these macro definitions.
10*1208bc7eSAndroid Build Coastguard Worker */
11*1208bc7eSAndroid Build Coastguard Worker#ifndef JEMALLOC_NO_RENAME
12*1208bc7eSAndroid Build Coastguard WorkerEOF
13*1208bc7eSAndroid Build Coastguard Worker
14*1208bc7eSAndroid Build Coastguard Workerfor nm in `cat ${public_symbols_txt}` ; do
15*1208bc7eSAndroid Build Coastguard Worker  n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
16*1208bc7eSAndroid Build Coastguard Worker  m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
17*1208bc7eSAndroid Build Coastguard Worker  echo "#  define je_${n} ${m}"
18*1208bc7eSAndroid Build Coastguard Workerdone
19*1208bc7eSAndroid Build Coastguard Worker
20*1208bc7eSAndroid Build Coastguard Workercat <<EOF
21*1208bc7eSAndroid Build Coastguard Worker#endif
22*1208bc7eSAndroid Build Coastguard WorkerEOF
23