3 # create an initialization procedure from a list of .o files
5 echo '/* Do not modify this file. It is created automatically by "munch". */'
6 echo 'void initialize_all_files () {'
11 MUNCH_NM
=`echo $1 | sed 's/MUNCH_NM=//'`; shift ;;
16 # make it easy to use a different nm, e.g. for cross-developing
18 MUNCH_NM
="${MUNCH_NM-nm} $NMOPT"
19 if test "`$MUNCH_NM main.o | egrep main | egrep FUNC | egrep GLOB`" != "" ; then
20 # System V Release 4 style nm
21 $MUNCH_NM $
* |
egrep '|__?initialize_' |
egrep FUNC | \
23 's/^.*\(_initialize_[a-zA-Z0-9_]*\).*$/ {extern void \1 (); \1 ();}/'\
25 elif test "`$MUNCH_NM main.o | egrep '[TD] _?main$'`" = "" ; then
28 $MUNCH_NM $
* |
egrep '_initialize_.*' |
egrep '\.text'|\
30 's/^.*\(_initialize_[a-zA-Z0-9_]*\).*/ {extern void \1 (); \1 ();}/' \
34 # We now accept either text or data symbols, since the RT/PC uses data.
35 $MUNCH_NM -p $
* |
egrep '[TD] *_?[_.]initialize_' | \
36 sed -e 's/^.*\(initialize_.*\)/ {extern void _\1 (); _\1 ();}/' \
This page took 0.029843 seconds and 4 git commands to generate.