OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [testsuite/] [protected_1.cc] - Diff between revs 27 and 159

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 27 Rev 159
Line 30... Line 30...
f1()
f1()
{
{
  return 1;
  return 1;
}
}
 
 
 No newline at end of file
 No newline at end of file
 
// 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;
 
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.