mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
ca971bbfd8
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082
25 lines
567 B
Bash
Executable File
25 lines
567 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# usage: dde_kit_find_initcalls <list of object files>
|
|
#
|
|
|
|
tempfile="/tmp/dde_kit-$(date +%s)"
|
|
|
|
nm -C "$@" | grep "dde_kit_initcall_" > $tempfile
|
|
sed -i "s/^.* \(dde_kit_initcall_.*\)/\1/" $tempfile
|
|
|
|
echo "/*"
|
|
echo " * Automatically generated by \"os/tool/dde_kit_find_initcalls $@\"."
|
|
echo " */"
|
|
cat $tempfile | sed "s/\(.*\)/extern int (*\1)(void);/" | sort | uniq
|
|
echo
|
|
echo "void do_initcalls(void)"
|
|
echo "{"
|
|
cat $tempfile | sed "s/\(.*\)/ \1();/" | sort | uniq
|
|
echo "}"
|
|
echo "/*"
|
|
echo " * End of automatically generated code."
|
|
echo " */"
|
|
|
|
rm $tempfile
|