aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-3.c
blob: c2fa8968e7732e510aafdd4a3c0183168b295c4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Check that PLT is used to access glob_a.  */
/* { dg-do compile { target *-*-linux* } } */
/* { dg-require-effective-target pie_copyreloc } */
/* { dg-options "-O2 -fpie" } */

extern int glob_a (void);

int foo ()
{
  return glob_a ();
}

/* glob_a should be accessed with a PLT.  */
/* { dg-final { scan-assembler "glob_a@PLT" { target { ! ia32 } } } } */