about summary refs log tree commit diff
path: root/elf/tst-piemod1.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-07-16 17:56:45 +0000
committerUlrich Drepper <drepper@redhat.com>2004-07-16 17:56:45 +0000
commitf17ed1a9ee9116a4792d22763a8c5912e5076473 (patch)
tree638a6046bfc19a736e675d6ef96db68d52b8aec8 /elf/tst-piemod1.c
parent290639c3b42dda0d6245d7a56740a89da07eca4c (diff)
downloadglibc-f17ed1a9ee9116a4792d22763a8c5912e5076473.tar.gz
glibc-f17ed1a9ee9116a4792d22763a8c5912e5076473.tar.xz
glibc-f17ed1a9ee9116a4792d22763a8c5912e5076473.zip
[BZ #262]
Update.
2004-07-15  Jakub Jelinek  <jakub@redhat.com>

	[BZ #262]
	* sysdeps/i386/elf/start.S (_start): Use @GOT instead of @GOTOFF
	for main.
	* elf/Makefile: Add rules to build and run tst-pie1.
	* elf/tst-pie1.c: New test.
	* elf/tst-piemod1.c: New file.
Diffstat (limited to 'elf/tst-piemod1.c')
-rw-r--r--elf/tst-piemod1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/elf/tst-piemod1.c b/elf/tst-piemod1.c
new file mode 100644
index 0000000000..ad439da800
--- /dev/null
+++ b/elf/tst-piemod1.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int
+foo (void)
+{
+  return 21;
+}
+
+int
+main (void)
+{
+  int val = foo ();
+  if (val != 34)
+    {
+      printf ("foo () returned %d\n", val);
+      return 1;
+    }
+
+  return 0;
+}