diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-07-02 14:40:18 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-07-02 14:40:18 +0000 |
commit | bf16711e7c2daef9bc114760f1671165b6d1b05d (patch) | |
tree | ef21ab27ee202b9ecda73b1705ec22571161e011 /ld/testsuite/ld-elf/data2.c | |
parent | 33291a7b312f18e260e8a0946ebdb6bf90c37a36 (diff) | |
download | binutils-redhat-bf16711e7c2daef9bc114760f1671165b6d1b05d.tar.gz |
Add a test for weak alias
* ld-elf/data2.c: New file.
* ld-elf/weakdef1.c: Likewise.
* ld-elf/shared.exp: Add tests for libdata2 and weakdef1.
Diffstat (limited to 'ld/testsuite/ld-elf/data2.c')
-rw-r--r-- | ld/testsuite/ld-elf/data2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/data2.c b/ld/testsuite/ld-elf/data2.c new file mode 100644 index 0000000000..c137b7ce5d --- /dev/null +++ b/ld/testsuite/ld-elf/data2.c @@ -0,0 +1,9 @@ +int foo = 0; +extern int foo_alias __attribute__ ((weak, alias ("foo"))); + +void +bar (void) +{ + foo = -1; +} + |