about summary refs log tree commit diff
path: root/csu/defs.awk
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-04-18 00:20:23 +0000
committerUlrich Drepper <drepper@redhat.com>1997-04-18 00:20:23 +0000
commit307bcd77838a5546a4fa65e7a88258a6ea78898c (patch)
treea0df3b4ed5d08f34b204955332c533c0114ee407 /csu/defs.awk
parentdd33e89fb2693e88ba64e6b947184c5abf70ff00 (diff)
downloadglibc-307bcd77838a5546a4fa65e7a88258a6ea78898c.tar.gz
glibc-307bcd77838a5546a4fa65e7a88258a6ea78898c.tar.xz
glibc-307bcd77838a5546a4fa65e7a88258a6ea78898c.zip
Rewrite by Zack Weinberg. cvs/libc-ud-970417
1997-04-18 02:18  Ulrich Drepper  <drepper@cygnus.com>

	* csu/initfini.c: Rewrite by Zack Weinberg
	<zack@rabi.phys.columbia.edu>.
	* csu/Makefile: Add rules for rewrite.
	* csu/defs.awk: Helper script to generate derived header.
Diffstat (limited to 'csu/defs.awk')
-rw-r--r--csu/defs.awk22
1 files changed, 22 insertions, 0 deletions
diff --git a/csu/defs.awk b/csu/defs.awk
new file mode 100644
index 0000000000..96f0a1d3cc
--- /dev/null
+++ b/csu/defs.awk
@@ -0,0 +1,22 @@
+/.end/	 { need_end = 1 }
+/.align/ { if($2 > max) max = $2; }
+
+END {
+    if(need_end)
+    {
+	print "#define END_INIT .end _init";
+	print "#define END_FINI .end _fini";
+    }
+    else
+    {
+	print "#define END_INIT";
+	print "#define END_FINI";
+    }
+    if(max)
+	print "#define ALIGN .align", max;
+    else
+	print "#define ALIGN";
+
+    print "#include <libc-symbols.h>";
+    print "weak_extern (__gmon_start__)";
+}