summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-shared/sh1.c
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2021-11-18 16:12:14 +0100
committerClément Chigot <clement.chigot@atos.net>2021-12-06 12:45:12 +0100
commit74044dc84074abca775c63462ecccc10a7900987 (patch)
tree4186489405f647bba6d48a56ce85d74faf89b4ba /ld/testsuite/ld-shared/sh1.c
parent2427f3b09eb23e7949878cdc0b366fb605df568f (diff)
downloadbinutils-gdb-74044dc84074abca775c63462ecccc10a7900987.tar.gz
ld: improve shared tests for AIX
It's now possible to refer symbols in the main program from the shared library. However, it still impossible to have the same overriden features between shared objects and mains than ELF, without using the runtime linking feature which isn't yet fully available. ld/ChangeLog: * testsuite/ld-shared/shared.exp: Improve XCOFF support * testsuite/ld-shared/main.c: Likewise. * testsuite/ld-shared/sh1.c: Likewise. * testsuite/ld-shared/xcoff.dat: Likewise.
Diffstat (limited to 'ld/testsuite/ld-shared/sh1.c')
-rw-r--r--ld/testsuite/ld-shared/sh1.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/ld/testsuite/ld-shared/sh1.c b/ld/testsuite/ld-shared/sh1.c
index c8e523249a3..9acb29e22dc 100644
--- a/ld/testsuite/ld-shared/sh1.c
+++ b/ld/testsuite/ld-shared/sh1.c
@@ -2,9 +2,7 @@
of a shared library. */
/* This variable is supplied by the main program. */
-#ifndef XCOFF_TEST
extern int mainvar;
-#endif
/* This variable is defined in the shared library, and overridden by
the main program. */
@@ -21,13 +19,11 @@ extern int shlibvar2;
/* These functions return the values of the above variables as seen in
the shared library. */
-#ifndef XCOFF_TEST
int
shlib_mainvar ()
{
return mainvar;
}
-#endif
#ifndef XCOFF_TEST
int
@@ -75,7 +71,6 @@ shlib_shlibcall2 ()
/* This function calls a function defined by the main program. */
-#ifndef XCOFF_TEST
extern int main_called ();
int
@@ -83,7 +78,6 @@ shlib_maincall ()
{
return main_called ();
}
-#endif
/* This function is passed a function pointer to shlib_mainvar. It
confirms that the pointer compares equally. */
@@ -98,14 +92,12 @@ shlib_checkfunptr1 (p)
/* This function is passed a function pointer to main_called. It
confirms that the pointer compares equally. */
-#ifndef XCOFF_TEST
int
shlib_checkfunptr2 (p)
int (*p) ();
{
return p == main_called;
}
-#endif
/* This function returns a pointer to shlib_mainvar. */
@@ -117,13 +109,11 @@ int
/* This function returns a pointer to main_called. */
-#ifndef XCOFF_TEST
int
(*shlib_getfunptr2 ()) ()
{
return main_called;
}
-#endif
/* This function makes sure that constant data and local functions
work. */