Debian Codegraph @

gcc/testsuite/gcc.target/ia64/pr60465-gprel64.c

raw
1 /* { dg-do compile { target ia64-*-* } } */
2 /* { dg-options "-O2 -fpic" } */
3 /* { dg-final { scan-assembler-not "@ltoffx" } } */
4
5 /* Test imitates early ld.so setup in glibc
6 where no dynamic relocations must be present. */
7
8 struct rtld_global
9 {
10 long *p[77];
11 };
12
13 struct rtld_global _rtld_local __attribute__ ((visibility ("hidden"), section (".sdata")));
14
15 static void __attribute__ ((unused, noinline))
16 elf_get_dynamic_info (struct rtld_global * g, long * dyn)
17 {
18 long **info = g->p;
19
20 info[(0x6ffffeff - *dyn) + 66] = dyn;
21 }
22
23 void __attribute__ ((unused, noinline))
24 _dl_start (long * dyn)
25 {
26 elf_get_dynamic_info(&_rtld_local, dyn);
27 }