Browse Source
PR ld/14323 * ld-elf/pr14323-1.c: New. * ld-elf/pr14323-2.c: Likewise. * ld-elf/shared.exp (build_tests): Add libpr14323-2.so. (run_tests): Add pr14323.cygwin-64bit-branch
4 changed files with 45 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
#include <stdlib.h> |
|||
#include <stdio.h> |
|||
|
|||
extern int foo_alias; |
|||
extern char *bar (); |
|||
|
|||
int |
|||
main () |
|||
{ |
|||
if (foo_alias != 0) |
|||
abort (); |
|||
bar (); |
|||
if (foo_alias != -1) |
|||
abort (); |
|||
printf ("PASS\n"); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
int foo __attribute__ ((section ("_data_foo"))) = 0; |
|||
extern int foo_alias __attribute__ ((weak, alias ("foo"))); |
|||
extern char __start__data_foo; |
|||
asm (".type __start__data_foo,%object"); |
|||
int x1 = 1; |
|||
int x2 = 2; |
|||
|
|||
char * |
|||
bar () |
|||
{ |
|||
foo = -1; |
|||
return &__start__data_foo; |
|||
} |
|||
Loading…
Reference in new issue