|
Last change
on this file was 10, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
431 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Testcase to make sure that a versioned symbol definition in an
|
|---|
| 3 | * application correctly defines the version node, if and only if
|
|---|
| 4 | * the actual symbol is exported. This is built both with and without
|
|---|
| 5 | * -export-dynamic.
|
|---|
| 6 | */
|
|---|
| 7 | #include <stdio.h>
|
|---|
| 8 |
|
|---|
| 9 | extern int foo ();
|
|---|
| 10 |
|
|---|
| 11 | int
|
|---|
| 12 | bar()
|
|---|
| 13 | {
|
|---|
| 14 | return 3;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | int
|
|---|
| 18 | new_foo()
|
|---|
| 19 | {
|
|---|
| 20 | return 1000+bar();
|
|---|
| 21 |
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | __asm__(".symver new_foo,foo@@VERS_2.0");
|
|---|
| 25 |
|
|---|
| 26 | int
|
|---|
| 27 | main()
|
|---|
| 28 | {
|
|---|
| 29 | printf("%d\n", foo());
|
|---|
| 30 | return 0;
|
|---|
| 31 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.