{
return 1;
}
+
+// The function f2 is used to test that the executable can see the
+// same function address for a protected function in the executable
+// and in the shared library. We can't use the visibility attribute
+// here, becaues that may cause gcc to generate a PC relative reloc;
+// we need it to get the value from the GOT. I'm not sure this is
+// really useful, given that it doesn't work with the visibility
+// attribute. This test exists here mainly because the glibc
+// testsuite has the same test, and we want to make sure that gold
+// passes the glibc testsuite.
+
+extern "C" int f2();
+asm(".protected f2");
+
+extern "C" int
+f2()
+{
+ return 2;
+}
+
+int
+(*get_f2_addr())()
+{
+ return f2;
+}