Browse Source
bfd/ * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. ld/ * testsuite/ld-elf/pr21964-3a.c: New file. * testsuite/ld-elf/pr21964-3c.c: New file. * testsuite/ld-elf/shared.exp: Run new __start/__stop testcase.binutils-2_31-branch
6 changed files with 52 additions and 2 deletions
@ -0,0 +1,11 @@ |
|||
extern int __start___verbose[]; |
|||
extern int __stop___verbose[]; |
|||
int |
|||
foo3 (void) |
|||
{ |
|||
if (__start___verbose == __stop___verbose |
|||
|| __start___verbose[0] != 6) |
|||
return -1; |
|||
else |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
#include <stdio.h> |
|||
|
|||
extern int foo1 (void); |
|||
extern int foo2 (void); |
|||
extern int foo3 (void); |
|||
|
|||
static int my_var __attribute__((used, section("__verbose"))) = 6; |
|||
|
|||
int |
|||
main () |
|||
{ |
|||
if (foo1 () == 0 |
|||
&& foo2 () == 0 |
|||
&& foo3 () == 0) |
|||
printf ("PASS\n"); |
|||
return 0; |
|||
} |
|||
Loading…
Reference in new issue