diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-09 22:42:09 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-10 09:06:58 +0200 |
commit | bceabc95c1c85d793200446fa85f1ddc6313ea29 (patch) | |
tree | 973c8bd8deca9fd69913f2895cc91e0e6114d46c /rtemsbsd/rtems/generate_kvm_symbols | |
parent | Add FreeBSD sources as a submodule (diff) | |
download | rtems-libbsd-bceabc95c1c85d793200446fa85f1ddc6313ea29.tar.bz2 |
Move files to match FreeBSD layout
Diffstat (limited to 'rtemsbsd/rtems/generate_kvm_symbols')
-rwxr-xr-x | rtemsbsd/rtems/generate_kvm_symbols | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/rtemsbsd/rtems/generate_kvm_symbols b/rtemsbsd/rtems/generate_kvm_symbols new file mode 100755 index 00000000..b26259c7 --- /dev/null +++ b/rtemsbsd/rtems/generate_kvm_symbols @@ -0,0 +1,108 @@ +#! /bin/sh +# +# This file generates the symbol table for the kvm subsystem. The +# table is limited to the ones we believe are needed. + +symbols="" +while read sym +do + symbols="${symbols} ${sym}" +done <<EOF +_ifnet +_rtstat +_rt_tables +_mrtstat +_mfchashtbl +_viftable +_ipxpcb_list +_ipxstat +_spx_istat +_ddpstat +_ddpcb +_ngsocklist +_ip6stat +_icmp6stat +_ipsec4stat +_ipsec6stat +_pim6stat +_mrt6stat +_mf6ctable +_mif6table +_pfkeystat +_mbstat +_mbtypes +_nmbclusters +_nmbufs +_mbuf_hiwm +_clust_hiwm +_smp_cpus +_pagesize +_mb_statpcpu +_rttrash +_mbuf_lowm +_clust_lowm +_carpstats +_pfsyncstats +_ahstat +_espstat +_ipcompstat +_tcpstat +_udpstat +_ipstat +_icmpstat +_igmpstat +_pimstat +_tcbinfo +_udbinfo +_divcbinfo +_ripcbinfo +_unp_count +_unp_gencnt +_unp_dhead +_unp_shead +_rip6stat +_sctpstat +_mfctablesize +_arpstat +EOF + +cat <<EOF +/**** THIS FILE IS GENERATED BY A SCRIPT ****/ + +/* + * This file contains the known list of symbols for the kvm subsystem. + */ + +#include "kvm_private.h" +#include "stdio.h" + +/* + * The following is the known list of symbols that may be passed + * to the kvm family of calls. + */ + +EOF +for sym in ${symbols} +do + no_underscore=`echo $sym | sed -e 's/^_//' ` + echo "extern int ${no_underscore} __attribute((weak));" +done + +cat <<EOF +/* + * The following is the known list of symbols that may be passed + * to the kvm family of calls. + */ + +kvm_symval_t rtems_kvm_symbols[] = { +EOF +for sym in ${symbols} +do + no_underscore=`echo $sym | sed -e 's/^_//' ` + echo " { \"${sym}\", &${no_underscore} }," +done + +cat <<EOF + { "", NULL } +}; +EOF |