Script to generate __libc_init.
authordrepper <drepper>
Fri, 8 May 1998 20:39:50 +0000 (20:39 +0000)
committerdrepper <drepper>
Fri, 8 May 1998 20:39:50 +0000 (20:39 +0000)
csu/munch.awk [new file with mode: 0644]

diff --git a/csu/munch.awk b/csu/munch.awk
new file mode 100644 (file)
index 0000000..1ed6868
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN { special = 0 }
+
+/EXTERNS/ { ndirs = split(subdirs, dirs)
+           for (i = 1; i <= ndirs; ++i)
+               printf "extern void __init_%s __P ((int argc, char **argv, char **envp));\n", dirs[i]
+           special = 1 }
+/CALLS/ { ndirs = split(subdirs, dirs)
+         for (i = 1; i <= ndirs; ++i) printf "  __init_%s (argc, argv, envp);\n", dirs[i]
+         special = 1 }
+
+{ if (special == 0) print $0; special = 0 }