Browse Source
* ld-elf/data2.c: New file. * ld-elf/weakdef1.c: Likewise. * ld-elf/shared.exp: Add tests for libdata2 and weakdef1.cygwin-64bit-branch
4 changed files with 37 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||
int foo = 0; |
|||
extern int foo_alias __attribute__ ((weak, alias ("foo"))); |
|||
|
|||
void |
|||
bar (void) |
|||
{ |
|||
foo = -1; |
|||
} |
|||
|
|||
@ -0,0 +1,15 @@ |
|||
#include <stdio.h> |
|||
#include <stdlib.h> |
|||
|
|||
extern int foo_alias; |
|||
extern void bar (void); |
|||
|
|||
int |
|||
main (void) |
|||
{ |
|||
bar (); |
|||
if (foo_alias != -1) |
|||
abort (); |
|||
printf ("PASS\n"); |
|||
return 0; |
|||
} |
|||
Loading…
Reference in new issue