diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/tst-addr1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/elf/tst-addr1.c b/elf/tst-addr1.c index 68ff74aabd..27dc0f00f4 100644 --- a/elf/tst-addr1.c +++ b/elf/tst-addr1.c @@ -12,6 +12,16 @@ do_test (void) return 1; } printf ("found symbol %s in %s\n", i.dli_sname, i.dli_fname); + if (i.dli_sname == NULL) + return 1; + +#if __LONG_DOUBLE_USES_FLOAT128 == 1 + /* On architectures which redirect long double to + _Float128 (e.g powerpc64le), printf will resolve + to __printfieee128 due to header redirects. There + is no _IO_printfieee128 alias. */ + return strcmp (i.dli_sname, "__printfieee128") != 0; +#else return i.dli_sname == NULL || (strcmp (i.dli_sname, "printf") != 0 /* On architectures which create PIC code by default @@ -20,6 +30,7 @@ do_test (void) are aliased and which one comes first in the hash table is up to the linker. */ && strcmp (i.dli_sname, "_IO_printf") != 0); +#endif } #include <support/test-driver.c> |