1 /* This test will be used to create an executable with a specific
2    section layout in which .rela.dyn and .rela.plt are not contiguous.
3    For x86 case, readelf will report something like:
4 
5    ...
6    [10] .rela.dyn         RELA
7    [11] .bar              PROGBITS
8    [12] .rela.plt         RELA
9    ...
10 
11    This is important as this case was not correctly handled by dynamic
12    linker in the bind-now case, and the second section was never
13    processed.  */
14 
15 #include <stdio.h>
16 
17 const int __attribute__ ((section(".bar"))) bar = 0x12345678;
18 static const char foo[] = "foo";
19 
20 static int
do_test(void)21 do_test (void)
22 {
23   printf ("%s %d\n", foo, bar);
24   return 0;
25 }
26 
27 #define TEST_FUNCTION do_test ()
28 #include "../test-skeleton.c"
29