]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-addr1.c
Undo accidental commit to ChangeLog.19.
[thirdparty/glibc.git] / elf / tst-addr1.c
CommitLineData
93b53ca2
UD
1#include <dlfcn.h>
2#include <stdio.h>
3#include <string.h>
4
5static int
6do_test (void)
7{
8 Dl_info i;
9 if (dladdr (&printf, &i) == 0)
10 {
11 puts ("not found");
12 return 1;
13 }
14 printf ("found symbol %s in %s\n", i.dli_sname, i.dli_fname);
b80770b2
UD
15 return i.dli_sname == NULL
16 || (strcmp (i.dli_sname, "printf") != 0
17 /* On architectures which create PIC code by default
18 &printf may resolve to an address in libc.so
19 rather than in the binary. printf and _IO_printf
20 are aliased and which one comes first in the
21 hash table is up to the linker. */
22 && strcmp (i.dli_sname, "_IO_printf") != 0);
93b53ca2
UD
23}
24
36fe25fd 25#include <support/test-driver.c>