aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfweak/aliasmain.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-12-01 13:38:01 +1030
committerAlan Modra <amodra@gmail.com>2017-12-01 17:23:56 +1030
commit40363a913b8c1292af97b4f50a0b2c5e6fdd04cb (patch)
tree0ff3e7c19e0cafecf4ed47333500c2678ef1dc31 /ld/testsuite/ld-elfweak/aliasmain.c
parent63c1f59d665542359de4737e3e48033c588f44dc (diff)
downloadgdb-40363a913b8c1292af97b4f50a0b2c5e6fdd04cb.zip
gdb-40363a913b8c1292af97b4f50a0b2c5e6fdd04cb.tar.gz
gdb-40363a913b8c1292af97b4f50a0b2c5e6fdd04cb.tar.bz2
weak alias test
This adds the test I was using when testing 60d67dc8. * testsuite/ld-elfweak/alias.c, * testsuite/ld-elfweak/alias.dat, * testsuite/ld-elfweak/aliasmain.c, * testsuite/ld-elfweak/weakref1.c, * testsuite/ld-elfweak/weakref2.c: New test. * testsuite/ld-elfweak/elfweak.exp: Run it. Don't return on fails, attempt other tests.
Diffstat (limited to 'ld/testsuite/ld-elfweak/aliasmain.c')
-rw-r--r--ld/testsuite/ld-elfweak/aliasmain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfweak/aliasmain.c b/ld/testsuite/ld-elfweak/aliasmain.c
new file mode 100644
index 0000000..524a047
--- /dev/null
+++ b/ld/testsuite/ld-elfweak/aliasmain.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+extern int *psym1, *psym2;
+extern int strongsym;
+
+int
+main (void)
+{
+ printf ("value via psym1: %d, via psym2: %d, strong %d\n",
+ *psym1, *psym2, strongsym);
+ return 0;
+}