]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/ifuncmain5.c
elf: Disable some subtests of ifuncmain1, ifuncmain5 for !PIE
[thirdparty/glibc.git] / elf / ifuncmain5.c
index f398085cb46719d18950533e3178de578face344..6fda768fb6908aed552e3150a478ad2c60c06cdf 100644 (file)
@@ -14,12 +14,19 @@ get_foo (void)
   return foo;
 }
 
+
+/* Address-significant access to protected symbols is not supported in
+   position-dependent mode on several architectures because GCC
+   generates relocations that assume that the address is local to the
+   main program.  */
+#ifdef __PIE__
 foo_p
 __attribute__ ((noinline))
 get_foo_protected (void)
 {
   return foo_protected;
 }
+#endif
 
 int
 main (void)
@@ -30,9 +37,11 @@ main (void)
   if ((*p) () != -1)
     abort ();
 
+#ifdef __PIE__
   p = get_foo_protected ();
   if ((*p) () != 0)
     abort ();
+#endif
 
   return 0;
 }