projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fgetws implementation.
[kopensolaris-gnu/glibc.git]
/
elf
/
testobj3.c
diff --git
a/elf/testobj3.c
b/elf/testobj3.c
index
8e3d886
..
d8ede36
100644
(file)
--- a/
elf/testobj3.c
+++ b/
elf/testobj3.c
@@
-1,3
+1,8
@@
+#include <dlfcn.h>
+#include <stdlib.h>
+
+extern int foo (int);
+
int
obj3func1 (int a __attribute__ ((unused)))
{
int
obj3func1 (int a __attribute__ ((unused)))
{
@@
-9,3
+14,12
@@
obj3func2 (int a)
{
return foo (a) + 42;
}
{
return foo (a) + 42;
}
+
+int
+preload (int a)
+{
+ int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
+ if (fp != NULL)
+ return fp (a) + 10;
+ return 10;
+}