mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
15 lines
411 B
Bash
Executable File
15 lines
411 B
Bash
Executable File
#! /bin/sh
|
|
|
|
# create an initialization procedure from a list of .o files
|
|
# Look in object files, find symbols including the string _initialize_,
|
|
# and call each one as a function.
|
|
|
|
echo '/* Do not modify this file. It is created automatically by "munch". */'
|
|
echo 'void init_all_files () {'
|
|
|
|
nm $* | egrep '_initialize_' | \
|
|
sed -e 's/^.*\(initialize_[a-zA-Z_0-9]*\).*$/ _\1 ();/' | \
|
|
sort -u
|
|
|
|
echo '}'
|