mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
d3556ac929
* elf/dl-close.c: Handle failed loads which would have gone in the global scope correctly. * elf/testobj1.c: Include stdlib.h to get NULL defined. * elf/testobj2.c: Likewise. * elf/testobj3.c: Likewise. * elf/testobj4.c: Likewise. * elf/testobj5.c: Likewise. * iconvdata/sami-ws2.c: New file.
24 lines
290 B
C
24 lines
290 B
C
#include <dlfcn.h>
|
|
#include <stdlib.h>
|
|
|
|
int
|
|
obj2func1 (int a __attribute__ ((unused)))
|
|
{
|
|
return 43;
|
|
}
|
|
|
|
int
|
|
obj2func2 (int a)
|
|
{
|
|
return obj1func1 (a) + 10;
|
|
}
|
|
|
|
int
|
|
preload (int a)
|
|
{
|
|
int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
|
|
if (fp != NULL)
|
|
return fp (a) + 10;
|
|
return 10;
|
|
}
|