2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / gcc.target / ia64 / pr60465-gprel64.c
blobc00ecc947d92cddb9ff05cfc246d47e39ef00b2b
1 /* { dg-do compile { target ia64-*-* } } */
2 /* { dg-options "-O2 -fpic" } */
3 /* { dg-final { scan-assembler-not "@ltoffx" } } */
5 /* Test imitates early ld.so setup in glibc
6 where no dynamic relocations must be present. */
8 struct rtld_global
10 long *p[77];
13 struct rtld_global _rtld_local __attribute__ ((visibility ("hidden"), section (".sdata")));
15 static void __attribute__ ((unused, noinline))
16 elf_get_dynamic_info (struct rtld_global * g, long * dyn)
18 long **info = g->p;
20 info[(0x6ffffeff - *dyn) + 66] = dyn;
23 void __attribute__ ((unused, noinline))
24 _dl_start (long * dyn)
26 elf_get_dynamic_info(&_rtld_local, dyn);