2002-07-01  H.J. Lu  <hjl@gnu.org>

	* elf/circleload1.c (load_dso): Call "circlemod1" and check
	return value.

	* elf/circlemod1.c (circlemod1): Return int.
	* elf/circlemod2.c (circlemod2): Likewise.
	* elf/circlemod2a.c (circlemod2): Likewise.
	* elf/circlemod3.c (circlemod3): Likewise.
	(circlemod3a): A new function.
This commit is contained in:
Ulrich Drepper 2002-07-17 00:34:35 +00:00
parent d747a0a564
commit 11fa51b8f6
6 changed files with 48 additions and 14 deletions

View File

@ -1,3 +1,14 @@
2002-07-01 H.J. Lu <hjl@gnu.org>
* elf/circleload1.c (load_dso): Call "circlemod1" and check
return value.
* elf/circlemod1.c (circlemod1): Return int.
* elf/circlemod2.c (circlemod2): Likewise.
* elf/circlemod2a.c (circlemod2): Likewise.
* elf/circlemod3.c (circlemod3): Likewise.
(circlemod3a): A new function.
2002-07-16 Ulrich Drepper <drepper@redhat.com>
* catgets/tst-catgets.c (main): Don't expect results for

View File

@ -102,6 +102,24 @@ load_dso (const char **loading, int undef, int flag)
printf ("ERRORS: dlopen shouldn't work for RTLD_NOW\n");
}
if (!undef)
{
int (*func) (void);
func = dlsym (obj, "circlemod1");
if (func == NULL)
{
++errors;
printf ("ERRORS: cannot get address of \"circlemod1\": %s\n",
dlerror ());
}
else if (func () != 3)
{
++errors;
printf ("ERRORS: function \"circlemod1\" returned wrong result\n");
}
}
loaded[0] = loading [0];
loaded[1] = loading [1];
loaded[2] = loading [2];

View File

@ -1,7 +1,7 @@
extern void circlemod2 (void);
extern int circlemod2 (void);
void
int
circlemod1 (void)
{
circlemod2 ();
return circlemod2 ();
}

View File

@ -1,9 +1,9 @@
extern void circlemod2_undefined (void);
extern void circlemod3 (void);
extern int circlemod3 (void);
void
int
circlemod2 (void)
{
circlemod2_undefined ();
circlemod3 ();
return circlemod3 ();
}

View File

@ -1,7 +1,7 @@
extern void circlemod3 (void);
extern int circlemod3 (void);
void
int
circlemod2 (void)
{
circlemod3 ();
return circlemod3 ();
}

View File

@ -1,9 +1,14 @@
extern void circlemod1 (void);
extern void circlemod2 (void);
extern int circlemod1 (void);
extern int circlemod2 (void);
void
int
circlemod3 (void)
{
circlemod1 ();
circlemod2 ();
return 3;
}
int
circlemod3a (void)
{
return circlemod1 () + circlemod2 ();
}